Все доступные журналы
Общий список журналов сайта Wiren Board. Вы можете отфильтровать результаты по типу журнала, имени участника (учитывается регистр) или затронутой странице (также учитывается регистр).
(новейшие | старейшие) Просмотреть (50 более новых | 50 более старых) (20 | 50 | 100 | 250 | 500)- 20:54, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/101/en (Новая страница: «Create a virtual device with switch type control via rules engine.»)
- 20:53, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/99/en (Новая страница: «</syntaxhighlight> == Sending commands via RS-485 ==»)
- 20:53, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/98/en (Новая страница: «</syntaxhighlight>»)
- 20:51, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/94/en (Новая страница: «} });»)
- 20:51, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/93/en (Новая страница: «cells: { 'working on battery' : { type : "switch", value : false, readonly : true }, 'Vin' : { type : "voltage", value : 0 }»)
- 20:51, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/92/en (Новая страница: «defineVirtualDevice("power_status", { title: "Power status", //»)
- 20:51, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/91/en (Новая страница: «<syntaxhighlight lang="ecmascript">»)
- 20:50, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/87/en (Новая страница: «The following logic is implemented:»)
- 20:50, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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:49, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/85/en (Новая страница: «=== Power status rule ===»)
- 20:49, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/84/en (Новая страница: «</syntaxhighlight>»)
- 20:49, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/82/en (Новая страница: «then: function (newValue, devName, cellName) { if ( dev.buzzer.enabled) { _buzzer_set_params(); } } });»)
- 20:49, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/81/en (Новая страница: «defineRule("_system_buzzer_params", { whenChanged: [ "buzzer/frequency", "buzzer/volume", ],»)
- 20:49, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу 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 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/78/en (Новая страница: «// setup pwm2 runShellCommand("echo 2 > /sys/class/pwm/pwmchip0/export");»)
- 20:49, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу 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, }, } });»)
- 20:48, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/76/en (Новая страница: «<syntaxhighlight lang="ecmascript"> defineVirtualDevice("buzzer", { title: "Buzzer", //»)
- 20:48, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/75/en (Новая страница: «[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.»)
- 20:48, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/74/en (Новая страница: «=== Rule for tweeters ===»)
- 20:48, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/73/en (Новая страница: «A few examples of system rules are below.»)
- 20:48, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/222/en (Новая страница: «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.<code></code>»)
- 20:46, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/70/en (Новая страница: «=== System rules ===»)
- 20:46, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/221/en (Новая страница: «<div class="NavFrame"> <div class="NavContent"> <syntaxhighlight lang="ecmascript"> defineRule("msw3_Motion", { whenChanged: "wb-msw-v3_97/Max Motion", then: function(newValue, devName, cellName) { if (newValue > 50) { if (dev["wb-msw-v3_97"]["Illuminance"] < 50) { dev["wb-mr3_11"]["K1"] = true; } } else { dev["wb-mr3_11"]["K1"] = false; } } }); </syntaxhighlight> </div...»)
- 20:46, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/220/en (Новая страница: «if (co2_good) { dev[devName]["Green LED"] = true; dev[devName]["Red LED"] = false; dev[devName]["LED Period (s)"] = 10; } if (co2_middle) { dev[devName]["Green LED"] = true; dev[devName]["Red LED"] = true; dev[devName]["LED Period (s)"] = 5; } if (co2_bad) { dev[devName]["Green LED"] = false; dev[devName]["Red LED"] = true;...»)
- 20:46, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/219/en (Новая страница: «When the CO2 concentration is over 1001, we flash red once a second. <div class="mw-collapsible mw-collapsed"; style="width:600px; overflow: hidden;"> <syntaxhighlight lang="ecmascript"> defineRule("msw3_co2", { whenChanged: "wb-msw-v3_97/CO2", then: function(newValue, devName, cellName) { var co2_good = newValue < 650; var co2_middle = newValue < 1000 && newValue > 651; var co2_bad = newValue > 1001;»)
- 20:45, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/218/en (Новая страница: «When the CO2 concentration is over 651, but less than 1000, we flash yellow once every 5 seconds.»)
- 20:45, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/217/en (Новая страница: «=== CO2 === When the CO2 concentration is less than 650, we flash green once every 10 seconds.»)
- 20:45, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/216/en (Новая страница: «When connecting the WB-MSW v.3 sensor to the Wiren Board controller, it is possible to create interesting scenarios using data from the sensor. For example, turn on the light when moving, signal with LEDs when the CO2 or VOC value is exceeded, turn on the air conditioner if it is hot or the air humidifier if the air is too dry. Rules are created individually for tasks. Here we will give some examples to understand the principle of working with the sensor. Mo...»)
- 20:45, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/215/en (Новая страница: «== Sensor MSW v.3 ==»)
- 20:45, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/214/en (Новая страница: «=== Generic module for wb-rules === We wrote a module for wb-rules [https://github.com/wirenboard/wb-community/tree/main/wb-press-actions wb-press-actions] that makes it easy to handle clicks in your scripts.»)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/213/en (Новая страница: «</syntaxhighlight>»)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/212/en (Новая страница: «if (i > 0 && dev["wb-mcm8_20/Input 1"]) { i-- dev["wb-mdm3_58/Channel 1"] = i } else { timers["input1_shortlong_press"].stop(); } } });»)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/211/en (Новая страница: «// A rule that will decrease the brightness on a timer defineRule({ when: function () { return timers["input1_shortlong_press"].firing; }, then: function () { var i = dev["wb-mdm3_58/Channel 1"];»)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/210/en (Новая страница: «defineRule({ whenChanged: "wb-mcm8_20/Input 1 Shortlong Press Counter", then: function (newValue, devName, cellName) { // Start a timer that will decrease the value of the control startTicker("input1_shortlong_press", 75); } });»)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/209/en (Новая страница: «--------------------------------------------: 4. Shortlong Press Counter: Decrease brightness: --------------------------------------------: »)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/208/en (Новая страница: «if (i < 100 && dev["wb-mcm8_20/Input 1"]) { i++ dev["wb-mdm3_58/Channel 1"] = i } else { timers["input1_long_press"].stop(); } } });»)
- 20:44, 21 сентября 2022 Matveevrj обсуждение вклад создал страницу Translations:Rule Examples/207/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"];»)