Вклад участника Matveevrj
- 20:54, 21 сентября 2022 разн. история +54 Н Translations:Rule Examples/108/en Новая страница: «Sending data is done with the following shell command:» текущая
- 20:54, 21 сентября 2022 разн. история +20 Н Translations:Rule Examples/107/en Новая страница: «2. Sending a command» текущая
- 20:54, 21 сентября 2022 разн. история +95 Н Translations:Rule Examples/106/en Новая страница: «<pre> stty -F /dev/ttyNSC0 ospeed 9600 ispeed 9600 raw clocal -crtscts -parenb -echo cs8 </pre>» текущая
- 20:54, 21 сентября 2022 разн. история +76 Н Translations:Rule Examples/105/en Новая страница: «To configure the / dev/ttyNSC0 port to 9600 speed, run the following command» текущая
- 20:54, 21 сентября 2022 разн. история −73 Rule Examples/en Новая страница: «1. Port setting»
- 20:54, 21 сентября 2022 разн. история +15 Н Translations:Rule Examples/104/en Новая страница: «1. Port setting» текущая
- 20:54, 21 сентября 2022 разн. история −396 Rule Examples/en Новая страница: «</syntaxhighlight> == Sending commands via RS-485 ==»
- 20:54, 21 сентября 2022 разн. история +143 Н Translations:Rule Examples/103/en Новая страница: «When you turn off the switch a command will be sent: (set channel brightness 00=0x00) for Uniel UCH-M141: <pre> FF FF 0A 01 00 00 00 0B </pre>» текущая
- 20:54, 21 сентября 2022 разн. история +137 Н Translations:Rule Examples/102/en Новая страница: «When you turn on the switch a command will be sent: (Set Brightness ch. 00=0xff) for Uniel UCH-M141: <pre> FF FF 0A 01 FF 00 00 0A </pre>» текущая
- 20:54, 21 сентября 2022 разн. история +66 Н Translations:Rule Examples/101/en Новая страница: «Create a virtual device with switch type control via rules engine.» текущая
- 20:53, 21 сентября 2022 разн. история −565 Rule Examples/en Новая страница: «Termostat("R01-TS16-1", "A60-M1W3/External Sensor 1", "Termostat/R01-TS16-1-setpoint", "wb-gpio/EXT4_R3A1", "Termostat/R01-TS16-1-onoff"); // Hallway underfloor heating»
- 20:53, 21 сентября 2022 разн. история +581 Н Translations:Rule Examples/100/en Новая страница: «For example, send a command to the device on the port /dev/ttys0 (corresponds to the hardware port RS-485-ISO on the Wiren Board 4). To do this, we will use the rules engine and the ability to execute arbitrary shell commands. See [https://github.com/contactless/wb-rules#%D0%94%D1%80%D1%83%D0%B3%D0%B8%D0%B5-%D0%BF%D1%80%D0%B5%D0%B4%D0%BE%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D1%91%D0%BD%D0%BD%D1%8B%D0%B5-%D1%84%D1%83%D0%BD%...» текущая
- 20:53, 21 сентября 2022 разн. история +52 Н Translations:Rule Examples/99/en Новая страница: «</syntaxhighlight> == Sending commands via RS-485 ==» текущая
- 20:53, 21 сентября 2022 разн. история +169 Н Translations:Rule Examples/226/en Новая страница: «Termostat("R01-TS16-1", "A60-M1W3/External Sensor 1", "Termostat/R01-TS16-1-setpoint", "wb-gpio/EXT4_R3A1", "Termostat/R01-TS16-1-onoff"); // Hallway underfloor heating» текущая
- 20:52, 21 сентября 2022 разн. история +588 Н Translations:Rule Examples/225/en Новая страница: «var hysteresis = 0.5; function Termostat(name, temp, setpoint, TS, TS_onoff) { defineRule(name, { whenChanged: temp, //when the sensor state changes then: function (newValue, devName, cellName) { // do the following if (dev[TS_onoff]) { if ( newValue < dev[setpoint] - hysteresis) { //if the sensor temperature is less than the setpoint - hysteresis dev[TS] = true; } if ( newValue > dev[setpoint] + hysteresis) { //if the sensor temper...» текущая
- 20:52, 21 сентября 2022 разн. история −145 Rule Examples/en Новая страница: «== Thermostat == An example of a simple thermostat from the [https://support.wirenboard.com/t/novaya-versiya-dvizhka-pravil/4196/158 topic on the support portal].»
- 20:52, 21 сентября 2022 разн. история +508 Н Translations:Rule Examples/224/en Новая страница: «<syntaxhighlight lang="js"> defineVirtualDevice("Termostat", { title: "Termostat", cells: { // =============== hallway underfloor heating "R01-TS16-1-mode": {//mode 0-manual 1-scheduled type: "switch", value: false, }, "R01-TS16-1-setpoint": {//setting type: "range", value: 25, max: 30, readonly: false }, "R01-TS16-1-lock": {//blockage in visualization 0-unlocked 1-blocked typ...» текущая
- 20:51, 21 сентября 2022 разн. история −97 Rule Examples/en Новая страница: «1. If the input voltage is less than the battery voltage, then the board is powered by the battery. In this case, 0V is also displayed as the input voltage.»
- 20:51, 21 сентября 2022 разн. история +162 Н Translations:Rule Examples/223/en Новая страница: «== Thermostat == An example of a simple thermostat from the [https://support.wirenboard.com/t/novaya-versiya-dvizhka-pravil/4196/158 topic on the support portal].» текущая
- 20:51, 21 сентября 2022 разн. история −168 Rule Examples/en Новая страница: «} });»
- 20:51, 21 сентября 2022 разн. история +18 Н Translations:Rule Examples/98/en Новая страница: «</syntaxhighlight>» текущая
- 20:51, 21 сентября 2022 разн. история +203 Н Translations:Rule Examples/97/en Новая страница: «defineRule("_system_dc_off", { asSoonAs: function () { return dev["wb-adc"]["Vin"] <= dev["wb-adc"]["BAT"]; }, then: function () { dev["power_status"]["working on battery"] = true; } });»
- 20:51, 21 сентября 2022 разн. история +202 Н Translations:Rule Examples/96/en Новая страница: «defineRule("_system_dc_on", { asSoonAs: function () { return dev["wb-adc"]["Vin"] > dev["wb-adc"]["BAT"]; }, then: function () { dev["power_status"]["working on battery"] = false; } });»
- 20:51, 21 сентября 2022 разн. история −56 Rule Examples/en Новая страница: «// A rule that will increase the brightness on a timer defineRule({ when: function () { return timers["input1_long_press"].firing; }, then: function () { var i = dev["wb-mdm3_58/Channel 1"];»
- 20:51, 21 сентября 2022 разн. история +292 Н Translations:Rule Examples/95/en Новая страница: «defineRule("_system_track_vin", { whenChanged: "wb-adc/Vin", then: function() { if (dev["wb-adc"]["Vin"] < dev["wb-adc"]["BAT"] ) { dev["power_status"]["Vin"] = 0; } else { dev["power_status"]["Vin"] = dev["wb-adc"]["Vin"] ; } } });»
- 20:51, 21 сентября 2022 разн. история −168 Rule Examples/en Новая страница: «defineRule("_system_buzzer_params", { whenChanged: [ "buzzer/frequency", "buzzer/volume", ],»
- 20:51, 21 сентября 2022 разн. история +5 Н Translations:Rule Examples/94/en Новая страница: «} });» текущая
- 20:51, 21 сентября 2022 разн. история +180 Н Translations:Rule Examples/93/en Новая страница: «cells: { 'working on battery' : { type : "switch", value : false, readonly : true }, 'Vin' : { type : "voltage", value : 0 }» текущая
- 20:51, 21 сентября 2022 разн. история +65 Н Translations:Rule Examples/92/en Новая страница: «defineVirtualDevice("power_status", { title: "Power status", //» текущая
- 20:51, 21 сентября 2022 разн. история −232 Rule Examples/en Новая страница: «<syntaxhighlight lang="ecmascript">» Метки: правка с мобильного устройства правка из мобильной версии
- 20:51, 21 сентября 2022 разн. история +35 Н Translations:Rule Examples/91/en Новая страница: «<syntaxhighlight lang="ecmascript">» текущая
- 20:50, 21 сентября 2022 разн. история +185 Н Translations:Rule Examples/90/en Новая страница: «To illustrate, the rules use two different ways of triggering: by changing the value of the control (rule _system_track_vin) and by changing the value of the expression (the other two).» текущая
- 20:50, 21 сентября 2022 разн. история −195 Rule Examples/en Новая страница: «2. If the input voltage is greater than the battery voltage, then the board is powered by an external power source. The measurement from the Vin channel is displayed as the input voltage.»
- 20:50, 21 сентября 2022 разн. история +187 Н Translations:Rule Examples/89/en Новая страница: «2. If the input voltage is greater than the battery voltage, then the board is powered by an external power source. The measurement from the Vin channel is displayed as the input voltage.» текущая
- 20:50, 21 сентября 2022 разн. история −559 Rule Examples/en Новая страница: «=== CO2 === When the CO2 concentration is less than 650, we flash green once every 10 seconds.» Метки: правка с мобильного устройства правка из мобильной версии
- 20:50, 21 сентября 2022 разн. история +156 Н Translations:Rule Examples/88/en Новая страница: «1. If the input voltage is less than the battery voltage, then the board is powered by the battery. In this case, 0V is also displayed as the input voltage.» текущая
- 20:50, 21 сентября 2022 разн. история +35 Н Translations:Rule Examples/87/en Новая страница: «The following logic is implemented:» текущая
- 20:50, 21 сентября 2022 разн. история +251 Н Translations:Rule Examples/86/en Новая страница: «[https://github.com/contactless/wb-rules-system/blob/master/rules/power_status.js Rule] creates a virtual device that reports the current power status. Two ADC channels are used as input data: battery voltage measurement and input voltage measurement.» текущая
- 20:50, 21 сентября 2022 разн. история −90 Rule Examples/en Новая страница: «runShellCommand("echo " + period + " > /sys/class/pwm/pwmchip0/pwm2/period"); runShellCommand("echo " + duty_cycle + " > /sys/class/pwm/pwmchip0/pwm2/duty_cycle"); };» Метки: правка с мобильного устройства правка из мобильной версии
- 20:49, 21 сентября 2022 разн. история +25 Н Translations:Rule Examples/85/en Новая страница: «=== Power status rule ===» текущая
- 20:49, 21 сентября 2022 разн. история −280 Rule Examples/en Новая страница: «defineRule({ whenChanged: "wb-mcm8_20/Input 1 Long Press Counter", then: function (newValue, devName, cellName) { // Start a timer that will increase the value of the control startTicker("input1_long_press", 75); } });»
- 20:49, 21 сентября 2022 разн. история +18 Н Translations:Rule Examples/84/en Новая страница: «</syntaxhighlight>» текущая
- 20:49, 21 сентября 2022 разн. история +354 Н Translations:Rule Examples/83/en Новая страница: «defineRule("_system_buzzer_onof", { whenChanged: "buzzer/enabled", then: function (newValue, devName, cellName) { if ( dev.buzzer.enabled) { _buzzer_set_params(); runShellCommand("echo 1 > /sys/class/pwm/pwmchip0/pwm2/enable"); } else { runShellCommand("echo 0 > /sys/class/pwm/pwmchip0/pwm2/enable"); } } });» текущая
- 20:49, 21 сентября 2022 разн. история +121 Н Translations:Rule Examples/82/en Новая страница: «then: function (newValue, devName, cellName) { if ( dev.buzzer.enabled) { _buzzer_set_params(); } } });» текущая
- 20:49, 21 сентября 2022 разн. история +106 Н Translations:Rule Examples/81/en Новая страница: «defineRule("_system_buzzer_params", { whenChanged: [ "buzzer/frequency", "buzzer/volume", ],» текущая
- 20:49, 21 сентября 2022 разн. история −224 Rule Examples/en Новая страница: «function _buzzer_set_params() { var period = parseInt(1.0 / dev.buzzer.frequency * 1E9); var duty_cycle = parseInt(dev.buzzer.volume * 1.0 / 100 * period * 0.5);»
- 20:49, 21 сентября 2022 разн. история +174 Н Translations:Rule Examples/80/en Новая страница: «runShellCommand("echo " + period + " > /sys/class/pwm/pwmchip0/pwm2/period"); runShellCommand("echo " + duty_cycle + " > /sys/class/pwm/pwmchip0/pwm2/duty_cycle"); };» текущая
- 20:49, 21 сентября 2022 разн. история +179 Н Translations:Rule Examples/79/en Новая страница: «function _buzzer_set_params() { var period = parseInt(1.0 / dev.buzzer.frequency * 1E9); var duty_cycle = parseInt(dev.buzzer.volume * 1.0 / 100 * period * 0.5);» текущая
- 20:49, 21 сентября 2022 разн. история +73 Н Translations:Rule Examples/78/en Новая страница: «// setup pwm2 runShellCommand("echo 2 > /sys/class/pwm/pwmchip0/export");» текущая
- 20:49, 21 сентября 2022 разн. история +263 Н Translations:Rule Examples/77/en Новая страница: «cells: { frequency : { type : "range", value : 3000, max : 7000, }, volume : { type : "range", value : 10, max : 100, }, enabled : { type : "switch", value : false, }, } });» текущая