translator, wb_editors
4293
правки
Matveevrj (обсуждение | вклад) Метки: правка с мобильного устройства правка из мобильной версии |
Matveevrj (обсуждение | вклад) |
||
Строка 37: | Строка 37: | ||
}); | }); | ||
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 | dev["wb-gpio/Relay_2"] = newValue; | ||
dev["wb-mrm2_6 | dev["wb-mrm2_6/Relay 1"] = newValue; | ||
} | } | ||
Строка 51: | Строка 49: | ||
=== Motion detection with timeout === | === Motion detection with timeout === | ||
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 | |||
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. |