● wb-rules.service - MQTT Rule engine for Wiren Board
Loaded: loaded (/lib/systemd/system/wb-rules.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2024-01-18 09:17:56 UTC; 1min 8s ago
Main PID: 5853 (wb-rules)
Tasks: 22 (limit: 2354)
Memory: 20.3M
CPU: 1min 23.928s
CGroup: /system.slice/wb-rules.service
├─5853 /usr/bin/wb-rules -syslog -editdir /etc/wb-rules/ /usr/share/wb-rules-system/rules/ /etc/wb-rules/ /usr/share/wb-rules/
├─6633 /bin/sh -c ls -1 /sys/class/power_supply/
└─6634 ls -1 /sys/class/power_supply/
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K6: false
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K5: false
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K6: true
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K5: false
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K6: true
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K5: false
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K6: true
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K5: false
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K6: true
Jan 18 09:18:27 wirenboard-AGD6ZCYY wb-rules[5853]: ERROR: [rule error] failed to SetValue for unexisting control wb-mr6c_42/K5: false
Вот такие ошибки в rules…
Код правила:
var bedroom_step1 = false;
var next_step1 = false;
var bedroom_step2 = false;
var next_step2 = false;
defineRule({
//whenChanged: ["wb-mr6c_42/Input 1","wb-mr6c_42/Input 4"],
whenChanged: "wb-gpio/A3_OUT",
then: function () {
if (bedroom_step1 && !next_step1 && dev["wb-mr6c_42/K1"] && !dev["wb-mr6c_42/K2"]) {
dev["wb-mr6c_42/K1"] = true;
dev["wb-mr6c_42/K2"] = true;
bedroom_step1 = true;
next_step1 = true;
}
if (bedroom_step1 && next_step1 && dev["wb-mr6c_42/K1"] && dev["wb-mr6c_42/K2"]) {
dev["wb-mr6c_42/K1"] = false;
dev["wb-mr6c_42/K2"] = false;
bedroom_step1 = false;
next_step1 = false;
}
if (!bedroom_step1 && !next_step1 && !dev["wb-mr6c_42/K1"] && !dev["wb-mr6c_42/K2"]) {
dev["wb-mr6c_42/K1"] = true;
dev["wb-mr6c_42/K2"] = false;
bedroom_step1 = true;
next_step1 = false;
}
}
});