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

Навигация

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

Новая страница: «defineRule("roller_shutter_1_both_on", { asSoonAs: function() { return relay_up_1 && relay_down_1; }, then: function () { relay_up_1 = 0; relay_down_1 = 0; log("Both roller shutter relays on, switching them off"); } }); })();»
(Новая страница: «If you need several such motion detectors, then in order not to copy the code, you can wrap the creation of the rule and variables in a function:»)
(Новая страница: «defineRule("roller_shutter_1_both_on", { asSoonAs: function() { return relay_up_1 && relay_down_1; }, then: function () { relay_up_1 = 0; relay_down_1 = 0; log("Both roller shutter relays on, switching them off"); } }); })();»)
Строка 276: Строка 276:
Pulse counter connected to WB-MCM8. Gives out 1 pulse per 10 liters of water. When connected, the meter showed readings of 123.120 m³, which is equal to 123120 liters of water. The WB-MCM8 had 7 pulses when plugged in.
Pulse counter connected to WB-MCM8. Gives out 1 pulse per 10 liters of water. When connected, the meter showed readings of 123.120 m³, which is equal to 123120 liters of water. The WB-MCM8 had 7 pulses when plugged in.


<div lang="ru" dir="ltr" class="mw-content-ltr">
<syntaxhighlight lang="ecmascript">
<syntaxhighlight lang="ecmascript">
var meterCorrection = 123120 // Корректировочное значение счетчика в литрах
var meterCorrection = 123120 // Кcorrection value of the meter in liters
var counterCorrection = 7 // Корректировочное значение WB-MCM8 в импульсах
var counterCorrection = 7 // WB-MCM8 correction value in pulses
var inpulseValue = 10 // Количество литров на один импульс
var inpulseValue = 10 // Number of liters per impulse
</div>


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

правки