Closed worker72 closed 2 years ago
This should be fixed in https://github.com/esphome/esphome/pull/3031 You can test if the fix works for you with
external_components:
- source: github://pr#3031
components: ["modbus_controller"]
I get error when trying that. I copied your text (external components: ...) into the yaml file of my ESPnode, is that correct?
The problem is that you also need https://github.com/esphome/esphome/pull/2882 but since it is core function external_component doesn't work. (format_hex_pretty was implemented in that commit) So the dev branch of esphome is required for testing
Right. I can live with the current situation, so I can wait until this PR ends up in an upgrade. Any idea when it will be released into a stable release of ESPhome?
It's included in beta already and should be in the next release
thanks a lot
The problem
I've defined 2 sequential registers 0x00D2 and 0x00D3 as modbus numbers. These numbers are succesfully read and communicated to HA, so I see 2 fields that I can edit. When I change in HA the number of address 0xD2, the number is succesfully written to the modbus device. But when I change the number that corresponds to 0xD3, this number is NOT succesfully written to the modbus device.
I have changed the logging to VERY_VERBOSE and I see the cause: ESPhome is writing to address 0xD4.
Because I use 2 addresses that are sequential, the modbus library combines reading and writing to those addresses. I think that is why the screenshot says 0xD2 in the cyan line. But I think there is a bug in the code that causes ESPhome to address 0xD4 where it should address 0xD3
In the log snippet below, I first changed in HA the number that corresponds to address 0xD2, and right after I changed the number that corresponds to 0xD3. In the log you see it first writes to 0xD2 (correct) and then to 0xD4 (not correct)
Which version of ESPHome has the issue?
2021.12.3
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2021.12.3
What platform are you using?
ESP8266
Board
nodemcuv3
Component causing the issue
modbus
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response