translator, wb_editors
4544
правки
Matveevrj (обсуждение | вклад) (Новая страница: «defineRule("water_meter_1", { whenChanged: "wb-mcm8_29/Input 1 counter", then: function(newValue, devName, cellName) { if(newValue){ dev["water_meters"]["water_meter_1"] = ((parseInt(newValue) - counterCorrection) * inpulseValue) + meterCorrection; // We multiply the value of the counter by the number of liters / pulse and add the correction value. } } }); </syntaxhighlight>») |
Matveevrj (обсуждение | вклад) (Новая страница: «To process clicks, you need to track the state of the counter of the desired type of click on the controller and, when it changes, perform an action.») |
||
Строка 302: | Строка 302: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Handling click counters == | |||
{{Anchors|press-actions}} | |||
{{ | === Description === | ||
=== | The latest firmware versions of Wiren Board devices can recognize the types of button presses connected to the inputs and broadcast them via [[Modbus]] to the Wiren Board controller. For information on how the device recognizes types of clicks, read its documentation. | ||
To process clicks, you need to track the state of the counter of the desired type of click on the controller and, when it changes, perform an action. | |||
<div lang="ru" dir="ltr" class="mw-content-ltr"> | <div lang="ru" dir="ltr" class="mw-content-ltr"> |