Example:
"items": { "modbusdev":[4,[96,0,0,255]] }
Note: this config example available at URL http://lazyhome.ru/de-ad-be-ef-fe-07.config.json - so just set mac address of device by command “mac de:ad:be:ef:fe:07” for test.
Item notation:
4 - Modbus dimmer item type
Param1: = 96 - Decimal address of modbus device
Param2: = 0 - Modbus register to write (and read while polling)
Param3: = 0 - mask (optional. Default value “-1” - see below for explanations)
Param4:= 255 - Maximum Value for scaling MQTT input value to register value (Optional. Default MaxValue 0x3f. It is equivalent of “100" on input. If value == 0 - no scaling)
Mask:
if mask == 1 - Value comes to most significant byte of 16 bit register word, another byte = 0xff
if mask == 0 - Value comes to least significant byte of 16 bit register word, another byte = 0xff
any other mask - put Value as 16 bit word without any modification
if mask == -1 (or parameter omitted) - no register polling