Closed torfbolt closed 1 year ago
Btw, I found a register description of the SimpleEVSE here: https://s9f797ea9ad7dc140.jimcontent.com/download/version/1496852739/module/14154238624/name/Manual%20Bluetooth%20Modul%20f%C3%BCr%20EVSE%20WB%20V1.4.pdf
On a first glance this seems to be identical to the one used by this component.
Could you provide some more logs? Some more raw traffic will help me to debug the issue.
The device config:
Some more logs:
Thanks for your bug report. You device doesn't respond properly to the "read 10 registers starting at register 1000" request. I assume your device just supports around 5 registers. Could you flash this test YAML and provide the log?
substitutions:
name: evse
config_name: "${name} config"
external_components_source: github://syssi/esphome-evse-wallbox@main
tx_pin: GPIO16
rx_pin: GPIO17
esphome:
name: ${name}
friendly_name: "EVSE Wallbox"
esp32:
board: lolin32
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
ota:
logger:
level: DEBUG
uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
dummy_receiver: true
interval:
- interval: 15s
then:
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x01, 0x04, 0x7A]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x02, 0x44, 0x7B]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x03, 0x85, 0xBB]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x04, 0xC4, 0x79]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x05, 0x05, 0xB9]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x06, 0x45, 0xB8]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x07, 0x84, 0x78]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x08, 0xC4, 0x7C]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x09, 0x05, 0xBC]
- delay: 1s
- uart.write: [0x01, 0x03, 0x03, 0xE8, 0x00, 0x0A, 0x45, 0xBD]
- delay: 1s
Thanks in advance!
Thanks for the quick response, here's the log output:
[18:40:18][C][logger:293]: Logger:
[18:40:18][C][logger:294]: Level: DEBUG
[18:40:18][C][logger:295]: Log Baud Rate: 0
[18:40:18][C][logger:296]: Hardware UART: UART0
[18:40:18][C][uart.arduino_esp32:108]: UART Bus 1:
[18:40:18][C][uart.arduino_esp32:109]: TX Pin: GPIO17
[18:40:18][C][uart.arduino_esp32:110]: RX Pin: GPIO16
[18:40:18][C][uart.arduino_esp32:112]: RX Buffer Size: 256
[18:40:18][C][uart.arduino_esp32:114]: Baud Rate: 9600 baud
[18:40:18][C][uart.arduino_esp32:115]: Data Bits: 8
[18:40:18][C][uart.arduino_esp32:116]: Parity: NONE
[18:40:18][C][uart.arduino_esp32:117]: Stop bits: 1
[18:40:18][D][uart_debug:114]: >>> 01:03:03:E8:00:08:C4:7C
[18:40:18][C][captive_portal:088]: Captive Portal:
[18:40:18][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:18][C][mdns:108]: mDNS:
[18:40:18][C][mdns:109]: Hostname: evse
[18:40:18][C][ota:093]: Over-The-Air Updates:
[18:40:18][C][ota:094]: Address: evse.local:3232
[18:40:18][C][ota:097]: Using Password.
[18:40:18][C][api:138]: API Server:
[18:40:18][C][api:139]: Address: evse.local:6053
[18:40:20][C][api:141]: Using noise encryption: YES
[18:40:20][D][uart_debug:114]: >>> 01:03:03:E8:00:09:05:BC
[18:40:20][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:20][D][uart_debug:114]: >>> 01:03:03:E8:00:01:04:7A
[18:40:20][D][uart_debug:114]: <<< 01:03:02:00:03:F8:45
[18:40:20][D][uart_debug:114]: >>> 01:03:03:E8:00:0A:45:BD
[18:40:20][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:20][D][api:102]: Accepted 10.0.0.6
[18:40:20][D][api.connection:920]: Home Assistant 2023.4.1 (10.0.0.6): Connected successfully
[18:40:20][D][uart_debug:114]: >>> 01:03:03:E8:00:02:44:7B
[18:40:21][D][uart_debug:114]: <<< 01:03:04:00:03:00:05:CA:30
[18:40:21][D][uart_debug:114]: >>> 01:03:03:E8:00:03:85:BB
[18:40:22][D][uart_debug:114]: <<< 01:03:06:00:03:00:05:00:02:F4:B5
[18:40:22][D][uart_debug:114]: >>> 01:03:03:E8:00:04:C4:79
[18:40:23][D][uart_debug:114]: <<< 01:03:08:00:03:00:05:00:02:00:20:CA:CF
[18:40:23][D][uart_debug:114]: >>> 01:03:03:E8:00:05:05:B9
[18:40:24][D][uart_debug:114]: <<< 01:03:0A:00:03:00:05:00:02:00:20:00:00:1D:4C
[18:40:24][D][uart_debug:114]: >>> 01:03:03:E8:00:06:45:B8
[18:40:25][D][uart_debug:114]: <<< 01:03:0C:00:03:00:05:00:02:00:20:00:00:00:0A:81:64
[18:40:25][D][uart_debug:114]: >>> 01:03:03:E8:00:07:84:78
[18:40:26][D][uart_debug:114]: <<< 01:03:0E:00:03:00:05:00:02:00:20:00:00:00:0A:00:03:A3:BB
[18:40:26][D][uart_debug:114]: >>> 01:03:03:E8:00:08:C4:7C
[18:40:27][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:27][D][uart_debug:114]: >>> 01:03:03:E8:00:09:05:BC
[18:40:28][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:28][D][uart_debug:114]: >>> 01:03:03:E8:00:0A:45:BD
[18:40:29][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:34][D][uart_debug:114]: >>> 01:03:03:E8:00:01:04:7A
[18:40:35][D][uart_debug:114]: <<< 01:03:02:00:03:F8:45
[18:40:35][D][uart_debug:114]: >>> 01:03:03:E8:00:02:44:7B
[18:40:36][D][uart_debug:114]: <<< 01:03:04:00:03:00:05:CA:30
[18:40:36][D][uart_debug:114]: >>> 01:03:03:E8:00:03:85:BB
[18:40:37][D][uart_debug:114]: <<< 01:03:06:00:03:00:05:00:02:F4:B5
[18:40:37][D][uart_debug:114]: >>> 01:03:03:E8:00:04:C4:79
[18:40:38][D][uart_debug:114]: <<< 01:03:08:00:03:00:05:00:02:00:20:CA:CF
[18:40:38][D][uart_debug:114]: >>> 01:03:03:E8:00:05:05:B9
[18:40:39][D][uart_debug:114]: <<< 01:03:0A:00:03:00:05:00:02:00:20:00:00:1D:4C
[18:40:39][D][uart_debug:114]: >>> 01:03:03:E8:00:06:45:B8
[18:40:40][D][uart_debug:114]: <<< 01:03:0C:00:03:00:05:00:02:00:20:00:00:00:0A:81:64
[18:40:40][D][uart_debug:114]: >>> 01:03:03:E8:00:07:84:78
[18:40:41][D][uart_debug:114]: <<< 01:03:0E:00:03:00:05:00:02:00:20:00:00:00:0A:00:03:A3:BB
[18:40:41][D][uart_debug:114]: >>> 01:03:03:E8:00:08:C4:7C
[18:40:42][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:42][D][uart_debug:114]: >>> 01:03:03:E8:00:09:05:BC
[18:40:43][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:43][D][uart_debug:114]: >>> 01:03:03:E8:00:0A:45:BD
[18:40:44][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:49][D][uart_debug:114]: >>> 01:03:03:E8:00:01:04:7A
[18:40:50][D][uart_debug:114]: <<< 01:03:02:00:03:F8:45
[18:40:50][D][uart_debug:114]: >>> 01:03:03:E8:00:02:44:7B
[18:40:51][D][uart_debug:114]: <<< 01:03:04:00:03:00:05:CA:30
[18:40:51][D][uart_debug:114]: >>> 01:03:03:E8:00:03:85:BB
[18:40:52][D][uart_debug:114]: <<< 01:03:06:00:03:00:05:00:02:F4:B5
[18:40:52][D][uart_debug:114]: >>> 01:03:03:E8:00:04:C4:79
[18:40:53][D][uart_debug:114]: <<< 01:03:08:00:03:00:05:00:02:00:20:CA:CF
[18:40:53][D][uart_debug:114]: >>> 01:03:03:E8:00:05:05:B9
[18:40:54][D][uart_debug:114]: <<< 01:03:0A:00:03:00:05:00:02:00:20:00:00:1D:4C
[18:40:54][D][uart_debug:114]: >>> 01:03:03:E8:00:06:45:B8
[18:40:55][D][uart_debug:114]: <<< 01:03:0C:00:03:00:05:00:02:00:20:00:00:00:0A:81:64
[18:40:55][D][uart_debug:114]: >>> 01:03:03:E8:00:07:84:78
[18:40:56][D][uart_debug:114]: <<< 01:03:0E:00:03:00:05:00:02:00:20:00:00:00:0A:00:03:A3:BB
[18:40:56][D][uart_debug:114]: >>> 01:03:03:E8:00:08:C4:7C
[18:40:57][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:57][D][uart_debug:114]: >>> 01:03:03:E8:00:09:05:BC
[18:40:58][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:40:58][D][uart_debug:114]: >>> 01:03:03:E8:00:0A:45:BD
[18:40:59][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:41:04][D][uart_debug:114]: >>> 01:03:03:E8:00:01:04:7A
[18:41:05][D][uart_debug:114]: <<< 01:03:02:00:03:F8:45
[18:41:05][D][uart_debug:114]: >>> 01:03:03:E8:00:02:44:7B
[18:41:06][D][uart_debug:114]: <<< 01:03:04:00:03:00:05:CA:30
[18:41:06][D][uart_debug:114]: >>> 01:03:03:E8:00:03:85:BB
[18:41:07][D][uart_debug:114]: <<< 01:03:06:00:03:00:05:00:02:F4:B5
[18:41:07][D][uart_debug:114]: >>> 01:03:03:E8:00:04:C4:79
[18:41:08][D][uart_debug:114]: <<< 01:03:08:00:03:00:05:00:02:00:20:CA:CF
[18:41:08][D][uart_debug:114]: >>> 01:03:03:E8:00:05:05:B9
[18:41:09][D][uart_debug:114]: <<< 01:03:0A:00:03:00:05:00:02:00:20:00:00:1D:4C
[18:41:09][D][uart_debug:114]: >>> 01:03:03:E8:00:06:45:B8
[18:41:10][D][uart_debug:114]: <<< 01:03:0C:00:03:00:05:00:02:00:20:00:00:00:0A:81:64
[18:41:10][D][uart_debug:114]: >>> 01:03:03:E8:00:07:84:78
[18:41:11][D][uart_debug:114]: <<< 01:03:0E:00:03:00:05:00:02:00:20:00:00:00:0A:00:03:A3:BB
[18:41:11][D][uart_debug:114]: >>> 01:03:03:E8:00:08:C4:7C
[18:41:12][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:41:12][D][uart_debug:114]: >>> 01:03:03:E8:00:09:05:BC
[18:41:13][D][uart_debug:114]: <<< 01:83:02:C0:F1
[18:41:13][D][uart_debug:114]: >>> 01:03:03:E8:00:0A:45:BD
[18:41:14][D][uart_debug:114]: <<< 01:83:02:C0:F1
It looks like retrieving register 1000 to 1007 works fine:
[18:40:55][D][uart_debug:114]: >>> 01:03:03:E8:00:07:84:78
[18:40:56][D][uart_debug:114]: <<< 01:03:0E:00:03:00:05:00:02:00:20:00:00:00:0A:00:03:A3:BB
As soon as we retrieve register 1008 the device denys the request:
[18:40:56][D][uart_debug:114]: >>> 01:03:03:E8:00:08:C4:7C
[18:40:57][D][uart_debug:114]: <<< 01:83:02:C0:F1
I will prepare a fix!
Please update the external_componentssection to retrieve the feature branch
short-status`:
external_components:
- source: github://syssi/esphome-evse-wallbox@short-status
refresh: 0s
and recompile/flash your ESP. Please provide a log of the updated setup.
Unfortunately doesn't look like it fixed the issue:
Ups! My fault. I've pushed another change. Please recompile & flash another time.
Yep, now it works. Just the firmware version is reported as 1.0, whereas other interfaces reported it as 10. But I'm not even sure what number it officially is.
It is possible to update the device?
@torfbolt Could you do me a favor and do another test? Please flash this YAML:
substitutions:
name: evse
config_name: "${name} config"
tx_pin: GPIO16
rx_pin: GPIO17
esphome:
name: ${name}
esp32:
board: lolin32
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
ota:
logger:
level: DEBUG
uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
dummy_receiver: true
interval:
- interval: 2s
then:
- uart.write: [0x01, 0x03, 0x03, 0xEF, 0x00, 0x01, 0xB5, 0xBB]
It requests register 1007 priodically. This is the RCD status register. I would like to make sure your device is unable to respond to register 1007 requests always. Thanks in advance!
Your firmware revision (10
) is supported by the main
branch now. Please add your firmware version to the YAML:
evse_wallbox:
id: evse0
modbus_id: modbus0
update_interval: 2s
firmware_version: 10
This avoids retrieving unsupported registers which where introduced in revision 16.
Log output from the test yaml:
Thanks! Your firmware version doesn't support register 1007 for sure.
I've tried this component to control a SimpleEVSE wallbox. The basics seem to work well, I can control the charging current and e.g. enable & disable the EVSE via the switches for register 2005.
But it fails to readout the rest of the state, like firmware version etc. Probably something minor with the modbus config, maybe there are some differences between the "EVSE" and "SimpleEVSE" wallboxes.
In the log I get these messages (note that it also complains when setting the charging current):
When I connect to the wallbox with the example config provided in https://github.com/stegm/esphome-simpleevse-config I can e.g. read out the correct value "10" of the "firmware version" register. But that approach fails when trying to write values to the device.