Перейти к содержанию

Навигация

Rule Examples/en: различия между версиями

Новая страница: «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.»
(Новая страница: «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>»)
(Новая страница: «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>


<div lang="ru" dir="ltr" class="mw-content-ltr">
== Handling click counters ==
== Обработка счётчиков нажатий ==
{{Anchors|press-actions}}
{{Anchor|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.  
Последние версии прошивок устройств Wiren Board могут распознавать типы нажатий подключённых к входам кнопок и транслировать их по [[Modbus]] на контроллер Wiren Board. О том, как устройство распознаёт типы нажатий, читайте в его документации.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
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>


<div lang="ru" dir="ltr" class="mw-content-ltr">
<div lang="ru" dir="ltr" class="mw-content-ltr">
translator, wb_editors
4344

правки