Open wowtor opened 10 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
/unstale
I can see the same behavior, which makes this component unusable with those nice dirt cheep eletchsup 23IOD32 (32 inputs, 32outpus) devices sold on ali. They are only supporting 0x3, 0x6, 0x16 commands for the outputs. So I have to use holding but I also want to switch more than 1 output per 16 outputs to on at a time.
Hi guys, do you found any solution for this? I have same issue.
I am running up against this same issue - there is probably a way to work around it with custom Lambda with variable for the previous register read - I have not developed this yet. But it would be really nice to have it as a built in option.
As it is now the bitmask basically works fine for reading - but the write is the issue as it always overwrites every other bit which is usually not the intention with specific bit digital signals.
The problem
Not sure if this is a bug or a feature request.
I have a Modbus switch configured with
bitmask
and withregister_type
set toholding
.The expected behavior is that the masked bit is read/written, and nothing else.
The observed behavior is that toggling the switch causes the full register to be written. Bits outside the bitmask are always filled with zeros. This may cause unexpected side effects because the other bits may be used for something else.
The fix should be IMHO, in order of desirability:
Have the write command change the masked bit only. The other bits are set with existing values obtained from the previous read command.
Throw an error if
bitmask
is used in combination withholding
. The register typecoil
should be used instead.Describe the behavior in the documentation.
Which version of ESPHome has the issue?
2023.11.6
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
2023.12.0
What platform are you using?
ESP32
Board
esp-wrover-kit
Component causing the issue
Modbus
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response