Last login: Thu May 14 18:51:34 2020 from 192.168.15.214 root@wirenboard:~# mosquitto_sub -v -t "/devices/nw_tools/controls/Status/"# /devices/nw_tools/controls/Status/meta/type text /devices/nw_tools/controls/Status/meta/order 7 /devices/nw_tools/controls/Status/meta/readonly 1 /devices/nw_tools/controls/Status LAN 14.05.2020 19:00:02 /devices/nw_tools/controls/Status GSM 15.05.2020 14:05:12 /devices/nw_tools/controls/Status LAN 15.05.2020 14:10:02 /devices/nw_tools/controls/Status LAN 14.05.2020 19:00:02 /devices/nw_tools/controls/Status/meta/type text /devices/nw_tools/controls/Status/meta/order 7 /devices/nw_tools/controls/Status/meta/readonly 1 Log: May 15 14:05:01 wirenboard-AHZ2TA3P cron.info CRON[26490]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_wbrules.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:05:01 wirenboard-AHZ2TA3P cron.info CRON[26492]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1) May 15 14:05:01 wirenboard-AHZ2TA3P cron.info CRON[26493]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:05:12 wirenboard-AHZ2TA3P local2.notice pppd[26529]: pppd 2.4.7 started by root, uid 0 May 15 14:05:12 wirenboard-AHZ2TA3P daemon.info wb-rules[27644]: INFO: [rule info] Status is changed to: GSM 15.05.2020 14:05:12 May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: timeout set to 5 seconds May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: abort on (ERROR) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: abort on (BUSY) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: send (ATZ^M) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: expect (OK) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: ATZ^M^M May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: OK May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: -- got it May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26564]: send (^M) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info pppd[26529]: Serial port initialized. May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: abort on (BUSY) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: abort on (NO ANSWER) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: abort on (NO CARRIER) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: abort on (ERROR) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: timeout set to 5 seconds May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: send (ATZ^M) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: expect (OK) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: ATZ^M^M May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: OK May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: -- got it May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: send (AT+CGDCONT=1,"IP","internet"^M) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: expect (OK) May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: ^M May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: AT+CGDCONT=1,"IP","internet"^M^M May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: OK May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: -- got it May 15 14:05:13 wirenboard-AHZ2TA3P local2.info chat[26567]: send (ATD*99***1#^M) May 15 14:05:14 wirenboard-AHZ2TA3P daemon.info ntpd[2792]: 82.193.104.168 local addr 192.168.15.200 -> May 15 14:05:14 wirenboard-AHZ2TA3P local2.info chat[26567]: expect (CONNECT) May 15 14:05:14 wirenboard-AHZ2TA3P local2.info chat[26567]: ^M May 15 14:05:14 wirenboard-AHZ2TA3P local2.info chat[26567]: ATD*99***1#^M^M May 15 14:05:14 wirenboard-AHZ2TA3P local2.info chat[26567]: CONNECT May 15 14:05:14 wirenboard-AHZ2TA3P local2.info chat[26567]: -- got it May 15 14:05:14 wirenboard-AHZ2TA3P local2.info pppd[26529]: Serial connection established. May 15 14:05:14 wirenboard-AHZ2TA3P local2.info pppd[26529]: Using interface ppp0 May 15 14:05:14 wirenboard-AHZ2TA3P local2.notice pppd[26529]: Connect: ppp0 <--> /dev/ttyACM0 May 15 14:05:15 wirenboard-AHZ2TA3P local2.warn pppd[26529]: kernel does not support PPP filtering May 15 14:05:20 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 holding(s) @ 5037 of device modbus:1: Serial protocol error: request and response slave id mismatch May 15 14:05:21 wirenboard-AHZ2TA3P local2.notice pppd[26529]: local IP address 10.205.59.190 May 15 14:05:21 wirenboard-AHZ2TA3P local2.notice pppd[26529]: remote IP address 10.205.59.190 May 15 14:05:21 wirenboard-AHZ2TA3P local2.notice pppd[26529]: primary DNS address 193.41.60.15 May 15 14:05:21 wirenboard-AHZ2TA3P local2.notice pppd[26529]: secondary DNS address 193.41.60.16 May 15 14:05:21 wirenboard-AHZ2TA3P daemon.info dnsmasq[2859]: reading /etc/resolv.conf May 15 14:05:21 wirenboard-AHZ2TA3P daemon.info dnsmasq[2859]: using nameserver 193.41.60.15#53 May 15 14:05:21 wirenboard-AHZ2TA3P daemon.info dnsmasq[2859]: using nameserver 193.41.60.16#53 May 15 14:05:23 wirenboard-AHZ2TA3P daemon.info ntpd[2792]: Listen normally on 18 ppp0 10.205.59.190:123 May 15 14:06:01 wirenboard-AHZ2TA3P cron.info CRON[26648]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:06:36 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 holding_multi(s) @ 8 of device modbus:5: Serial protocol error: invalid crc May 15 14:06:47 wirenboard-AHZ2TA3P user.notice wb-mqtt-db[537]: 2020-05-15 14:06:47.544 NOTICE: Bulk processing took 110ms May 15 14:06:48 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 coil(s) @ 1 of device modbus:15: Serial protocol error: invalid crc May 15 14:06:53 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 holding_multi(s) @ 4 of device modbus:5: Serial protocol error: malformed response: invalid data size May 15 14:07:01 wirenboard-AHZ2TA3P cron.info CRON[26721]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:08:02 wirenboard-AHZ2TA3P cron.info CRON[26800]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:08:08 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 holding_multi(s) @ 8 of device modbus:5: Serial protocol error: malformed response: invalid data size May 15 14:08:47 wirenboard-AHZ2TA3P user.notice wb-mqtt-db[537]: 2020-05-15 14:08:47.512 NOTICE: Bulk processing took 78ms May 15 14:09:01 wirenboard-AHZ2TA3P cron.info CRON[26871]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:09:49 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 4 input(s) @ 316 of device modbus:60: Serial protocol error: request timed out May 15 14:10:01 wirenboard-AHZ2TA3P cron.info CRON[26954]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_wbrules.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:10:01 wirenboard-AHZ2TA3P cron.info CRON[26955]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:10:02 wirenboard-AHZ2TA3P local2.info pppd[26529]: Terminating on signal 15 May 15 14:10:02 wirenboard-AHZ2TA3P local2.info pppd[26529]: Connect time 4.7 minutes. May 15 14:10:02 wirenboard-AHZ2TA3P local2.info pppd[26529]: Sent 13482 bytes, received 2162 bytes. May 15 14:10:02 wirenboard-AHZ2TA3P local2.notice pppd[26529]: Connection terminated. May 15 14:10:02 wirenboard-AHZ2TA3P daemon.info wb-rules[27644]: INFO: [rule info] Status is changed to: LAN 15.05.2020 14:10:02 May 15 14:10:02 wirenboard-AHZ2TA3P daemon.info dnsmasq[2859]: reading /etc/resolv.conf May 15 14:10:02 wirenboard-AHZ2TA3P daemon.info dnsmasq[2859]: using nameserver 192.168.15.1#53 May 15 14:10:02 wirenboard-AHZ2TA3P local2.info pppd[26529]: Exit. May 15 14:10:04 wirenboard-AHZ2TA3P daemon.info ntpd[2792]: Deleting interface #18 ppp0, 10.205.59.190#123, interface stats: received=0, sent=3, dropped=0, active_time=281 secs May 15 14:10:04 wirenboard-AHZ2TA3P daemon.info ntpd[2792]: 82.193.104.168 local addr 10.205.59.190 -> May 15 14:10:47 wirenboard-AHZ2TA3P user.notice wb-mqtt-db[537]: 2020-05-15 14:10:47.551 NOTICE: Bulk processing took 116ms May 15 14:11:02 wirenboard-AHZ2TA3P cron.info CRON[27069]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:12:00 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 holding_multi(s) @ 4 of device modbus:5: Serial protocol error: invalid crc May 15 14:12:01 wirenboard-AHZ2TA3P cron.info CRON[27148]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) May 15 14:12:26 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 discrete(s) @ 3 of device modbus:15: Serial protocol error: malformed response: invalid data size May 15 14:12:42 wirenboard-AHZ2TA3P user.notice serial: ModbusRTU::ReadRegisterRange(): failed to read 1 discrete(s) @ 2 of device modbus:15: Serial protocol error: invalid crc May 15 14:12:47 wirenboard-AHZ2TA3P user.notice wb-mqtt-db[537]: 2020-05-15 14:12:47.519 NOTICE: Bulk processing took 84ms May 15 14:13:01 wirenboard-AHZ2TA3P cron.info CRON[27223]: (root) CMD (/usr/share/wb-daemon-watchdogs/check_confed.sh 2>&1 | logger -t wb-daemon-watchdogs) Rules: defineVirtualDevice('nw_tools', { title: 'Interfaces', cells: { 'Router IP': { type: 'text', value: '' }, 'Enable backup': { type: 'switch', value: false }, 'Status': { type: 'text', value: '' }, } }); defineRule('check_connection', { when: cron('0 0/5 * * * ?'), then: function () { if (dev['nw_tools']['Enable backup']) { runShellCommand("connection-check", { captureOutput: true, exitCallback: function (exitCode, capturedOutput) { capturedOutput = capturedOutput.trim(); if (capturedOutput) { dev['nw_tools']['Status'] = capturedOutput; log("Status is changed to: {}", capturedOutput); } } }); } } });