12 063
правки
(Новая страница: «The WB-MS-THLS device is a universal combined Modbus sensor for temperature, humidity, light and sound pressure. The device provides a…») |
(Новая страница: «There is an interesting parameter in the settings of the device: <syntaxhighlight lang="JSON"> "max_read_registers": 0,</syntaxhighlight> This parameter descri…») |
||
Строка 173: | Строка 173: | ||
</div> | </div> | ||
There is an interesting parameter in the settings of the device: <syntaxhighlight lang="JSON"> "max_read_registers": 0,</syntaxhighlight> This parameter describes the maximum number of registers that can be read from the device when requested. The default value is 1, in our case we specify to read all registers in one pass (bulk read). | |||
In the settings of the channel "Temperature" there are three parameters that are worth paying attention to: | |||
<syntaxhighlight lang="JSON"> | <syntaxhighlight lang="JSON"> | ||
"format": "s16", | "format": "s16", | ||
Строка 180: | Строка 180: | ||
"error_value": "0x7FFF" | "error_value": "0x7FFF" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Parameter'''"format": "s16"''' indicates that the number in the registers is represented as a signed 16-bit integer, '''"scale": 0.1''' — indicates that the value obtained from the registers should be multiplied by the scaling factor 0.1 to obtain the temperature value, and the parameter '''"error_value": "0x7FFF"''' sets the value sent from the register, indicating that an error occurred during the sensor poll. This parameter will be highlighted in red in the web interface of the controller. You should use this option if you know what value your device sends in case of an error. | |||
правки