Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection error: Attempt 1 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found! #22

Open
Utopia69 opened this issue Jan 29, 2025 · 46 comments
Assignees
Labels
bug Something isn't working

Comments

@Utopia69
Copy link

Hi,
I'am getting an error when connecting to my Besen BS20

2025-01-29 10:37:17,298 - asyncio - DEBUG - Using selector: EpollSelector
2025-01-29 10:37:17,303 - asyncio - DEBUG - Using selector: EpollSelector
2025-01-29 10:37:17,304 - evseMQTT - INFO - Scanning for evse BLE devices...
2025-01-29 10:37:17,713 - evseMQTT - INFO - Connected to MQTT broker
2025-01-29 10:37:22,420 - evseMQTT - INFO - Found device: ACP#Utopia (9C:A5:25:BD:03:1D)
2025-01-29 10:37:22,420 - evseMQTT - INFO - Connecting...
2025-01-29 10:37:22,420 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 1
2025-01-29 10:37:36,026 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision
2025-01-29 10:37:36,026 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-01-29 10:37:36,027 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D
2025-01-29 10:37:36,027 - evseMQTT - ERROR - Attempt 1 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found!
2025-01-29 10:37:38,028 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 2
2025-01-29 10:38:12,402 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision
2025-01-29 10:38:12,403 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-01-29 10:38:12,403 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D
2025-01-29 10:38:12,403 - evseMQTT - ERROR - Attempt 2 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found!
2025-01-29 10:38:14,404 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 3
2025-01-29 10:39:08,585 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision
2025-01-29 10:39:08,585 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-01-29 10:39:08,585 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D
2025-01-29 10:39:08,586 - evseMQTT - ERROR - Attempt 3 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found!
2025-01-29 10:39:10,588 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 4
2025-01-29 10:39:17,656 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision
2025-01-29 10:39:17,656 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-01-29 10:39:17,657 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D
2025-01-29 10:39:17,657 - evseMQTT - ERROR - Attempt 4 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found!
2025-01-29 10:39:19,658 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 5
2025-01-29 10:39:28,659 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision
2025-01-29 10:39:28,659 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-01-29 10:39:28,659 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D
2025-01-29 10:39:28,659 - evseMQTT - ERROR - Attempt 5 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found!
2025-01-29 10:39:30,660 - evseMQTT - ERROR - Error encountered:
Failed to connect to 9C:A5:25:BD:03:1D after 5 attempts
2025-01-29 10:39:30,661 - evseMQTT - INFO - Message published: 1
2025-01-29 10:39:30,662 - evseMQTT - INFO - Disconnected from MQTT broker
2025-01-29 10:39:30,667 - evseMQTT - INFO - All tasks cancelled, exiting...

My BESEN BS20:

Image

Any ideas?

Thanks already

@slespersen slespersen added the bug Something isn't working label Jan 29, 2025
@slespersen slespersen self-assigned this Jan 29, 2025
@slespersen
Copy link
Owner

I’m currently on business trip, so limited what I can do right here, right now. Maybe I’ll have some time tomorrow evening or during the weekend.

Could I get you to take a look at this: #11 - specifically this comment: #11 (comment)

Your board is identified as the old revision, but the characteristics seems to be unavailable, so I’ll need a dump of the characteristics that the box provides.

@Utopia69
Copy link
Author

Utopia69 commented Jan 29, 2025

Hi,
It is a 1phase charger

python3 getServicesByAddress.py --address 9C:A5:25:BD:03:1D
2025-01-29 13:29:30,069 main INFO: starting scan...
2025-01-29 13:29:30,472 main INFO: connecting to device...
2025-01-29 13:29:32,920 main INFO: connected
2025-01-29 13:29:32,920 main INFO: [Service] 00001801-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Attribute Profile
2025-01-29 13:29:32,920 main INFO: [Characteristic] 00002a05-0000-1000-8000-00805f9b34fb (Handle: 2): Service Changed (indicate)
2025-01-29 13:29:33,626 main INFO: [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 4): Client Characteristic Configuration, Value: '\x02\x00'
2025-01-29 13:29:33,626 main INFO: [Service] 0003cdd0-0000-1000-8000-00805f9b0131 (Handle: 12): Unknown
2025-01-29 13:29:33,627 main INFO: [Characteristic] 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown (notify)
2025-01-29 13:29:33,851 main INFO: [Descriptor] 00002902-0000-1000-8000-00805f9b34fb (Handle: 15): Client Characteristic Configuration, Value: '\x00\x00'
2025-01-29 13:29:33,851 main INFO: [Characteristic] 0003cdd2-0000-1000-8000-00805f9b0131 (Handle: 16): Unknown (write-without-response,write), Max write w/o rsp size: 155
2025-01-29 13:29:33,851 main INFO: disconnecting...
2025-01-29 13:29:35,833 main INFO: disconnected

Hope it helps.
Grtz,

@slespersen
Copy link
Owner

I've committed a couple of changes.

I'm a bit unsure if it'll fix the problem. It's the most slim service overview I've seen so far, but at least the different characteristics providing notify and write, have been added.

Please look for "Device ({address}) identified as other revision" in the log -- debug isn't needed at this point.

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

Hi,
I use the HA addon https://github.com/moryoav/evsemqtt-ha on Home Assistant OS
I'm still getting "old revision"
2025-02-01 19:34:02,387 - evseMQTT - INFO - Connected to MQTT broker
2025-02-01 19:34:07,045 - evseMQTT - INFO - Found device: ACP#Utopia (9C:A5:25:BD:03:1D)
2025-02-01 19:34:07,045 - evseMQTT - INFO - Connecting...
2025-02-01 19:34:07,045 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 1
2025-02-01 19:34:08,362 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision
2025-02-01 19:34:08,362 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-02-01 19:34:08,362 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D
2025-02-01 19:34:08,363 - evseMQTT - ERROR - Attempt 1 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found!
Already removed the addon and reinstalled

@slespersen
Copy link
Owner

Shouldn't be a problem, as the evsemqtt-ha has this:
image: "ghcr.io/slespersen/evsemqtt"

I've updated with another check instead.

Give it a shot.

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

Hi,
Still nothing
2025-02-01 21:43:26,906 - evseMQTT - INFO - Scanning for evse BLE devices... 2025-02-01 21:43:27,315 - evseMQTT - INFO - Connected to MQTT broker 2025-02-01 21:43:31,950 - evseMQTT - INFO - Found device: ACP#Utopia (9C:A5:25:BD:03:1D) 2025-02-01 21:43:31,950 - evseMQTT - INFO - Connecting... 2025-02-01 21:43:31,950 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 1 2025-02-01 21:43:54,681 - evseMQTT - ERROR - Attempt 1 failed with BleakError: failed to discover services, device disconnected 2025-02-01 21:43:56,684 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 2 2025-02-01 21:44:00,562 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision 2025-02-01 21:44:00,562 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D 2025-02-01 21:44:00,562 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D 2025-02-01 21:44:00,562 - evseMQTT - ERROR - Attempt 2 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found! 2025-02-01 21:44:02,564 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 3 2025-02-01 21:44:07,692 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision 2025-02-01 21:44:07,692 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D 2025-02-01 21:44:07,692 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D 2025-02-01 21:44:07,692 - evseMQTT - ERROR - Attempt 3 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found! 2025-02-01 21:44:09,695 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 4 2025-02-01 21:44:10,774 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as old revision 2025-02-01 21:44:10,774 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D 2025-02-01 21:44:10,774 - evseMQTT - INFO - Starting notifications for 0000fff1-0000-1000-8000-00805f9b34fb on 9C:A5:25:BD:03:1D 2025-02-01 21:44:10,775 - evseMQTT - ERROR - Attempt 4 failed with BleakError: Characteristic 0000fff1-0000-1000-8000-00805f9b34fb not found! 2025-02-01 21:44:12,776 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 5

@slespersen
Copy link
Owner

Okay - I've dumbed it down even further, to only check for the service UUID 0003cdd0-0000-1000-8000-00805f9b0131 - which seems to be unique for the board revision you're running.

In a couple of minutes, the new build should be available.

I'm not into the whole HA addon thing - but if there's a way for you to force, that the latest image is being pulled, that should be enabled.

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

It is connecting now, but I get another error in the logs:
2025-02-01 22:35:20,371 - evseMQTT - INFO - Connected to MQTT broker 2025-02-01 22:35:20,374 - evseMQTT - INFO - Scanning for evse BLE devices... 2025-02-01 22:35:25,511 - evseMQTT - INFO - Found device: ACP#Utopia (9C:A5:25:BD:03:1D) 2025-02-01 22:35:25,512 - evseMQTT - INFO - Connecting... 2025-02-01 22:35:25,512 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 1 2025-02-01 22:35:37,828 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as other revision 2025-02-01 22:35:37,828 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D 2025-02-01 22:35:37,828 - evseMQTT - INFO - Starting notifications for 0003cdd1-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:38,040 - evseMQTT - INFO - Notifications started for 0003cdd1-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:38,040 - evseMQTT - INFO - Connected. 2025-02-01 22:35:38,040 - evseMQTT - INFO - Waiting for device initialization... 2025-02-01 22:35:38,040 - evseMQTT - INFO - Device not initialized yet, waiting... 2025-02-01 22:35:39,042 - evseMQTT - INFO - Device not initialized yet, waiting... 2025-02-01 22:35:40,044 - evseMQTT - INFO - Device not initialized yet, waiting... 2025-02-01 22:35:40,382 - evseMQTT - INFO - Received command 1 2025-02-01 22:35:40,382 - evseMQTT - INFO - Device sent login banner - requesting login 2025-02-01 22:35:40,382 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:40,384 - evseMQTT - INFO - Write complete 2025-02-01 22:35:40,384 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:40,389 - evseMQTT - INFO - Write complete 2025-02-01 22:35:40,390 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:40,391 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,045 - evseMQTT - INFO - Device initialized with serial: 8949281891483449. Proceeding with login request. 2025-02-01 22:35:41,045 - evseMQTT - INFO - Waiting for software version... 2025-02-01 22:35:41,054 - evseMQTT - INFO - Received command 2 2025-02-01 22:35:41,055 - evseMQTT - INFO - Device accepted login request 2025-02-01 22:35:41,055 - evseMQTT - INFO - Device sent response to login request - confirming login 2025-02-01 22:35:41,055 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,057 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,057 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,059 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,059 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,060 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,060 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,061 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,062 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,063 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,063 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,064 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,064 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,065 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,065 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,066 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,066 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D 2025-02-01 22:35:41,067 - evseMQTT - INFO - Write complete 2025-02-01 22:35:41,099 - evseMQTT - INFO - Received command 16965 2025-02-01 22:35:41,235 - evseMQTT - INFO - Received command 3842 2025-02-01 22:35:41,237 - evseMQTT - INFO - Received command 261 2025-02-01 22:35:41,371 - evseMQTT - INFO - Received command 4 2025-02-01 22:35:41,372 - evseMQTT - INFO - Device sent a single charge ac status 2025-02-01 22:35:41,374 - evseMQTT - INFO - Message published: 1 2025-02-01 22:35:41,599 - evseMQTT - INFO - Received command 46119 2025-02-01 22:35:41,689 - evseMQTT - INFO - Received command 0 2025-02-01 22:35:41,821 - evseMQTT - INFO - Received command 44559 2025-02-01 22:35:41,956 - evseMQTT - INFO - Received command 271 2025-02-01 22:35:41,956 - evseMQTT - INFO - Device responded with 271, containing {'language': 'English'} 2025-02-01 22:35:41,957 - evseMQTT - INFO - Message published: 2 2025-02-01 22:35:42,046 - evseMQTT - INFO - Waiting for software version... 2025-02-01 22:35:42,134 - evseMQTT - INFO - Received command 257 2025-02-01 22:35:42,135 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-01T22:35:41', 'system_time_raw': 1738445741} 2025-02-01 22:35:42,135 - evseMQTT - INFO - Message published: 3 2025-02-01 22:35:42,360 - evseMQTT - INFO - Received command 13 2025-02-01 22:35:42,360 - evseMQTT - INFO - Device sent a single charge ac status 2025-02-01 22:35:42,361 - evseMQTT - INFO - Message published: 4 2025-02-01 22:35:43,047 - evseMQTT - INFO - Waiting for software version... 2025-02-01 22:35:44,048 - evseMQTT - INFO - Waiting for software version... 2025-02-01 22:35:44,297 - evseMQTT - INFO - Received command 10 2025-02-01 22:35:44,297 - asyncio - ERROR - Task exception was never retrieved future: <Task finished name='Task-19' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')> Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper await self.event_handler.handle_notification(sender, data) File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification data = handler(parsed_data['data'], parsed_data['identifier']) File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record "start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2), ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8) ~~~~~^^^ IndexError: index out of range

@slespersen
Copy link
Owner

slespersen commented Feb 1, 2025

Woah. That's something else.

So a couple of obersvations:

  1. Software version does not seem to be retrieved, as we keep waiting for it according to the logs.
  2. Utils.bytes_to_int_little seems to receive a byte array shorter than the expected -- that might require some additional debugging to be enabled, in order to handle.
  3. There's messages in there I haven't seen before -- in general, I haven't seen anything above 33122; you're getting 16965, 46119 and 44559.

The above will require, that additional debug facilities are implemented, so that non-documented (according to my research) commands, can be logged in full, in a separate file.

What version of the EVSE Master app are you using on your phone?

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

I'am using app version 2.1.25
Do you need debug logs?

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

In mqtt I get:
{"charge_amps": null, "rssi": -74, "lcd_brightness": null, "system_time": "2025-02-01T23:34:51", "system_time_raw": 1738449291, "temperature_unit": "Celcius", "language": null, "device_name": null} {"line_id": 1, "error_info": "0000000000000000", "error_details": "No Error", "l1_voltage": 235.5, "l1_amperage": 0.0, "l2_voltage": 384.2, "l2_amperage": 0.3, "l3_voltage": 13.7, "l3_amperage": 187.3, "total_energy": 0.0, "current_amount": 4100.8, "inner_temp_c": 12.8, "inner_temp_f": 55.04, "outer_temp": 12.8, "emergency_btn_state": 1, "plug_state": "Connected Unlocked", "output_state": "Idle", "current_state": "Unknown 7", "new_protocol": 0, "current_energy": 0, "charging_status": "Finished", "charging_status_description": "Charging completed", "charger_status": 0}

@slespersen
Copy link
Owner

Well, something is off.

The amperage is weird -- 187A is quite extreme for a 32A rated device.
Language and device_name is missing.

I might need to decompile 2.1.25 -- I haven't been in there since 2.1.22, so they might have added something new.

How old is the wallbox?

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

The wallbox is from May 2021. It is a single phase
So the there should only be readings on L1
Maybe the high numbers have something to with the schedule?
I have a schedule to start at 3am and stop at 6am for 7 days a week

@slespersen
Copy link
Owner

Strange - then we should not get any readings for L2 and L3.

I would be surprised if the scheduling had anything to say, as we shouldn't be parsing any of the charging strategies.

Would you by any chance be running android on your phone?

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

Yes, running on android

@slespersen
Copy link
Owner

Any chance you'd be willing to do a Bluetooth HCI packet dump?

I'm not seeing any reference to either the UUID (0003cdd0) or the commands that appeared in the log you shared.

The packet dump would help me in terms of figuring out, what goes on.

@Utopia69
Copy link
Author

Utopia69 commented Feb 1, 2025

No problem, how do I do that?
I will try tomorrow

@slespersen
Copy link
Owner

You'll find a guide here: Retrieving the HCI Log

It requires the developer options to be enabled.

@Utopia69
Copy link
Author

Utopia69 commented Feb 2, 2025

btsnoop_hci.log
Hope it helps

@slespersen
Copy link
Owner

Perfect - thanks.

I'll have a look through it -- might take a while, but I'll get back ASAP.

@slespersen
Copy link
Owner

slespersen commented Feb 2, 2025

So, a few observations.

  1. Command 262 - getVersionResponse returns a whole lot of zeroes -- two responses seems to have been sent, with the first being pure zeroes and the second containing more ... hmm, valid data but no actual software version -- this will break the MQTT discovery payloads, and explain why the log keeps mentioning "Waiting for software version...".
  2. Command 0 -- which doesn't exist, seems to have been sent two times. Some data seems to be consistent between the messages, but no actual useful payload. These should automatically be skipped by this library, as they do not conform to the protocol definition.
  3. Command 21317 -- which doesn't exist, and isn't referenced in the app code, but seems to be a misinterpreted version of Command 1 - Login; both contains the banner for www.evse.com.

I'm wondering if the parser is too lax, and thus allows for corrupted packages to come through.

We might need a separate branch, in order to handle this, as it supposedly will be somewhat of a development/research effort.

As a test - would it be possible to disable the schedule, just to remove that possibility?

Lastly - when was the wallbox last rebooted?

@Utopia69
Copy link
Author

Utopia69 commented Feb 3, 2025

Hi, a new log, without the scheduling enabled
btsnoop_hci.log
The wallbox was rebooted yesterday (before the previous logfile).

@slespersen
Copy link
Owner

slespersen commented Feb 3, 2025

I'll sift through the log later tonight.

Have you tried connecting with the library after disabling the schedules? Just out of curiosity 😄

I'll admit to not having used EVSEMaster enough, to figure out how the whole scheduling part works - so haven't tested with it.

@Utopia69
Copy link
Author

Utopia69 commented Feb 3, 2025

Hi,
It library is still connecting (with schedule enabled again), sometimes the wallbox is available , but is stops after some time and also the addon is stopped.
log:

Starting evseMQTT ...
2025-02-03 19:54:04,791 - asyncio - DEBUG - Using selector: EpollSelector
2025-02-03 19:54:04,797 - asyncio - DEBUG - Using selector: EpollSelector
2025-02-03 19:54:04,798 - evseMQTT - INFO - Scanning for evse BLE devices...
2025-02-03 19:54:04,892 - evseMQTT - INFO - Connected to MQTT broker
2025-02-03 19:54:09,907 - evseMQTT - INFO - Found device: ACP#Utopia (9C:A5:25:BD:03:1D)
2025-02-03 19:54:09,907 - evseMQTT - INFO - Connecting...
2025-02-03 19:54:09,907 - evseMQTT - INFO - Connecting to 9C:A5:25:BD:03:1D, attempt 1
2025-02-03 19:54:11,827 - evseMQTT - INFO - Device (9C:A5:25:BD:03:1D) identified as other revision
2025-02-03 19:54:11,828 - evseMQTT - INFO - Connected to 9C:A5:25:BD:03:1D
2025-02-03 19:54:11,828 - evseMQTT - INFO - Starting notifications for 0003cdd1-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:12,111 - evseMQTT - INFO - Notifications started for 0003cdd1-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:12,112 - evseMQTT - INFO - Connected.
2025-02-03 19:54:12,112 - evseMQTT - INFO - Waiting for device initialization...
2025-02-03 19:54:12,112 - evseMQTT - INFO - Device not initialized yet, waiting...
2025-02-03 19:54:12,251 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00_\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x01\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfc\x0f\x02')
2025-02-03 19:54:12,251 - evseMQTT - INFO - Received command 1
2025-02-03 19:54:12,251 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00_', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 1, 'data': b'\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00', 'checksum': b'\x11\xfc', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:12,251 - evseMQTT - DEBUG - Parsed data
{'serial': '8949281891483449', 'type': 1, 'phases': 1, 'manufacturer': 'BESEN', 'model': 'BS20', 'hardware_version': 'C.3252.112A00\x00\x00\x00', 'output_power': 7040, 'output_max_amps': 32, 'support': 'WWW.EVSE.COM'}
2025-02-03 19:54:12,252 - evseMQTT - INFO - Device sent login banner - requesting login
2025-02-03 19:54:12,252 - evseMQTT - DEBUG - Generated command for: 32770 - login_request
bytearray(b'\x06\x01\x00\x19\x009\xff"\x10S\xcb\x1f\x00221278\x80\x02\x04\x7f\x0f\x02')
2025-02-03 19:54:12,252 - evseMQTT - DEBUG - Generated command for: 33028 - set_charge_fee
bytearray(b'\x06\x01\x00\x1d\x009\xff"\x10S\xcb\x1f\x00221278\x81\x04\x01\x01\x00\x00\x04\x88\x0f\x02')
2025-02-03 19:54:12,252 - evseMQTT - DEBUG - Generated command for: 33029 - set_charge_service_fee
bytearray(b'\x06\x01\x00\x1d\x009\xff"\x10S\xcb\x1f\x00221278\x81\x05\x01\x01\x00\x00\x04\x89\x0f\x02')
2025-02-03 19:54:12,252 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:12,254 - evseMQTT - INFO - Write complete
2025-02-03 19:54:12,254 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:12,255 - evseMQTT - INFO - Write complete
2025-02-03 19:54:12,256 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:12,257 - evseMQTT - INFO - Write complete
2025-02-03 19:54:12,471 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06')
2025-02-03 19:54:12,471 - evseMQTT - INFO - Received command 0
2025-02-03 19:54:12,472 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x06', 'reserved': b'', 'identifier': '', 'password': b'', 'cmd': 0, 'data': b'', 'checksum': b'\x06', 'end_byte': b'\x01\x06'}
2025-02-03 19:54:12,607 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x01\x00_\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x02\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfd\x0f\x02\x06\x01\x00_\x00\x89')
2025-02-03 19:54:12,607 - evseMQTT - INFO - Received command 65280
2025-02-03 19:54:12,607 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x01\x00', 'reserved': b'', 'identifier': '0089492818914834', 'password': b'I\xff\xff\xff\xff\xff', 'cmd': 65280, 'data': b'\x02\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfd\x0f\x02', 'checksum': b'\x00', 'end_byte': b'\x00\x89'}
2025-02-03 19:54:12,787 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x01\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfc\x0f\x02\x06\x01\x00\x1d\x00\x89I(\x18\x91H')
2025-02-03 19:54:12,788 - evseMQTT - INFO - Received command 17747
2025-02-03 19:54:12,789 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'I(', 'reserved': b'\x18', 'identifier': '91483449FFFFFFFF', 'password': b'\xff\xff\x00\x01\x01B', 'cmd': 17747, 'data': b'EN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfc\x0f\x02\x00\x1d\x00\x89I', 'checksum': b'(\x18', 'end_byte': b'\x91H'}
2025-02-03 19:54:12,789 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'4I\xff\xff\xff\xff\xff\xff\x01\x04\x01\x01\x00\x00\x08\x8d\x0f\x02')
2025-02-03 19:54:12,789 - evseMQTT - INFO - Received command 2
2025-02-03 19:54:12,789 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'4I', 'reserved': b'\xff', 'identifier': 'FFFFFFFFFF010401', 'password': b'\x01\x00\x00\x08\x8d\x0f', 'cmd': 2, 'data': b'', 'checksum': b'\x08\x8d', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:12,789 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1d\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x05\x01\x01\x00\x00\x08\x8e\x0f\x02')
2025-02-03 19:54:12,789 - evseMQTT - INFO - Received command 261
2025-02-03 19:54:12,789 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1d', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 261, 'data': b'\x01\x01\x00\x00', 'checksum': b'\x08\x8e', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:12,789 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-11' coro=<BLEManager.handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 22, in login_response
"type": data[0],
~~~~^^^
IndexError: index out of range
2025-02-03 19:54:13,113 - evseMQTT - INFO - Device initialized with serial: 8949281891483449. Proceeding with login request.
2025-02-03 19:54:13,113 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:14,114 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:15,115 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:15,399 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00
\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x01\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfc\x0f\x02')
2025-02-03 19:54:15,400 - evseMQTT - INFO - Received command 1
2025-02-03 19:54:15,400 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00
', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 1, 'data': b'\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00', 'checksum': b'\x11\xfc', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:15,400 - evseMQTT - DEBUG - Parsed data
{'serial': '8949281891483449', 'type': 1, 'phases': 1, 'manufacturer': 'BESEN', 'model': 'BS20', 'hardware_version': 'C.3252.112A00\x00\x00\x00', 'output_power': 7040, 'output_max_amps': 32, 'support': 'WWW.EVSE.COM'}
2025-02-03 19:54:15,401 - evseMQTT - INFO - Device sent login banner - requesting login
2025-02-03 19:54:15,401 - evseMQTT - DEBUG - Generated command for: 32770 - login_request
bytearray(b'\x06\x01\x00\x19\x009\xff"\x10S\xcb\x1f\x00221278\x80\x02\x04\x7f\x0f\x02')
2025-02-03 19:54:15,401 - evseMQTT - DEBUG - Generated command for: 33028 - set_charge_fee
bytearray(b'\x06\x01\x00\x1d\x009\xff"\x10S\xcb\x1f\x00221278\x81\x04\x01\x01\x00\x00\x04\x88\x0f\x02')
2025-02-03 19:54:15,402 - evseMQTT - DEBUG - Generated command for: 33029 - set_charge_service_fee
bytearray(b'\x06\x01\x00\x1d\x009\xff"\x10S\xcb\x1f\x00221278\x81\x05\x01\x01\x00\x00\x04\x89\x0f\x02')
2025-02-03 19:54:15,403 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,407 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,407 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,410 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,410 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,411 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,579 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00_\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x02\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfd\x0f\x02\x06\x01\x00_\x00')
2025-02-03 19:54:15,579 - evseMQTT - INFO - Received command 2
2025-02-03 19:54:15,580 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00_', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 2, 'data': b'\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfd\x0f', 'checksum': b'\x02\x00', 'end_byte': b'_\x00'}
2025-02-03 19:54:15,580 - evseMQTT - DEBUG - Parsed data
{'serial': '8949281891483449', 'type': 1, 'phases': 1, 'manufacturer': 'BESEN', 'model': 'BS20', 'hardware_version': 'C.3252.112A00\x00\x00\x00', 'output_power': 7040, 'output_max_amps': 32, 'support': 'WWW.EVSE.COM'}
2025-02-03 19:54:15,580 - evseMQTT - INFO - Device accepted login request
2025-02-03 19:54:15,580 - evseMQTT - INFO - Device sent response to login request - confirming login
2025-02-03 19:54:15,580 - evseMQTT - DEBUG - Generated command for: 32769 - login_confirm
bytearray(b'\x06\x01\x00\x1a\x009\xff"\x10S\xcb\x1f\x00221278\x80\x01\x01\x04\x80\x0f\x02')
2025-02-03 19:54:15,581 - evseMQTT - DEBUG - Generated command for: 33042 - get_config_temperature_unit
bytearray(b'\x06\x01\x00\x1b\x009\xff"\x10S\xcb\x1f\x00221278\x81\x12\x02\x00\x04\x94\x0f\x02')
2025-02-03 19:54:15,581 - evseMQTT - DEBUG - Generated command for: 33030 - get_config_version
bytearray(b'\x06\x01\x00\x19\x009\xff"\x10S\xcb\x1f\x00221278\x81\x06\x04\x84\x0f\x02')
2025-02-03 19:54:15,581 - evseMQTT - DEBUG - Generated command for: 33032 - get_config_name
bytearray(b'\x06\x01\x00\x1b\x009\xff"\x10S\xcb\x1f\x00221278\x81\x08\x02\x00\x04\x8a\x0f\x02')
2025-02-03 19:54:15,581 - evseMQTT - DEBUG - Generated command for: 33031 - get_config_output_amps
bytearray(b'\x06\x01\x00\x1b\x009\xff"\x10S\xcb\x1f\x00221278\x81\x07\x02\x00\x04\x89\x0f\x02')
2025-02-03 19:54:15,581 - evseMQTT - DEBUG - Generated command for: 33039 - get_config_language
bytearray(b'\x06\x01\x00\x1b\x009\xff"\x10S\xcb\x1f\x00221278\x81\x0f\x02\x00\x04\x91\x0f\x02')
2025-02-03 19:54:15,581 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,582 - evseMQTT - DEBUG - Generated command for: 33122 - get_config_lcd_brightness
bytearray(b'\x06\x01\x00!\x009\xff"\x10S\xcb\x1f\x00221278\x81b\x00\x01\x00\x01\x00\x00\x00\x00\x04\xea\x0f\x02')
2025-02-03 19:54:15,582 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,582 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,583 - evseMQTT - DEBUG - Generated command for: 33025 - set_config_time
bytearray(b'\x06\x01\x00\x1e\x009\xff"\x10S\xcb\x1f\x00221278\x81\x01\x01g\xa0\xaeg\x06\xa1\x0f\x02')
2025-02-03 19:54:15,583 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,584 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,584 - evseMQTT - DEBUG - Generated command for: 32781 - get_charge_status_record
bytearray(b'\x06\x01\x00\x19\x009\xff"\x10S\xcb\x1f\x00221278\x80\r\x04\x8a\x0f\x02')
2025-02-03 19:54:15,584 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,585 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,585 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,585 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,586 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,586 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,587 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,587 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,588 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,588 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,588 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,588 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:15,589 - evseMQTT - INFO - Write complete
2025-02-03 19:54:15,672 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x01\x01BESEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00\x11\xfc\x0f\x02')
2025-02-03 19:54:15,672 - evseMQTT - INFO - Received command 16965
2025-02-03 19:54:15,672 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x89I', 'reserved': b'(', 'identifier': '1891483449FFFFFF', 'password': b'\xff\xff\xff\x00\x01\x01', 'cmd': 16965, 'data': b'SEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00BS20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00C.3252.112A00\x00\x00\x00\x00\x00\x1b\x80 WWW.EVSE.COM\x00\x00\x00\x00', 'checksum': b'\x11\xfc', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:15,893 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1d\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x04\x01\x01\x00\x00\x08\x8d\x0f\x02\x06\x01\x00\x1d\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x05\x01\x01\x00\x00\x08\x8e\x0f\x02\x06\x01\x000\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x04\x01\t\x1b\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xb9S\xb9\x01\x02\x02\r')
2025-02-03 19:54:15,893 - evseMQTT - INFO - Received command 260
2025-02-03 19:54:15,893 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1d', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 260, 'data': b'\x01\x01\x00\x00\x08\x8d\x0f\x02\x00\x1d\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x05\x01\x01\x00\x00\x08\x8e\x0f\x02\x000\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x04\x01\t\x1b\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xb9S\xb9', 'checksum': b'\x01\x02', 'end_byte': b'\x02\r'}
2025-02-03 19:54:15,937 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x00\x00\x0c\x1e\x0f\x02')
2025-02-03 19:54:15,938 - evseMQTT - INFO - Received command 0
2025-02-03 19:54:15,938 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x00', 'reserved': b'\x0c', 'identifier': '1E0F02', 'password': b'', 'cmd': 0, 'data': b'', 'checksum': b'\x0c\x1e', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:15,940 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1b\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x12\x02\x01\x08\x9a\x0f\x02\x06\x01\x00c\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x05\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g\xa0F\xc9\x00')
2025-02-03 19:54:15,941 - evseMQTT - INFO - Received command 274
2025-02-03 19:54:15,941 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1b', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 274, 'data': b'\x02\x01\x08\x9a\x0f\x02\x00c\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x05\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g', 'checksum': b'\xa0F', 'end_byte': b'\xc9\x00'}
2025-02-03 19:54:15,941 - evseMQTT - DEBUG - Parsed data
{'temperature_unit': 'Celcius'}
2025-02-03 19:54:15,941 - evseMQTT - INFO - Device responded with 274, containing {'temperature_unit': 'Celcius'}
2025-02-03 19:54:15,943 - evseMQTT - INFO - Message published: 1
2025-02-03 19:54:16,117 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:16,251 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x00\x11\xde\x00\x06D\x80\x00\x06E\xe7\x00\x00\x01g\x00\x00\x00\x00\x01\x00\x00\x1c\x97\x0f\x02\x06\x01\x00=\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xaf\xe5\xd0\x0b\x17\x0f\x02')
2025-02-03 19:54:16,251 - evseMQTT - INFO - Received command 0
2025-02-03 19:54:16,252 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x11', 'reserved': b'\xde', 'identifier': '00064480000645E7', 'password': b'\x00\x00\x01g\x00\x00', 'cmd': 0, 'data': b'\x01\x00\x00\x1c\x97\x0f\x02\x00=\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xaf\xe5\xd0', 'checksum': b'\x0b\x17', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:16,613 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02\x06\x01\x00\x1b\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x07\x02 \x08\xae\x0f\x02\x06\x01\x00\x1b\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x0f\x02\x01\x08\x97\x0f\x02')
2025-02-03 19:54:16,613 - evseMQTT - INFO - Received command 65535
2025-02-03 19:54:16,613 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\xff\xff', 'reserved': b'\xff', 'identifier': 'FFFFFFFFFFFFFFFF', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 65535, 'data': b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02\x00\x1b\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x07\x02 \x08\xae\x0f\x02\x00\x1b\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x0f\x02\x01', 'checksum': b'\x08\x97', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:16,616 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1e\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x01\x01g\xa0\xaeg\n\xa6\x0f\x02')
2025-02-03 19:54:16,616 - evseMQTT - INFO - Received command 257
2025-02-03 19:54:16,616 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1e', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 257, 'data': b'\x01g\xa0\xaeg', 'checksum': b'\n\xa6', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:16,616 - evseMQTT - DEBUG - Parsed data
{'system_time': '2025-02-03T19:54:15', 'system_time_raw': 1738608855}
2025-02-03 19:54:16,616 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-03T19:54:15', 'system_time_raw': 1738608855}
2025-02-03 19:54:16,618 - evseMQTT - INFO - Message published: 2
2025-02-03 19:54:16,838 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x000\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\r\x01\t\x1b\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xbdS\xbd\x01\x02\x02\r\x00\x00\x0c/\x0f\x02')
2025-02-03 19:54:16,839 - evseMQTT - INFO - Received command 13
2025-02-03 19:54:16,839 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x000', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 13, 'data': b'\x01\t\x1b\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xbdS\xbd\x01\x02\x02\r\x00\x00', 'checksum': b'\x0c/', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:16,840 - evseMQTT - DEBUG - Parsed data
{'line_id': 1, 'error_info': '0000000000000000', 'error_details': 'No Error', 'l1_voltage': 233.1, 'l1_amperage': 0.0, 'total_energy': 0.0, 'current_amount': 4111.1, 'inner_temp_c': 14.4, 'inner_temp_f': 57.92, 'outer_temp': 14.4, 'emergency_btn_state': 1, 'plug_state': 'Connected Unlocked', 'output_state': 'Idle', 'current_state': 'Charging', 'new_protocol': 0, 'charging_status': 'Start', 'charging_status_description': 'EV is connected, please press start', 'charger_status': 0, 'current_energy': 0}
2025-02-03 19:54:16,840 - evseMQTT - INFO - Device sent a single charge ac status
2025-02-03 19:54:16,840 - evseMQTT - INFO - Message published: 3
2025-02-03 19:54:17,119 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:18,119 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:18,771 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x19\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x03\x08\x85\x0f\x02')
2025-02-03 19:54:18,771 - evseMQTT - INFO - Received command 3
2025-02-03 19:54:18,771 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x19', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 3, 'data': b'', 'checksum': b'\x08\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:18,772 - evseMQTT - INFO - Device sent heartbeat - replying
2025-02-03 19:54:18,772 - evseMQTT - DEBUG - Generated command for: 32771 - heartbeat
bytearray(b'\x06\x01\x00\x1a\x009\xff"\x10S\xcb\x1f\x00221278\x80\x03\x01\x04\x82\x0f\x02')
2025-02-03 19:54:18,772 - evseMQTT - DEBUG - Generated command for: 33025 - set_config_time
bytearray(b'\x06\x01\x00\x1e\x009\xff"\x10S\xcb\x1f\x00221278\x81\x01\x01g\xa0\xaej\x06\xa4\x0f\x02')
2025-02-03 19:54:18,773 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:18,776 - evseMQTT - INFO - Write complete
2025-02-03 19:54:18,776 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:18,777 - evseMQTT - INFO - Write complete
2025-02-03 19:54:19,120 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:19,356 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1e\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x01\x01g\xa0\xaej\n\xa9\x0f\x02')
2025-02-03 19:54:19,356 - evseMQTT - INFO - Received command 257
2025-02-03 19:54:19,356 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1e', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 257, 'data': b'\x01g\xa0\xaej', 'checksum': b'\n\xa9', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:19,357 - evseMQTT - DEBUG - Parsed data
{'system_time': '2025-02-03T19:54:18', 'system_time_raw': 1738608858}
2025-02-03 19:54:19,357 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-03T19:54:18', 'system_time_raw': 1738608858}
2025-02-03 19:54:19,357 - evseMQTT - INFO - Message published: 4
2025-02-03 19:54:20,122 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:21,123 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:22,124 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:23,127 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:23,228 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b"\x06\x01\x00\xb4\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\n\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*0\x00\x06A") 2025-02-03 19:54:23,228 - evseMQTT - INFO - Received command 10 2025-02-03 19:54:23,228 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\\W:0\\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}
2025-02-03 19:54:23,229 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-25' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record
"start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2),
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little
return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8)
~~~~~^^^
IndexError: index out of range
2025-02-03 19:54:23,273 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'V\x00\x06A\xe2\x00\x00\x00\x8c\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02')
2025-02-03 19:54:23,274 - evseMQTT - INFO - Received command 2048
2025-02-03 19:54:23,274 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:24,127 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:25,128 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:26,130 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:27,132 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:28,133 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:28,806 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x19\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x03\x08\x85\x0f\x02')
2025-02-03 19:54:28,806 - evseMQTT - INFO - Received command 3
2025-02-03 19:54:28,806 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x19', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 3, 'data': b'', 'checksum': b'\x08\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:28,807 - evseMQTT - INFO - Device sent heartbeat - replying
2025-02-03 19:54:28,807 - evseMQTT - DEBUG - Generated command for: 32771 - heartbeat
bytearray(b'\x06\x01\x00\x1a\x009\xff"\x10S\xcb\x1f\x00221278\x80\x03\x01\x04\x82\x0f\x02')
2025-02-03 19:54:28,807 - evseMQTT - DEBUG - Generated command for: 33025 - set_config_time
bytearray(b'\x06\x01\x00\x1e\x009\xff"\x10S\xcb\x1f\x00221278\x81\x01\x01g\xa0\xaet\x06\xae\x0f\x02')
2025-02-03 19:54:28,807 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:28,808 - evseMQTT - INFO - Write complete
2025-02-03 19:54:28,808 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:28,808 - evseMQTT - INFO - Write complete
2025-02-03 19:54:29,079 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1e\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x01\x01g\xa0\xaet\n\xb3\x0f\x02\x06\x01\x00c\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x05\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g\xa0')
2025-02-03 19:54:29,079 - evseMQTT - INFO - Received command 257
2025-02-03 19:54:29,081 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1e', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 257, 'data': b'\x01g\xa0\xaet\n\xb3\x0f\x02\x00c\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x05\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00', 'checksum': b'\x00 ', 'end_byte': b'g\xa0'}
2025-02-03 19:54:29,081 - evseMQTT - DEBUG - Parsed data
{'system_time': '2025-02-03T19:54:28', 'system_time_raw': 1738608868}
2025-02-03 19:54:29,081 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-03T19:54:28', 'system_time_raw': 1738608868}
2025-02-03 19:54:29,082 - evseMQTT - INFO - Message published: 5
2025-02-03 19:54:29,134 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:29,166 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'F\xc9\x00\x00\x11\xde\x00\x06D\x80\x00\x06E\xe7\x00\x00\x01g\x00\x00\x00\x00\x01\x00\x00\x1c\x97\x0f\x02')
2025-02-03 19:54:29,166 - evseMQTT - INFO - Received command 26368
2025-02-03 19:54:29,166 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'F\xc9', 'reserved': b'\x00', 'identifier': '0011DE0006448000', 'password': b'\x06E\xe7\x00\x00\x01', 'cmd': 26368, 'data': b'\x00\x00\x00\x01\x00\x00', 'checksum': b'\x1c\x97', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:30,135 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:30,202 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b"\x06\x01\x00\xb4\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\n\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*0\x00\x06A") 2025-02-03 19:54:30,202 - evseMQTT - INFO - Received command 10 2025-02-03 19:54:30,203 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\\W:0\\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}
2025-02-03 19:54:30,203 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-30' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record
"start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2),
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little
return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8)
~~~~~^^^
IndexError: index out of range
2025-02-03 19:54:30,429 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'V\x00\x06A\xe2\x00\x00\x00\x8c\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02')
2025-02-03 19:54:30,429 - evseMQTT - INFO - Received command 2048
2025-02-03 19:54:30,429 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:31,102 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x000\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x04\x01\t\x19\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xb9S\xb9\x01\x02\x02\r\x00\x00\x0c\x1c\x0f\x02')
2025-02-03 19:54:31,102 - evseMQTT - INFO - Received command 4
2025-02-03 19:54:31,102 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x000', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 4, 'data': b'\x01\t\x19\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xb9S\xb9\x01\x02\x02\r\x00\x00', 'checksum': b'\x0c\x1c', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:31,103 - evseMQTT - DEBUG - Parsed data
{'line_id': 1, 'error_info': '0000000000000000', 'error_details': 'No Error', 'l1_voltage': 232.9, 'l1_amperage': 0.0, 'total_energy': 0.0, 'current_amount': 4111.1, 'inner_temp_c': 14.3, 'inner_temp_f': 57.74, 'outer_temp': 14.3, 'emergency_btn_state': 1, 'plug_state': 'Connected Unlocked', 'output_state': 'Idle', 'current_state': 'Charging', 'new_protocol': 0, 'charging_status': 'Start', 'charging_status_description': 'EV is connected, please press start', 'charger_status': 0, 'current_energy': 0}
2025-02-03 19:54:31,103 - evseMQTT - INFO - Device sent a single charge ac status
2025-02-03 19:54:31,103 - evseMQTT - INFO - Message published: 6
2025-02-03 19:54:31,136 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:32,137 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:33,138 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:34,139 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:35,140 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:36,141 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:37,142 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:37,177 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b"\x06\x01\x00\xb4\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\n\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*0\x00\x06A") 2025-02-03 19:54:37,177 - evseMQTT - INFO - Received command 10 2025-02-03 19:54:37,177 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\\W:0\\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}
2025-02-03 19:54:37,178 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-33' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record
"start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2),
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little
return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8)
~~~~~^^^
IndexError: index out of range
2025-02-03 19:54:37,446 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'V\x00\x06A\xe2\x00\x00\x00\x8c\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02')
2025-02-03 19:54:37,446 - evseMQTT - INFO - Received command 2048
2025-02-03 19:54:37,446 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:38,145 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:38,843 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x19\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x03\x08\x85\x0f\x02')
2025-02-03 19:54:38,843 - evseMQTT - INFO - Received command 3
2025-02-03 19:54:38,843 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x19', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 3, 'data': b'', 'checksum': b'\x08\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:38,843 - evseMQTT - INFO - Device sent heartbeat - replying
2025-02-03 19:54:38,843 - evseMQTT - DEBUG - Generated command for: 32771 - heartbeat
bytearray(b'\x06\x01\x00\x1a\x009\xff"\x10S\xcb\x1f\x00221278\x80\x03\x01\x04\x82\x0f\x02')
2025-02-03 19:54:38,843 - evseMQTT - DEBUG - Generated command for: 33025 - set_config_time
bytearray(b'\x06\x01\x00\x1e\x009\xff"\x10S\xcb\x1f\x00221278\x81\x01\x01g\xa0\xae~\x06\xb8\x0f\x02')
2025-02-03 19:54:38,844 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:38,845 - evseMQTT - INFO - Write complete
2025-02-03 19:54:38,845 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:38,846 - evseMQTT - INFO - Write complete
2025-02-03 19:54:39,147 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:39,426 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1e\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x01\x01g\xa0\xae~\n\xbd\x0f\x02')
2025-02-03 19:54:39,426 - evseMQTT - INFO - Received command 257
2025-02-03 19:54:39,426 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1e', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 257, 'data': b'\x01g\xa0\xae~', 'checksum': b'\n\xbd', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:39,426 - evseMQTT - DEBUG - Parsed data
{'system_time': '2025-02-03T19:54:38', 'system_time_raw': 1738608878}
2025-02-03 19:54:39,427 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-03T19:54:38', 'system_time_raw': 1738608878}
2025-02-03 19:54:39,427 - evseMQTT - INFO - Message published: 7
2025-02-03 19:54:40,148 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:41,149 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:42,150 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:42,309 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00c\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x05\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g\xa0F\xc9\x00\x00\x11\xde\x00\x06D\x80\x00\x06E\xe7\x00\x00\x01g\x00\x00\x00\x00\x01\x00\x00\x1c\x97\x0f\x02')
2025-02-03 19:54:42,309 - evseMQTT - INFO - Received command 5
2025-02-03 19:54:42,310 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00c', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 5, 'data': b'\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g\xa0F\xc9\x00\x00\x11\xde\x00\x06D\x80\x00\x06E\xe7\x00\x00\x01g\x00\x00\x00\x00\x01\x00\x00', 'checksum': b'\x1c\x97', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:42,310 - evseMQTT - DEBUG - Parsed data
{'port': 1, 'current_state': 13, 'charge_id': '2025020312321337', 'start_type': 1, 'charge_type': 1, 'charge_param1': 65535, 'charge_param2': 655.35, 'charge_param3': 65535.0, 'reservation_date': 3360071783, 'user_id': 'evseMQTT', 'max_electricity': 32, 'start_date': 3376848999, 'duration': 3725656064, 'start_battery': 4107.52, 'charge_current_power': 4111.11, 'number': '3.59', 'charge_price': 0.0, 'fee_type': 1, 'charge_fee': 0.0}
2025-02-03 19:54:42,310 - evseMQTT - INFO - Device sent a charge status
2025-02-03 19:54:43,151 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:44,152 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:45,144 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b"\x06\x01\x00\xb4\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\n\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*0\x00\x06A") 2025-02-03 19:54:45,144 - evseMQTT - INFO - Received command 10 2025-02-03 19:54:45,144 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\\W:0\\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}
2025-02-03 19:54:45,145 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-38' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record
"start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2),
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little
return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8)
~~~~~^^^
IndexError: index out of range
2025-02-03 19:54:45,152 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:45,367 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'V\x00\x06A\xe2\x00\x00\x00\x8c\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02')
2025-02-03 19:54:45,367 - evseMQTT - INFO - Received command 2048
2025-02-03 19:54:45,367 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:46,133 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x000\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x04\x01\t\x1b\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xbdS\xbd\x01\x02\x02\r\x00\x00\x0c&\x0f\x02')
2025-02-03 19:54:46,134 - evseMQTT - INFO - Received command 4
2025-02-03 19:54:46,134 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x000', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 4, 'data': b'\x01\t\x1b\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xbdS\xbd\x01\x02\x02\r\x00\x00', 'checksum': b'\x0c&', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:46,134 - evseMQTT - DEBUG - Parsed data
{'line_id': 1, 'error_info': '0000000000000000', 'error_details': 'No Error', 'l1_voltage': 233.1, 'l1_amperage': 0.0, 'total_energy': 0.0, 'current_amount': 4111.1, 'inner_temp_c': 14.4, 'inner_temp_f': 57.92, 'outer_temp': 14.4, 'emergency_btn_state': 1, 'plug_state': 'Connected Unlocked', 'output_state': 'Idle', 'current_state': 'Charging', 'new_protocol': 0, 'charging_status': 'Start', 'charging_status_description': 'EV is connected, please press start', 'charger_status': 0, 'current_energy': 0}
2025-02-03 19:54:46,134 - evseMQTT - INFO - Device sent a single charge ac status
2025-02-03 19:54:46,134 - evseMQTT - INFO - Message published: 8
2025-02-03 19:54:46,153 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:47,154 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:48,156 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:48,967 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x19\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x03\x08\x85\x0f\x02')
2025-02-03 19:54:48,967 - evseMQTT - INFO - Received command 3
2025-02-03 19:54:48,968 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x19', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 3, 'data': b'', 'checksum': b'\x08\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:48,968 - evseMQTT - INFO - Device sent heartbeat - replying
2025-02-03 19:54:48,968 - evseMQTT - DEBUG - Generated command for: 32771 - heartbeat
bytearray(b'\x06\x01\x00\x1a\x009\xff"\x10S\xcb\x1f\x00221278\x80\x03\x01\x04\x82\x0f\x02')
2025-02-03 19:54:48,968 - evseMQTT - DEBUG - Generated command for: 33025 - set_config_time
bytearray(b'\x06\x01\x00\x1e\x009\xff"\x10S\xcb\x1f\x00221278\x81\x01\x01g\xa0\xae\x88\x06\xc2\x0f\x02')
2025-02-03 19:54:48,968 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:48,969 - evseMQTT - INFO - Write complete
2025-02-03 19:54:48,969 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:48,971 - evseMQTT - INFO - Write complete
2025-02-03 19:54:49,158 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:49,463 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1e\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x01\x01g\xa0\xae\x88\n\xc7\x0f\x02')
2025-02-03 19:54:49,463 - evseMQTT - INFO - Received command 257
2025-02-03 19:54:49,463 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1e', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 257, 'data': b'\x01g\xa0\xae\x88', 'checksum': b'\n\xc7', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:49,463 - evseMQTT - DEBUG - Parsed data
{'system_time': '2025-02-03T19:54:48', 'system_time_raw': 1738608888}
2025-02-03 19:54:49,463 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-03T19:54:48', 'system_time_raw': 1738608888}
2025-02-03 19:54:49,464 - evseMQTT - INFO - Message published: 9
2025-02-03 19:54:50,159 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:51,159 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:52,160 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:52,209 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b"\x06\x01\x00\xb4\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\n\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*0\x00\x06A") 2025-02-03 19:54:52,209 - evseMQTT - INFO - Received command 10 2025-02-03 19:54:52,210 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\\W:0\\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}
2025-02-03 19:54:52,210 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-43' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record
"start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2),
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little
return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8)
~~~~~^^^
IndexError: index out of range
2025-02-03 19:54:52,297 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'V\x00\x06A\xe2\x00\x00\x00\x8c\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02')
2025-02-03 19:54:52,297 - evseMQTT - INFO - Received command 2048
2025-02-03 19:54:52,297 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:53,161 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:54,162 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:55,162 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:55,492 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00c\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x05\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g\xa0F\xc9\x00\x00\x11\xde\x00\x06D\x80\x00\x06E\xe7\x00\x00\x01g\x00\x00\x00\x00\x01\x00\x00\x1c\x97\x0f\x02')
2025-02-03 19:54:55,492 - evseMQTT - INFO - Received command 5
2025-02-03 19:54:55,492 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00c', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 5, 'data': b'\x01\r2025020312321337\x01\x01\xff\xff\xff\xff\xff\xffg\xa0F\xc8evseMQTT\x00\x00\x00\x00\x00\x00\x00\x00 g\xa0F\xc9\x00\x00\x11\xde\x00\x06D\x80\x00\x06E\xe7\x00\x00\x01g\x00\x00\x00\x00\x01\x00\x00', 'checksum': b'\x1c\x97', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:55,492 - evseMQTT - DEBUG - Parsed data
{'port': 1, 'current_state': 13, 'charge_id': '2025020312321337', 'start_type': 1, 'charge_type': 1, 'charge_param1': 65535, 'charge_param2': 655.35, 'charge_param3': 65535.0, 'reservation_date': 3360071783, 'user_id': 'evseMQTT', 'max_electricity': 32, 'start_date': 3376848999, 'duration': 3725656064, 'start_battery': 4107.52, 'charge_current_power': 4111.11, 'number': '3.59', 'charge_price': 0.0, 'fee_type': 1, 'charge_fee': 0.0}
2025-02-03 19:54:55,492 - evseMQTT - INFO - Device sent a charge status
2025-02-03 19:54:56,163 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:57,164 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:58,166 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:59,048 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x19\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x03\x08\x85\x0f\x02')
2025-02-03 19:54:59,048 - evseMQTT - INFO - Received command 3
2025-02-03 19:54:59,048 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x19', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 3, 'data': b'', 'checksum': b'\x08\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:59,049 - evseMQTT - INFO - Device sent heartbeat - replying
2025-02-03 19:54:59,049 - evseMQTT - DEBUG - Generated command for: 32771 - heartbeat
bytearray(b'\x06\x01\x00\x1a\x009\xff"\x10S\xcb\x1f\x00221278\x80\x03\x01\x04\x82\x0f\x02')
2025-02-03 19:54:59,053 - evseMQTT - DEBUG - Generated command for: 33025 - set_config_time
bytearray(b'\x06\x01\x00\x1e\x009\xff"\x10S\xcb\x1f\x00221278\x81\x01\x01g\xa0\xae\x93\x06\xcd\x0f\x02')
2025-02-03 19:54:59,053 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:59,054 - evseMQTT - INFO - Write complete
2025-02-03 19:54:59,054 - evseMQTT - INFO - Writing to characteristic 0003cdd2-0000-1000-8000-00805f9b0131 on 9C:A5:25:BD:03:1D
2025-02-03 19:54:59,056 - evseMQTT - INFO - Write complete
2025-02-03 19:54:59,167 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:54:59,407 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b"\x06\x01\x00\xb4\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\n\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*0\x00\x06A") 2025-02-03 19:54:59,407 - evseMQTT - INFO - Received command 10 2025-02-03 19:54:59,407 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\\W:0\\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}
2025-02-03 19:54:59,408 - asyncio - ERROR - Task exception was never retrieved
future: <Task finished name='Task-47' coro=<BLEManager._handle_notification_wrapper() done, defined at /usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py:101> exception=IndexError('index out of range')>
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/evseMQTT/ble_manager.py", line 103, in _handle_notification_wrapper
await self.event_handler.handle_notification(sender, data)
File "/usr/local/lib/python3.13/site-packages/evseMQTT/event_handlers.py", line 62, in handle_notification
data = handler(parsed_data['data'], parsed_data['identifier'])
File "/usr/local/lib/python3.13/site-packages/evseMQTT/parsers.py", line 76, in charge_record
"start_battery": round(Utils.bytes_to_int_little(data[76:80]) * 0.01, 2),
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/evseMQTT/utils.py", line 112, in bytes_to_int_little
return (bytes[3] & 0xFF) | ((bytes[0] & 0xFF) << 24) | ((bytes[1] & 0xFF) << 16) | ((bytes[2] & 0xFF) << 8)
~~~~~^^^
IndexError: index out of range
2025-02-03 19:54:59,413 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'V\x00\x06A\xe2\x00\x00\x00\x8c\x00\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffE\x85\x0f\x02')
2025-02-03 19:54:59,413 - evseMQTT - INFO - Received command 2048
2025-02-03 19:54:59,413 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:59,413 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x00\x1e\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x01\x01\x01g\xa0\xae\x93\n\xd2\x0f\x02')
2025-02-03 19:54:59,413 - evseMQTT - INFO - Received command 257
2025-02-03 19:54:59,413 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x00\x1e', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 257, 'data': b'\x01g\xa0\xae\x93', 'checksum': b'\n\xd2', 'end_byte': b'\x0f\x02'}
2025-02-03 19:54:59,413 - evseMQTT - DEBUG - Parsed data
{'system_time': '2025-02-03T19:54:59', 'system_time_raw': 1738608899}
2025-02-03 19:54:59,413 - evseMQTT - INFO - Device responded with 257, containing {'system_time': '2025-02-03T19:54:59', 'system_time_raw': 1738608899}
2025-02-03 19:54:59,416 - evseMQTT - INFO - Message published: 10
2025-02-03 19:55:00,167 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:55:01,169 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:55:01,253 - evseMQTT - DEBUG - Notification from 0003cdd1-0000-1000-8000-00805f9b0131 (Handle: 13): Unknown: bytearray(b'\x06\x01\x000\x00\x89I(\x18\x91H4I\xff\xff\xff\xff\xff\xff\x00\x04\x01\t\x1e\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xb9S\xb9\x01\x02\x02\r\x00\x00\x0c!\x0f\x02')
2025-02-03 19:55:01,253 - evseMQTT - INFO - Received command 4
2025-02-03 19:55:01,253 - evseMQTT - DEBUG - Parsed data:
{'header': b'\x06\x01', 'data_length': b'\x000', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 4, 'data': b'\x01\t\x1e\x00\x00\x00\x00\x00\x00\x00\x06E\xe7S\xb9S\xb9\x01\x02\x02\r\x00\x00', 'checksum': b'\x0c!', 'end_byte': b'\x0f\x02'}
2025-02-03 19:55:01,253 - evseMQTT - DEBUG - Parsed data
{'line_id': 1, 'error_info': '0000000000000000', 'error_details': 'No Error', 'l1_voltage': 233.4, 'l1_amperage': 0.0, 'total_energy': 0.0, 'current_amount': 4111.1, 'inner_temp_c': 14.3, 'inner_temp_f': 57.74, 'outer_temp': 14.3, 'emergency_btn_state': 1, 'plug_state': 'Connected Unlocked', 'output_state': 'Idle', 'current_state': 'Charging', 'new_protocol': 0, 'charging_status': 'Start', 'charging_status_description': 'EV is connected, please press start', 'charger_status': 0, 'current_energy': 0}
2025-02-03 19:55:01,253 - evseMQTT - INFO - Device sent a single charge ac status
2025-02-03 19:55:01,254 - evseMQTT - INFO - Message published: 11
2025-02-03 19:55:02,171 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:55:03,172 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:55:04,173 - evseMQTT - INFO - Waiting for software version...
2025-02-03 19:55:05,174 - evseMQTT - INFO - Waiting for software version...

@b2un0
Copy link
Contributor

b2un0 commented Feb 3, 2025

Can you try another Bluetooth Modul? Had similar problems with an old 4.2 dongle.

@Utopia69
Copy link
Author

Utopia69 commented Feb 3, 2025

Can you try another Bluetooth Modul? Had similar problems with an old 4.2 dongle.

Tested with 2 different bluetooth dongles (Realtek Bleutooth 5.3 & TP-link UB500)

Image

Image

@slespersen
Copy link
Owner

slespersen commented Feb 3, 2025

Hmm. So it's working to some degree -- but still waiting for software version, which seems to be the last step, to enable full functionality.

Maybe it would make sense to implement verification of the checksum, and discard any packages that are not correct. (well - d'uh!)

@slespersen
Copy link
Owner

Could you dump the debug log into a separate file?

I think github might be eating some of the data.

This line keeps repeating:

evseMQTT - INFO - Received command 10 2025-02-03 19:54:59,407 - evseMQTT - DEBUG - Parsed data: {'header': b'\x06\x01', 'data_length': b'\x00\xb4', 'reserved': b'\x00', 'identifier': '8949281891483449', 'password': b'\xff\xff\xff\xff\xff\xff', 'cmd': 10, 'data': b"\x01Clock Fix Time Clock 1549220400\x00\x04\x02\x00\xb4'\x10\xc3P\x10\x01\x00\x00\x00\x00\W:0\Wd\x00\x00*", 'checksum': b'0\x00', 'end_byte': b'\x06A'}

Command 10 is d_uploadLocalChargeRecord -- so, something's going on. Not sure if this would keep us from identifying the software version. Regardless the parser throws an error right after.

@slespersen
Copy link
Owner

Executive decision: we'll skip Command 9 and Command 10, as they're really not providing any value to Home Assistant, but rather is the product of my urge for "because I can" 😏

New commit coming up.

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

f639560e_evsemqtt_2025-02-04T09-14-47.349Z.log
Hope this log helps
Grtz,

@slespersen
Copy link
Owner

slespersen commented Feb 4, 2025

Okay - so the parsing error is gone - wonderful. Might be a bit hacky, but we can always look into what goes wrong, if the historic charging records ever becomes relevant.

How far away from the bluetooth adapter is the wallbox?

Seems like connectivity is somewhat lacking -- RSSI is not written to the log, but should be in Home Assistant.
From your screenshot it says -94 dBm, which is ... should we say ... somewhat questionable.

According to the log, the login sequence more or less completes, however command 33030 (get_config_version) is never replied to with command 262 (set_config_version).

According to the packet dump command 262 is actually replied - however, it's more or less empty and only providing gibberish.

There seems to be a scenario, where command 262 will be empty and the hardware version becomes the software version. The screenshot from your app, indicates that hardware_version (replied in the login sequence) is the same as the "Firmware version" on the screenshot. Might require a fallback if 262 is not received or if it's empty, as it'll halter the final initialization of the library.

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

Hi,
The BT dongle is so far away from the wallbox (a few meters), but I noticed also that the signal is not so good.
So now I have connected the dongle to an usb extension cable and te RSSI is now between -74dBm to -86dBm.
If you need more logs, please let me know.

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

I just got the follow (new) error:

2025-02-04 16:11:24,614 - evseMQTT - INFO - Retrieving RSSI for device 9C:A5:25:BD:03:1D
2025-02-04 16:11:24,614 - evseMQTT - INFO - Scanning for evse BLE devices...
2025-02-04 16:11:24,618 - evseMQTT - ERROR - Error encountered:
BleakError during scanning: [org.bluez.Error.InProgress] Operation already in progress
2025-02-04 16:11:24,619 - evseMQTT - INFO - Message published: 48
2025-02-04 16:11:24,622 - evseMQTT - INFO - Disconnected from MQTT broker
Traceback (most recent call last):
File "/usr/local/bin/evseMQTT", line 8, in
sys.exit(main())
~~~~^^
File "/usr/local/lib/python3.13/site-packages/main.py", line 166, in main
asyncio.run(manager.run(args.address))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/runners.py", line 194, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/asyncio/base_events.py", line 720, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/main.py", line 98, in run
await asyncio.sleep(1) # Example interval for ad-hoc message sending
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/asyncio/tasks.py", line 718, in sleep
return await future
^^^^^^^^^^^^
asyncio.exceptions.CancelledError

@slespersen
Copy link
Owner

The last error is the result of the non-graceful shutdown of the library, as mentioned in #20 -- I'm still trying to address that part.

However - it seems the container might need a restart, to handle: BleakError during scanning: [org.bluez.Error.InProgress] Operation already in progress

Right now - as I see it, the focus needs to be on falling back to hardware_version if 262 is never received. I'll need to ponder that a bit, as taking hardware_version by default might prove troublesome on other revisions of the wallbox.

@slespersen
Copy link
Owner

If possible - I would like a log from the library starts in the container.

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

If possible - I would like a log from the library starts in the container.

I only have the library running as stand alone or as HA addon

@slespersen
Copy link
Owner

Standalone is alright -- that should allow for piping the output to a textfile rather easily. Something like <command> 2>&1 | tee evseMQTT.log should allow you to both follow stdout and save to the file.

We need to capture from beginning, to whenever it starts repeating Waiting for software version.

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

f639560e_evsemqtt_2025-02-04T16-27-08.212Z.log
This is a startup log from HA addon.
If needed from standalone, please let me know, will try later this evening (have to switch between machines)

@slespersen
Copy link
Owner

That's usable. Thanks.

There's a metric ¤#(" ton of malformed messages in there.

A couple of questions, as I'm struggling to figure out what's going on:

  1. Is the firmware the latest and greatest?
  2. How many massive walls between the bluetooth dongle and the wallbox?
  3. Is the phone working from the same location?

As mentioned - there's a serious amount of malformed messages -- for instance:

{'header': b'\x06\x01', 'data_length': b'V\x00', 'reserved': b'\x06', 'identifier': '41E20000008C0000', 'password': b'\x00\x00\x01\x00\x00\x00', 'cmd': 2048, 'data': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff', 'checksum': b'E\x85', 'end_byte': b'\x0f\x02'}

header is correct.
data_lenght seems ... to be there.
reserved is definitely not 0.
identifier is fully haywire and not corresponding to your device serial.
cmd is there, but does not exist anywhere.
data does not really hold anything.
checksum is there, maybe it's right - probably not.
end_byte is all good.

So at least, we got the beginning and the ending right 😅

My best guess at the moment, is that either:

  1. Dongle(s) are phucked - I realize this is too easy to point at (we might end up here)
  2. We should do a lot more checking of the messages received
  3. Potentially keep firing 33030 until 262 is received - however, it won't contain anything, according to packet dump from phone
  4. We should fall back to hardware_version - which will probably require us to start counting the wait time, and override at some point

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

Hi,

  1. firmware is the latest (no update available in the app)
  2. 1 wall (not really massive) distance +- 2 meters
  3. phone is working from same location (with bluetooth)
    Grtz,

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

New logfile, after reboot wallbox, HA hardware, bt dongle now connect to HA hardware (without usb hub)
evsemqtt040220251940.log

@slespersen
Copy link
Owner

Okay - great. Still a lot of malformed messages in there.

So - a couple of follow up questions:

  1. Is there any WiFi access point or router close to the device the dongle is plugged into? Think in terms of interference on the 2.4GHz band
  2. Is the dongle directly in the device or with an extension cord?
  3. Which of the two mentioned dongles are you using?
  4. Could you provide a link to the dongle in question be possible?

So far we have had the best results with the Realtek Bluetooth 5.2 dongles.

I'll be looking into extending the library, so we can follow the sequence of the messages written to the device, and hopefully track which ones gets answered, and which doesn't.

@Utopia69
Copy link
Author

Utopia69 commented Feb 4, 2025

  1. a few meters away there is an Wifi AP, but other bluetooth connections are stable (also wifi is stable)
  2. dongle is connected with an extension cord (to be closer to the wallbox & further away from the Wifi AP)
  3. I use the Realtek Bluetooth 5.3
  4. https://www.reichelt.com/nl/en/shop/product/bluetooth_5_3_usb_adapter_with_antenna-390385

@slespersen
Copy link
Owner

Perfect -- and no zigbee coordinators right next to the dongle?

I realize, that I was mistaken - it's the Realtek Bluetooth 5.4 we've had good experience with. This one specifically: https://www.amazon.de/gp/product/B0DDPT1KM7/

Any chance you would have a RPI lying around? Just for the fun of it.

I'm however not at a point yet, where I'm willing to attribute the issues to the dongle, as there's also strange messages in the phone packet dump. So please bear with me.

@Utopia69
Copy link
Author

Utopia69 commented Feb 5, 2025

No zigbee coordinators next to the BT dongle :-)
At this moment I don't have RPi to available to test with, but I will try (can't promise) to make an RPi ready to test.
The addon has now run for over 12 hours, so I think the reboot of HA did solve something.
The only thing now is that the Wallbox goes offline in mqtt, since it doesn't get a sw version, if there would be a work around I think it the addon will be usable.
Logfile (last 10k lines)

f639560e_evsemqtt_2025-02-05T07-55-03.115Z.log

@Utopia69
Copy link
Author

Utopia69 commented Feb 5, 2025

Log from RPi , almost next to de wallbox.
evseMQTT.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants