Добрый день!
Стали часто наблюдать такую картину, когда данные на External Sensor 1 то есть то нет (плавающая ошибка).
Но в топиках есть только два канала по температуре и серийник. На топике с серийником ошибки нет, но это так себе выборка.
Как понять где именно проблема?
Feb 08 18:35:39 IQ467000 wb-mqtt-serial[28564]: INFO: [mqtt] subscription succeeded (message id 1529)
Feb 08 18:35:41 IQ467000 wb-mqtt-serial[28564]: INFO: [modbus] Continuous read enabled [slave_id is 152]
Feb 08 18:35:41 IQ467000 wb-mqtt-serial[28564]: INFO: [modbus] Init: Input 1 set input 1 to 1-wire: setup register <modbus:152:holding: 275> <-- 0 (0x0)
Feb 08 18:35:42 IQ467000 wb-mqtt-serial[28564]: INFO: [modbus] Init: Input 2 set input 2 to 1-wire: setup register <modbus:152:holding: 276> <-- 0 (0x0)
Feb 08 18:35:42 IQ467000 wb-mqtt-serial[28564]: INFO: [serial device] device modbus:152 is connected
Feb 08 18:38:46 IQ467000 wb-mqtt-serial[31273]: WARNING: [serial config] Device WB-M1W2 152 wb-m1w2_152 (WB-M1W2) channel "External Sensor 1" is ignored: Serial protocol error: write and read register address are not defined
Feb 08 18:38:50 IQ467000 wb-mqtt-serial[31273]: INFO: [modbus] Continuous read enabled [slave_id is 152]
Feb 08 18:38:50 IQ467000 wb-mqtt-serial[31273]: INFO: [modbus] Init: Input 1 set input 1 to 1-wire: setup register <modbus:152:holding: 275> <-- 0 (0x0)
Feb 08 18:38:50 IQ467000 wb-mqtt-serial[31273]: INFO: [modbus] Init: Input 2 set input 2 to 1-wire: setup register <modbus:152:holding: 276> <-- 0 (0x0)
Feb 08 18:38:50 IQ467000 wb-mqtt-serial[31273]: INFO: [serial device] device modbus:152 is connected
Feb 08 18:41:06 IQ467000 wb-mqtt-serial[996]: WARNING: [serial config] Device WB-M1W2 152 wb-m1w2_152 (WB-M1W2) channel "External Sensor 1" is ignored: Serial protocol error: write and read register address are not defined
Feb 08 18:41:07 IQ467000 wb-mqtt-serial[996]: INFO: [mqtt] subscription succeeded (message id 1526)
Feb 08 18:41:07 IQ467000 wb-mqtt-serial[996]: INFO: [mqtt] subscription succeeded (message id 1527)
Feb 08 18:41:10 IQ467000 wb-mqtt-serial[996]: INFO: [modbus] Continuous read enabled [slave_id is 152]
Feb 08 18:41:10 IQ467000 wb-mqtt-serial[996]: INFO: [modbus] Init: Input 1 set input 1 to 1-wire: setup register <modbus:152:holding: 275> <-- 0 (0x0)
Feb 08 18:41:10 IQ467000 wb-mqtt-serial[996]: INFO: [modbus] Init: Input 2 set input 2 to 1-wire: setup register <modbus:152:holding: 276> <-- 0 (0x0)
Feb 08 18:41:10 IQ467000 wb-mqtt-serial[996]: INFO: [serial device] device modbus:152 is connected
Feb 09 12:53:47 IQ467000 wb-mqtt-serial[996]: WARNING: [modbus] failed to read 16 input(s) @ 17152 of device modbus:28: Serial protocol error: request timed out
Feb 09 13:20:32 IQ467000 wb-mqtt-serial[996]: WARNING: [modbus] failed to read 2 input(s) @ 7 of device modbus:152: Serial protocol error: request timed out
Feb 09 13:20:32 IQ467000 wb-mqtt-serial[996]: WARNING: [modbus] failed to read 2 input(s) @ 270 of device modbus:152: Serial protocol error: request timed out
Feb 09 13:20:34 IQ467000 wb-mqtt-serial[996]: WARNING: [modbus] failed to read 2 input(s) @ 7 of device modbus:152: Serial protocol error: request timed out
Feb 09 13:20:34 IQ467000 wb-mqtt-serial[996]: WARNING: [serial device] device modbus:152 is disconnected
Feb 09 13:21:02 IQ467000 wb-mqtt-serial[996]: INFO: [modbus] Continuous read enabled [slave_id is 152]
Feb 09 13:21:02 IQ467000 wb-mqtt-serial[996]: INFO: [modbus] Init: Input 1 set input 1 to 1-wire: setup register <modbus:152:holding: 275> <-- 0 (0x0)
Feb 09 13:21:02 IQ467000 wb-mqtt-serial[996]: INFO: [modbus] Init: Input 2 set input 2 to 1-wire: setup register <modbus:152:holding: 276> <-- 0 (0x0)
Feb 09 13:21:02 IQ467000 wb-mqtt-serial[996]: INFO: [serial device] device modbus:152 is connected
Feb 10 00:38:47 IQ467000 wb-mqtt-serial[1588]: WARNING: [serial config] Device WB-M1W2 152 wb-m1w2_152 (WB-M1W2) channel "External Sensor 1" is ignored: Serial protocol error: write and read register address are not defined
Feb 10 00:38:48 IQ467000 wb-mqtt-serial[1588]: INFO: [mqtt] subscription succeeded (message id 1525)
Feb 10 00:38:48 IQ467000 wb-mqtt-serial[1588]: INFO: [mqtt] subscription succeeded (message id 1526)
Feb 10 00:38:51 IQ467000 wb-mqtt-serial[1588]: INFO: [modbus] Continuous read enabled [slave_id is 152]
Feb 10 00:38:51 IQ467000 wb-mqtt-serial[1588]: INFO: [modbus] Init: Input 1 set input 1 to 1-wire: setup register <modbus:152:holding: 275> <-- 0 (0x0)
Feb 10 00:38:51 IQ467000 wb-mqtt-serial[1588]: INFO: [modbus] Init: Input 2 set input 2 to 1-wire: setup register <modbus:152:holding: 276> <-- 0 (0x0)
Feb 10 00:38:51 IQ467000 wb-mqtt-serial[1588]: INFO: [serial device] device modbus:152 is connected
Вообще, было бы удобнее видеть сразу в топиках на каком уровне произошла ошибка, какой-то код может выводить?
Нашел, что можно выводить статус подключения 1Wire, написал такой конфиг:
{
"channels":
[
{
"enabled": true,
"name": "External Sensor 1"
},
{
"enabled": true,
"name": "External Sensor 1 OK"
}
],
"device_type": "WB-M1W2",
"enabled": true,
"slave_id": "126"
}
Но в логах получаю ошибку:
Device WB-M1W2 126 wb-m1w2_126 (WB-M1W2) channel "External Sensor 1 OK" is ignored: Serial protocol error: write and read register address are not defined
wb-mqtt-serial
новый, в шаблоне в /usr/share/wb-mqtt-serial/templates/config-wb-m1w2.json
поле с OK
присутствует.
Что не так написал?