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

Нет описания правки
Метки: правка с мобильного устройства правка из мобильной версии
Строка 37: Строка 37:
});
});


<div class="mw-translate-fuzzy">
defineRule("simple_switch", {
defineRule("simple_switch", {
   whenChanged: "simple_test/enabled",
   whenChanged: "simple_test/enabled",
   then: function (newValue, devName, cellName) {
   then: function (newValue, devName, cellName) {
dev["wb-gpio"]["Relay_2"] = newValue;
dev["wb-gpio/Relay_2"] = newValue;
dev["wb-mrm2_6"]["Relay 1"] = newValue;
dev["wb-mrm2_6/Relay 1"] = newValue;
</div>


   }
   }
Строка 51: Строка 49:
=== Motion detection with timeout ===
=== Motion detection with timeout ===


<div class="mw-translate-fuzzy">
A motion detector with a «dry contact» output is connected to input D2. When motion is detected, it shorts D2 and GND and status «1» appears on the corresponding <code>wb-gpio/D2_IN</code> channel.
A motion detector with a "dry contact" output is connected to input D2. When motion is detected, it shorts D2 and GND and status "1" appears on the corresponding <code>wb-gpio/D2_IN</code> channel.
</div>


The lighting is connected via a built-in relay corresponding to the <code>wb-gpio/Relay_1</code> channel.
The lighting is connected via a built-in relay corresponding to the <code>wb-gpio/Relay_1</code> channel.
translator, wb_editors
4293

правки