Read bitmask value of register in Modbus sensor

a bitmask is always an integer, never a string. If register 100 is not a bitmask (which it doesn’t seem to be from your screenshot), then no idea, ask the vendor what a value of 8 might mean.

But be aware, that the register could be off by 1 in any direction. So in order to get the register 109 from your device, you might have to configure 108 or 110 to get the correct register (depending on how they start counting, with 0 or 1). All my modbus registers for E3DC are off by 1 (don’t recall in which direction), so maybe the same applies to your device. Other than that, config looks fine.

I tried following your guide but I can’t get it to work. even if the sensor reads 512 none of the bits are active. what am I doing wrong?


sorry, no idea what might be wrong here. Can not spot any obvious error

you might have omitted the double curly brackets? did the code validate?

1 Like