Rule Examples/en: различия между версиями
Matveevrj (обсуждение | вклад) (Новая страница: «→----------------------------: →2. Double Press Counter: Off action: →----------------------------: ») |
Matveevrj (обсуждение | вклад) (Новая страница: «defineRule({ whenChanged: "wb-mcm8_20/Input 1 Single Press Counter", then: function (newValue, devName, cellName) { dev["wb-mdm3_58/K1"] = true; } });») |
||
Строка 473: | Строка 473: | ||
Many of the indications that are visible in the web interface of the controller out of the box are also created by rules on the wb-rules engine. Their code is here: [https://github.com/wirenboard/wb-rules-system https://github.com/wirenboard/wb-rules-system]. The system rules are collected in the <code>wb-rules-system</code> package, the script files on the controller are located in the <code>/usr/share/wb-rules-system/</code> folder. | Many of the indications that are visible in the web interface of the controller out of the box are also created by rules on the wb-rules engine. Their code is here: [https://github.com/wirenboard/wb-rules-system https://github.com/wirenboard/wb-rules-system]. The system rules are collected in the <code>wb-rules-system</code> package, the script files on the controller are located in the <code>/usr/share/wb-rules-system/</code> folder. | ||
A few examples of system rules are below. | |||
=== Rule for tweeters === | |||
=== | |||
[https://github.com/contactless/wb-rules-system/blob/master/rules/buzzer.js Rule] creates a virtual buzzer device with volume and frequency sliders and a mute button. | |||
[https://github.com/contactless/wb-rules-system/blob/master/rules/buzzer.js | |||
<div lang="ru" dir="ltr" class="mw-content-ltr"> | <div lang="ru" dir="ltr" class="mw-content-ltr"> |