Sponsored
OP
OP
ericpullen

ericpullen

Well-known member
First Name
Eric
Joined
Jan 4, 2022
Threads
31
Messages
269
Reaction score
485
Location
Louisville, KY
Vehicles
22 F-150 Lightning & 22 Mach-E
Nice! I love when someone can take what I wrote and expand on it!

I also did some QA testing on the library and it does seem to handle power outages in the FCSP just fine. Example below of me turning it off and back on a few times, then starting up a charge:

Code:
$ python examples/fcsp_state_monitor.py
? FCSP State Monitor
? Polling every 30 seconds
? Press Ctrl+C to stop
? Monitor will automatically recover when device comes back online
==================================================
? Getting initial state...
? Initial state: ? CS00 - Available
? Starting monitoring loop...

Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x103bcb890>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x103bcb890>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb9d0>: Failed to establish a new connection: [Errno 64] Host is down'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb9d0>: Failed to establish a new connection: [Errno 64] Host is down'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb890>: Failed to establish a new connection: [Errno 64] Host is down'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb890>: Failed to establish a new connection: [Errno 64] Host is down'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcae90>: Failed to establish a new connection: [Errno 64] Host is down'))
? Device appears to be offline. Will continue monitoring for reconnection...
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x103bcb750>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Read timed out. (read timeout=10)
? Device is back online!
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298190>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298190>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298690>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298690>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298cd0>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298cd0>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299090>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
? Device appears to be offline. Will continue monitoring for reconnection...
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299450>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299810>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299bd0>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299f90>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x10429a350>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Read timed out. (read timeout=10)
⏳ Still waiting for device to come back online... (10 attempts)
? Device is back online!

? [2025-07-03 08:16:17] STATE CHANGE DETECTED!
   Device: ? CS00 (Available) → ? CS02 (Charging)
 

Aminorjourney

Well-known member
Joined
Jun 6, 2022
Threads
12
Messages
249
Reaction score
467
Location
Internet
Vehicles
vehicles that go
Nice! I love when someone can take what I wrote and expand on it!

I also did some QA testing on the library and it does seem to handle power outages in the FCSP just fine. Example below of me turning it off and back on a few times, then starting up a charge:

Code:
$ python examples/fcsp_state_monitor.py
? FCSP State Monitor
? Polling every 30 seconds
? Press Ctrl+C to stop
? Monitor will automatically recover when device comes back online
==================================================
? Getting initial state...
? Initial state: ? CS00 - Available
? Starting monitoring loop...

Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x103bcb890>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x103bcb890>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb9d0>: Failed to establish a new connection: [Errno 64] Host is down'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb9d0>: Failed to establish a new connection: [Errno 64] Host is down'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb890>: Failed to establish a new connection: [Errno 64] Host is down'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcb890>: Failed to establish a new connection: [Errno 64] Host is down'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x103bcae90>: Failed to establish a new connection: [Errno 64] Host is down'))
? Device appears to be offline. Will continue monitoring for reconnection...
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x103bcb750>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Read timed out. (read timeout=10)
? Device is back online!
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298190>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298190>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298690>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298690>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298cd0>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
❌ Error getting state: Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104298cd0>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299090>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
? Device appears to be offline. Will continue monitoring for reconnection...
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299450>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299810>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299bd0>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x104299f90>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Max retries exceeded with url: /api/v1/access (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x10429a350>, 'Connection to 192.168.1.197 timed out. (connect timeout=10)'))
Connection failed: HTTPSConnectionPool(host='192.168.1.197', port=443): Read timed out. (read timeout=10)
⏳ Still waiting for device to come back online... (10 attempts)
? Device is back online!

? [2025-07-03 08:16:17] STATE CHANGE DETECTED!
   Device: ? CS00 (Available) → ? CS02 (Charging)
Nice!

If you HAVE a HIS, this is the logic I've been using in my repo.

Python:
def interpret_charger_status(charger_info, inverter_info):
    if not charger_info:
        return None
    state = charger_info.get("state")
    if state == "CS00":
        return "Idle"
    elif state == "CS01":
        return "Vehicle Connected"
    elif state == "CS02":
        if inverter_info and len(inverter_info) > 0:
            inv_state = inverter_info[0].get("state")
            if inv_state == 1:
                return "Preparing To Power Home"
            elif inv_state == 5:
                return "Powering Home"
            else:
                return "Charging Vehicle"
        return "Power Transferring"
    return state or "Unknown"
I'm using the states from charger_info, and Inverter_infoto further expand on the HIS system.

I know form testing that the Inverter usually sits a state of 0 until the power goes out. Then it shifts to a state of 1 for preparing to power, and 5 when it's actively powering. I'm pretty sure we can expand on that since the Delta E4_BDI is available outside of Ford's system. I bet someone, somewhere has deciphered what states 2 thru 4 mean ;)

I'm not sure if you've had a look at the current settings etc, but I'd though about seeing today if we can reach the FCSP and set current limits locally without going through the cloud (I think the FordPass app sends that over-the-air).

Also curious if get_wifi_networks switches your unit into the pairing (white flashing) mode? I need to play with that a little more ;)
 
Last edited:

Aminorjourney

Well-known member
Joined
Jun 6, 2022
Threads
12
Messages
249
Reaction score
467
Location
Internet
Vehicles
vehicles that go
Another point @ericpullen:

After playing with this a while (ie, playing with the current setting of our FCSP through the app), I think max_amps is not the current software limit but the actual hardware limit set inside the unit.

I need to do some more digging to check this (I will break out my spare FCSP and connect it to its 12-Volt supply to power up, connect to the system and see what it reports).

Watch this space!
 
OP
OP
ericpullen

ericpullen

Well-known member
First Name
Eric
Joined
Jan 4, 2022
Threads
31
Messages
269
Reaction score
485
Location
Louisville, KY
Vehicles
22 F-150 Lightning & 22 Mach-E
I concur that the max_amps is just the hardware setting of the dial inside the unit.

I've been trying to break the boot sequence (its using a TI chipset, which uses u-boot and a Linux OS under the covers). Would be awesome to have a bench unit to see what can be done for that, right now I can only see the boot logs, but every combo I've tried to interrupt it over the UART hasn't worked (escape, spacebar, holding the letter c, ctrl-c).

I'm going to play with that USB plug and see if I can get anywhere with that, but I doubt it. I've taken the 2 UART plugs, the 485 plug, and soon the USB plug and extended it outside the unit so I don't have to keep taking that damn cover off each time to test it with my Raspberry Pi Zero. :)
Ford F-150 Lightning New FCSP API Python Library (fcsp-api) B05FEF38-FE03-4F2E-9DE3-8A673DE0D101_1_105_c
 

Sponsored

Aminorjourney

Well-known member
Joined
Jun 6, 2022
Threads
12
Messages
249
Reaction score
467
Location
Internet
Vehicles
vehicles that go
Well, that didn't take long.

I can confirm that changing the FCSP's Internet access (block at the head of the network) means you can't change the current via the FordPass app. Sure there's a way to;)
 
OP
OP
ericpullen

ericpullen

Well-known member
First Name
Eric
Joined
Jan 4, 2022
Threads
31
Messages
269
Reaction score
485
Location
Louisville, KY
Vehicles
22 F-150 Lightning & 22 Mach-E
Finally hooked up the usb port to my Pi and noticed it doing this when I had it plugged in. As soon as I unplugged it, it stopped. Wonder if it thinks it is about to get a firmware update.

 

Aminorjourney

Well-known member
Joined
Jun 6, 2022
Threads
12
Messages
249
Reaction score
467
Location
Internet
Vehicles
vehicles that go
Finally hooked up the usb port to my Pi and noticed it doing this when I had it plugged in. As soon as I unplugged it, it stopped. Wonder if it thinks it is about to get a firmware update.

Were you running any code?
 
OP
OP
ericpullen

ericpullen

Well-known member
First Name
Eric
Joined
Jan 4, 2022
Threads
31
Messages
269
Reaction score
485
Location
Louisville, KY
Vehicles
22 F-150 Lightning & 22 Mach-E
No I was just trying to see if Linux would show anything in dmesg when it was plugged in (it didn’t). I need to hook up the other uart and see if it shows anything, maybe that’s where the usb port is attached to.
 

Aminorjourney

Well-known member
Joined
Jun 6, 2022
Threads
12
Messages
249
Reaction score
467
Location
Internet
Vehicles
vehicles that go
You'd said you got a network adapter working on it, but were you powering from the port?
 

Sponsored

pjorg

Well-known member
Joined
Jan 8, 2022
Threads
2
Messages
55
Reaction score
71
Location
Connecticut
Vehicles
2023 F-150 Lightning Lariat ER
I have a FCSP that had been sealed in the box since I received it (a spare; I have another that I use to charge day-to-day). I just broke the seal and did exactly two things to it:

1. Connected 12 VDC to the BACK UP PWR IN pins, and
2. Attached a USB Ethernet adapter to the USB port

The device is definitely responding but I'm getting the Django 403 page when I try to use the Python library to query it; I am wondering if it needs to somehow go through the initial WiFi connection process first in order for the authentication stuff to begin working.

My "prod" charger has never been connected to my WiFi and I'm hoping to avoid that, so this will require some more experimentation. Also going to try to see if I can get UART working to replicate what I've seen the rest of you doing here.
 

Aminorjourney

Well-known member
Joined
Jun 6, 2022
Threads
12
Messages
249
Reaction score
467
Location
Internet
Vehicles
vehicles that go
I have a FCSP that had been sealed in the box since I received it (a spare; I have another that I use to charge day-to-day). I just broke the seal and did exactly two things to it:

1. Connected 12 VDC to the BACK UP PWR IN pins, and
2. Attached a USB Ethernet adapter to the USB port

The device is definitely responding but I'm getting the Django 403 page when I try to use the Python library to query it; I am wondering if it needs to somehow go through the initial WiFi connection process first in order for the authentication stuff to begin working.

My "prod" charger has never been connected to my WiFi and I'm hoping to avoid that, so this will require some more experimentation. Also going to try to see if I can get UART working to replicate what I've seen the rest of you doing here.
Do you see network traffic? Also, in my experience the initial connect is SLOW>
 

pjorg

Well-known member
Joined
Jan 8, 2022
Threads
2
Messages
55
Reaction score
71
Location
Connecticut
Vehicles
2023 F-150 Lightning Lariat ER
No, doesn't appear to be doing anything as far as reaching out to the mothership over the USB Ethernet port. As I said though I haven't tried to set up wifi with the app so that seems like it aligns with what others have seen.

I'm trying now to get UART to work with the A8 Debug UART port but have not yet found the correct serial configuration. I'm getting lots of gibberish on the console though, so I think I'm wired up correctly.

Can someone who has had success share all the details of their serial configuration?
 
OP
OP
ericpullen

ericpullen

Well-known member
First Name
Eric
Joined
Jan 4, 2022
Threads
31
Messages
269
Reaction score
485
Location
Louisville, KY
Vehicles
22 F-150 Lightning & 22 Mach-E
Here is my Minicom setup (115200 8N1) that is hooked up to my Raspberry Pi Zero:
Ford F-150 Lightning New FCSP API Python Library (fcsp-api) Screenshot 2025-07-05 at 2.22.06 PM
 
OP
OP
ericpullen

ericpullen

Well-known member
First Name
Eric
Joined
Jan 4, 2022
Threads
31
Messages
269
Reaction score
485
Location
Louisville, KY
Vehicles
22 F-150 Lightning & 22 Mach-E
Since its never been setup, I'm guessing its in a default state. Might be good to grab the boot log sequence and post it here just to see if there is anything we can gleam from that.

If we can ever get past the login/ssh or get to a u-boot, then there is a good chance I could decode how their Python code works and write some kind of non-connected API for it. But right now I can see that far in to the underlying Linux box to tell that.
Sponsored

 
 







Top