Rule Examples/en: различия между версиями
Matveevrj (обсуждение | вклад) (Новая страница: «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:») |
Matveevrj (обсуждение | вклад) (Новая страница: «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. | ||
<syntaxhighlight lang="ecmascript"> | <syntaxhighlight lang="ecmascript"> | ||
var meterCorrection = 123120 // | var meterCorrection = 123120 // Кcorrection value of the meter in liters | ||
var counterCorrection = 7 // | var counterCorrection = 7 // WB-MCM8 correction value in pulses | ||
var inpulseValue = 10 // | var inpulseValue = 10 // Number of liters per impulse | ||
<div lang="ru" dir="ltr" class="mw-content-ltr"> | <div lang="ru" dir="ltr" class="mw-content-ltr"> |