Останавливаю wb-mqtt-gpio
Я решил проблему, но пока не знаю почему оно так работает.
У меня wb-mqtt-serial.
ЛОГ
2023-07-25T09:47:52.426Z [wb-rules] INFO: all rule files are loaded
2023-07-25T09:47:52.367Z [wb-rules] INFO: [rule info] add your rules to /etc/wb-rules/
2023-07-25T09:47:52.304Z [wb-rules] WARNING: [rule warning] Создаем виртуальный девайс SMS Center
2023-07-25T09:47:52.227Z [wb-rules] ERROR: control Котельная 3/Авария - Пожар в котельной SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.217Z [wb-rules] ERROR: control Котельная 3/Авария - Загазованность в котельной SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.211Z [wb-rules] ERROR: control Котельная 3/Авария - Давление в контуре подпитки котла SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.198Z [wb-rules] ERROR: control Котельная 3/Газовый клапан открыт,закрыт SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.192Z [wb-rules] ERROR: control Котельная 3/Авария - Давление в контуре сетевой воды SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.192Z [wb-rules] ERROR: control Котельная 3/Авария - Давление в контуре сетевой воды SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.176Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 3 SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.167Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 2 SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.159Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 1 SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:52.152Z [wb-rules] ERROR: control Котельная 3/Авария парового котла SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
2023-07-25T09:47:51.644Z [wb-rules] WARNING: [rule warning] Создаем виртуальный девайс Котельная 3
2023-07-25T09:47:51.597Z [wb-rules] INFO: [rule info] error running command callback for /bin/sh: Error: error error (rc -100)
anon native strict preventsyield
init /usr/share/wb-rules-system/rules/wb-mqtt-dac.js:14
anon /usr/share/wb-rules-system/rules/wb-mqtt-dac.js:77
anon /usr/share/wb-rules-system/scripts/lib.js:339 preventsyield
2023-07-25T09:47:50.432Z [wb-rules] INFO: [engine] Starting sync loop
2023-07-25T09:47:50.432Z [wb-rules] INFO: the engine is ready
2023-07-25T09:47:50.432Z [wb-rules] INFO: the engine is ready
2023-07-25T09:47:50.431Z [wb-rules] INFO: [engine] Starting main loop
2023-07-25T09:47:50.361Z [wb-rules] INFO: [wbgo_mqtt] wb-rules-engine-wirenboard-AP5CRMOL-5004: MQTT connection established
2023-07-25T09:47:50.354Z [wb-rules] INFO: [rule info] using file /var/lib/wirenboard/wbrules-persistent.db for persistent DB
2023-07-25T09:47:50.344Z [wb-rules] INFO: driver is ready
2023-07-25T09:47:49.862Z [wb-rules] INFO: wait for driver to become ready
2023-07-25T09:47:49.859Z [wb-rules] INFO: driver loop is started
2023-07-25T09:47:49.851Z [wb-rules] INFO: [wbgo_mqtt] rules-wirenboard-AP5CRMOL-5004: MQTT connection established
2023-07-25T09:47:49.851Z [wb-rules] INFO: [wbgo_mqtt] rules-wirenboard-AP5CRMOL-5004: MQTT connection established
2023-07-25T09:47:49.850Z [wb-rules] INFO: driver is created
2023-07-25T09:47:49.846Z [wb-rules] INFO: broker URL is default and mosquitto socket detected, trying to connect via it
2023-07-25T09:47:49.725Z [init] Started MQTT Rule engine for Wiren Board.
2023-07-25T09:47:49.711Z [init] wb-rules.service: Consumed 3min 27.161s CPU time.
2023-07-25T09:47:49.710Z [init] Stopped MQTT Rule engine for Wiren Board.
2023-07-25T09:47:49.709Z [init] wb-rules.service: Succeeded.
2023-07-25T09:47:49.267Z [init] Stopping MQTT Rule engine for Wiren Board…
2023-07-25T09:47:49.263Z [wb-rules] INFO: [engine] Stop main loop
2023-07-25T09:47:49.260Z [wb-rules] INFO: [engine] Stopping sync loop
…
2023-07-25T09:47:35.169Z [wb-rules] INFO: wb-mio-gpio_129:1/IN14: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.168Z [wb-rules] INFO: wb-mio-gpio_129:1/IN14: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.155Z [wb-rules] INFO: wb-mio-gpio_129:1/IN13: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.154Z [wb-rules] INFO: wb-mio-gpio_129:1/IN13: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.132Z [wb-rules] INFO: wb-mio-gpio_129:1/IN12: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.129Z [wb-rules] INFO: wb-mio-gpio_129:1/IN12: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.129Z [wb-rules] INFO: wb-mio-gpio_129:1/IN12: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.123Z [wb-rules] INFO: wb-mio-gpio_129:1/IN11: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.120Z [wb-rules] INFO: wb-mio-gpio_129:1/IN11: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.112Z [wb-rules] INFO: wb-mio-gpio_129:1/IN10: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.108Z [wb-rules] INFO: wb-mio-gpio_129:1/IN10: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.100Z [wb-rules] INFO: wb-mio-gpio_129:1/IN9: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.099Z [wb-rules] INFO: wb-mio-gpio_129:1/IN9: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.090Z [wb-rules] INFO: wb-mio-gpio_129:1/IN8: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.089Z [wb-rules] INFO: wb-mio-gpio_129:1/IN8: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.078Z [wb-rules] INFO: wb-mio-gpio_129:1/IN7: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.078Z [wb-rules] INFO: wb-mio-gpio_129:1/IN7: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.077Z [wb-rules] INFO: wb-mio-gpio_129:1/IN7: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.070Z [wb-rules] INFO: wb-mio-gpio_129:1/IN6: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.067Z [wb-rules] INFO: wb-mio-gpio_129:1/IN6: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.057Z [wb-rules] INFO: wb-mio-gpio_129:1/IN5: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.056Z [wb-rules] INFO: wb-mio-gpio_129:1/IN5: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.049Z [wb-mqtt-serial] INFO: [mqtt] subscription succeeded (message id 1591)
2023-07-25T09:47:35.045Z [wb-mqtt-serial] INFO: [mqtt] subscription succeeded (message id 1590)
2023-07-25T09:47:35.043Z [wb-rules] INFO: wb-mio-gpio_129:1/IN4: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.041Z [wb-rules] INFO: wb-mio-gpio_129:1/IN4: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.041Z [wb-rules] INFO: wb-mio-gpio_129:1/IN4: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.034Z [wb-rules] INFO: wb-mio-gpio_129:1/IN3: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.033Z [wb-rules] INFO: wb-mio-gpio_129:1/IN3: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.031Z [wb-rules] INFO: wb-mio-gpio_129:1/IN2: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.030Z [wb-rules] INFO: wb-mio-gpio_129:1/IN2: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.023Z [wb-rules] INFO: wb-mio-gpio_129:1/IN1: failed to convert value ‘’, passing raw, error: This control is incomplete
2023-07-25T09:47:35.020Z [wb-rules] INFO: wb-mio-gpio_129:1/IN1: failed to convert value ‘’, passing raw, error: This control is incomplete
…
2023-07-25T09:47:33.003Z [wb-mqtt-serial] INFO: [mqtt] connection estabilished with code “0”
2023-07-25T09:47:32.996Z [wb-mqtt-serial] INFO: [mqtt] UNIX socket exists, using it for connection
2023-07-25T09:47:32.996Z [wb-mqtt-serial] INFO: [mqtt] UNIX socket exists, using it for connection
2023-07-25T09:47:32.996Z [wb-mqtt-serial] INFO: [mqtt] Default host and port detected, checking if UNIX socket exists on /var/run/mosquitto/mosquitto.sock
2023-07-25T09:47:32.718Z [wb-mqtt-serial] INFO: [serial config] “WB-MAP3E fw2 168” channel “Uptime” override property “enabled”
2023-07-25T09:47:32.718Z [wb-mqtt-serial] INFO: [serial config] “WB-MAP3E fw2 168” channel “FW Version” override property “enabled”
2023-07-25T09:47:30.620Z [init] Started MQTT Driver for serial devices.
2023-07-25T09:47:30.607Z [init] wb-mqtt-serial.service: Consumed 1min 31.308s CPU time.
2023-07-25T09:47:30.607Z [init] Stopped MQTT Driver for serial devices.
2023-07-25T09:47:30.605Z [init] wb-mqtt-serial.service: Succeeded.
…
2023-07-25T09:47:24.174Z [init] Stopping MQTT Driver for serial devices…
2023-07-25T09:47:24.171Z [wb-mqtt-serial] INFO: [signal handling] Received signal 15
- 2023-07-25T09:47:24.174Z [init] Stopping MQTT Driver for serial devices…
Останавливает wb-mqtt-serial.service для внесения изменений через WEB.
- 2023-07-25T09:47:30.607Z [init] Stopped MQTT Driver for serial devices.
остановлено
- 2023-07-25T09:47:30.620Z [init] Started MQTT Driver for serial devices.
Запуск
- Далее сыпятся сообщения в основном про This control is incomplete. Нас интересует конкретно это устройство:
2023-07-25T09:47:35.020Z [wb-rules] INFO: wb-mio-gpio_129:1/IN1: failed to convert value ‘’, passing raw, error: This control is incomplete
Но тут тоже все ок. Других сообщений нет.
- 2023-07-25T09:47:49.263Z [wb-rules] INFO: [engine] Stop main loop
Я перезапускаю wb-rules # service wb-rules restart
- в логе много ругательств, но все начинает работать.
Немного отступлю. Я когда-то, месяц назад, пытался изменить свой же скрипт и изменил одну строку, только в одном правиле. Но меня отвлекли и я забыл про нее.
Вернемся.
- 2023-07-25T09:47:52.176Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 3 SetValue() error: can’t convert control value ‘274.51024’ (type float64) to datatype ‘1’
Это сообщение дает устройство wb-mio-gpio_129:1/IN7. Но этого не может быть, потому что оно switch.
Скрин + Rules
WB-V-K3-1.js (4,7 КБ)
WB-V-K3-1_old.js (4,7 КБ)
Т.е. проблема с * с “флет” данных, зависает wb_rules, зависают правила появляется только тогда, когда я явно указываю присвоить новое значение устройству через правило:
Строка 73,90
- dev[vkont + “/” + vd[0]] = newValue;
При этом значение устанавливается ‘274.51024’ (type float64)
Лог выглядит так
2023-07-25T10:01:43.427Z [wb-rules] ERROR: control Котельная 3/Авария - Пожар в котельной SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.422Z [wb-rules] ERROR: control Котельная 3/Авария - Загазованность в котельной SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.417Z [wb-rules] ERROR: control Котельная 3/Авария - Давление в контуре подпитки котла SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.412Z [wb-rules] ERROR: control Котельная 3/Газовый клапан открыт,закрыт SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.406Z [wb-rules] ERROR: control Котельная 3/Авария - Давление в контуре сетевой воды SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.400Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 3 SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.395Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 2 SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.395Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 2 SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.386Z [wb-rules] ERROR: control Котельная 3/Авария водогрейного котла 1 SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.378Z [wb-rules] ERROR: control Котельная 3/Авария парового котла SetValue() error: can’t convert control value ‘338.93’ (type float64) to datatype ‘1’
2023-07-25T10:01:43.016Z [wb-rules] WARNING: [rule warning] Создаем виртуальный девайс Котельная 3
2023-07-25T10:01:42.994Z [wb-rules] INFO: reloading file: /etc/wb-rules/WB-V-K3-1.js
2023-07-25T10:01:39.112Z [wb-rules] INFO: LiveRemoveFile: /etc/wb-rules/WB-V-K4-1.js
Если я указываю взять значение из устройства, то все OK:
Строка 73,90
- dev[vkont + “/” + vd[0]] = dev[vd[1]];
Лог выглядит так
2023-07-25T10:08:20.102Z [wb-rules] WARNING: [rule warning] Создаем виртуальный девайс Котельная 3
2023-07-25T10:08:20.102Z [wb-rules] WARNING: [rule warning] Создаем виртуальный девайс Котельная 3
2023-07-25T10:08:20.070Z [wb-rules] INFO: reloading file: /etc/wb-rules/WB-V-K3-1.js
2023-07-25T10:02:37.258Z [wb-rules] INFO: LiveRemoveFile: /etc/wb-rules/WB-V-K3-1.js
Идеи?
Кстати, wb-mqtt-gpio делает Очистку, а wb-mqtt-serial нет.
- Jul 25 07:34:41 wirenboard-AWI3MCGC wb-mqtt-gpio[6637]: INFO: [gpio driver] Cleaning…
Такого сообщения не будет для wb-mqtt-serial.
Так что кнопка - решение.
Осталось только решить вопрос с Serial protocol error: request timed out. Сейчас 2-3 сообщения в минуту.
Проблемы
25-07-2023 13:59:08.045 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 1536 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:58:32.558 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 104 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:55:37.687 [wb-mqtt-serial] WARNING: [modbus] failed to read 14 coil(s) @ 0 of device modbus_io-tcp:45:1: Serial protocol error: request timed out
25-07-2023 13:55:16.326 [wb-mqtt-serial] WARNING: [modbus] failed to read 1 input(s) @ 21764 of device modbus-tcp:36: Serial protocol error: request timed out
25-07-2023 13:55:14.983 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 1536 of device modbus-tcp:143: Serial protocol error: request timed out
25-07-2023 13:54:59.105 [wb-mqtt-serial] WARNING: [modbus] failed to read 6 input(s) @ 5376 of device modbus-tcp:143: Serial protocol error: request timed out
25-07-2023 13:54:50.221 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 1536 of device modbus-tcp:182: Serial protocol error: request timed out
25-07-2023 13:54:09.492 [wb-mqtt-serial] WARNING: [modbus] failed to read 1 input(s) @ 21764 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:53:55.432 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 1536 of device modbus-tcp:143: Serial protocol error: request timed out
25-07-2023 13:52:48.864 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 1536 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:52:48.864 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 1536 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:51:59.798 [wb-mqtt-serial] WARNING: [modbus] failed to read 6 input(s) @ 5376 of device modbus-tcp:143: Serial protocol error: request timed out
25-07-2023 13:50:46.615 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 270 of device modbus-tcp:143: Serial protocol error: request timed out
25-07-2023 13:49:25.075 [wb-mqtt-serial] WARNING: [modbus] failed to read 14 coil(s) @ 0 of device modbus_io-tcp:45:1: Serial protocol error: request timed out
25-07-2023 13:47:19.925 [wb-mqtt-serial] WARNING: [modbus] failed to read 1 input(s) @ 21764 of device modbus-tcp:36: Serial protocol error: request timed out
25-07-2023 13:47:12.465 [wb-mqtt-serial] WARNING: [modbus] failed to read 1 input(s) @ 21764 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:46:58.495 [wb-mqtt-serial] WARNING: [modbus] failed to read 1 input(s) @ 5380 of device modbus-tcp:36: Serial protocol error: request timed out
25-07-2023 13:46:53.486 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 270 of device modbus-tcp:182: Serial protocol error: request timed out
25-07-2023 13:46:47.715 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 5136 of device modbus-tcp:118: Serial protocol error: request timed out
25-07-2023 13:45:41.245 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 270 of device modbus-tcp:220: Serial protocol error: request timed out
25-07-2023 13:45:41.245 [wb-mqtt-serial] WARNING: [modbus] failed to read 2 input(s) @ 270 of device modbus-tcp:220: Serial protocol error: request timed out
Ну и аккумуляторы.
- 2 Стоят в котельных (и щас стоят) ~3 мес при температуре акк 50С ±3
Заряд не идет в прошивке wb-2304, 1%, 3.388V.
- 1 Стоял в котельной ~1 мес при температуре акк 50С ±3
Заряд не идет в прошивке wb-2304, 1%, 3.388V.
- 2 Стоят в ТП ~10 мес при температуре акк <40С
Нормальная работа в прошивке wb-2207.
Взяли отдельно акк из пункта 2. Провели заряд отдельно от модуля.
1,8 А, 40 мин. ~500 мА забрал. Не нагревался.
После этого, установил в WB7 7.3.3E, wb-2304, stable, s/n ADJOPAFR. В модуле в WB он выдал 16% заряда и начал разряжаться до 11% (я начал запись видео, но на 11 остановилось и все.) На след. день утром заряд был 7%.
После этого, установил в WB7 7.3.3E, wb-2207, stable, s/n AEFV4UMT. Батарея начала заряжаться, и уже 24% за 10 мин.
Батарея, которая была в WB7 7.3.3E, wb-2207, stable, s/n AEFV4UMT установил в ADJOPAFR.
Идет заряд 93%, 4,122 V
Эту же батарею установил обратно в WB7 7.3.3E, wb-2304, stable, s/n ADJOPAFR
28% и не включается заряд.
Включение заряда позволяет начать заряд, но он сам выключается через некоторое время.
Ну и подозрительно быстрый разряд. Видно на видео.
График заряда батареи. Вчера-сегодня (7,5 КБ)
Спустя 30 минут.
Установили новый, искаропки, акк батарею, установили в тот же модуль. Заряжает автоматически, заряд держит.
Вывод - умерли аккумуляторы.
Спустя 3 часа.
Новый акк без заряда на включенном WB саморазряд 1% за 3 часа.