monitor icon indicating copy to clipboard operation
monitor copied to clipboard

One of 3 stops working correctly after a while

Open michaelblight opened this issue 4 years ago • 2 comments

Not sure there's much you can do about this, but thought I'd let you know anyway. I have monitor running on 3 Pi Zero W's. Two of them work consistently, but the third one (which is actually a WH) stops working properly after "a while" (maybe a day or two?). I control the scan on door openings, and when it scans, I get results, but when it stops working they're always zero confidence (I think - it's possible the confidence is just not changing when it should). Sending a restart over MQTT makes no difference, but when I reboot it starts working again. All three are on 0.2.200. I'm assuming it's some sort of hardware issue given all three should be identical - I monitor them using glances, and CPU is <10%, memory is ~40% and storage use is ~10%.

Do you know if there's anything I can do to check on the status of bluetooth to ensure it's running ok?

michaelblight avatar Jun 03 '20 08:06 michaelblight

I have the same problem with both Zero and pi 4. Monitor just stops working after about an hour. I am running monitor as service and checking with journalctl -u monitor -f.

● monitor.service - Monitor Service Loaded: loaded (/etc/systemd/system/monitor.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2020-06-28 01:40:08 PDT; 10h ago Main PID: 3555 (bash) Memory: 3.1M

   CGroup: /system.slice/monitor.service
           ├─ 3555 /bin/bash /root/monitor/monitor.sh -r -tadr &
           ├─ 3661 /bin/bash /root/monitor/monitor.sh -r -tadr &
           ├─ 3665 /bin/bash /root/monitor/monitor.sh -r -tadr &
           ├─ 3668 /bin/bash /root/monitor/monitor.sh -r -tadr &
           ├─ 3671 /bin/bash /root/monitor/monitor.sh -r -tadr &
           ├─ 3673 /usr/bin/mosquitto_sub -I petar-office -v -F %t|%p -q 2 -L mqtt://mqtt xxxxx 192.168.1.xxx 1883 monitor/# --will-topic monitor/petar-office/status --will-payload offline
           └─27326 sleep 20

the last entry from journalctl:


Jun 28 01:40:56 petar-office bash[3555]: [+] 0.2.200 28-06-2020 01:40:56 am [CMD-MQTT]        monitor/petar-office/heather_phone { ... confidence : 0 ... }
Jun 28 01:40:57 petar-office bash[3555]: [+] 0.2.200 28-06-2020 01:40:57 am [CMD-NAME]        FF:EE:DD:CC:BB:AA heather_phone  Apple Inc
Jun 28 02:20:18 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:18 am [CMD-MQTT]        monitor/petar-office/petar { ... confidence : 90 ... }
Jun 28 02:20:18 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:18 am [CMD-MQTT]        monitor/petar-office/petar { ... confidence : 90 ... }
Jun 28 02:20:22 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:22 am [CMD-MQTT]        monitor/petar-office/petar { ... confidence : 45 ... }
Jun 28 02:20:22 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:22 am [CMD-MQTT]        monitor/petar-office/petar { ... confidence : 45 ... }
Jun 28 02:20:25 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:25 am [CMD-MQTT]        monitor/petar-office/petar { ... confidence : 0 ... }
Jun 28 02:20:25 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:25 am [CMD-MQTT]        monitor/petar-office/petar { ... confidence : 0 ... }
Jun 28 02:20:25 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:25 am [CMD-NAME]        AA:BB:CC:DD:EE:FF petar  Apple Inc
Jun 28 02:20:26 petar-office bash[3555]: [+] 0.2.200 28-06-2020 02:20:26 am [CMD-NAME]        AA:BB:CC:DD:EE:FF petar  Apple Inc

2am is when I went to bed :)

The bedroom monitor:


- Logs begin at Sat 2020-06-27 23:07:06 PDT. --
Jun 28 01:41:42 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:42 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 90 ... }
Jun 28 01:41:42 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:42 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 90 ... }
Jun 28 01:41:45 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:45 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 54 ... }
Jun 28 01:41:45 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:45 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 54 ... }
Jun 28 01:41:46 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:46 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 27 ... }
Jun 28 01:41:46 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:46 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 27 ... }
Jun 28 01:41:48 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:48 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 0 ... }
Jun 28 01:41:48 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:48 am [CMD-MQTT]        monitor/main-bedroom/petar { ... confidence : 0 ... }
Jun 28 01:41:48 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:48 am [CMD-NAME]        AA:BB:CC:DD:EE:FF petar  Apple Inc
Jun 28 01:41:49 main-bedroom bash[19367]: [+] 0.2.200 28-06-2020 01:41:49 am [CMD-NAME]        AA:BB:CC:DD:EE:FF petar  Apple Inc

petarvucetin avatar Jun 28 '20 19:06 petarvucetin

Looking at the processes they are all sleeping:

╰─➤  head -11 /proc/19476/status
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   19476
Ngid:   0
Pid:    19476
PPid:   19367
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 256
╭─root@main-bedroom /home/petar
╰─➤  head -11 /proc/19478/status
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   19478
Ngid:   0
Pid:    19478
PPid:   19367
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 256
╭─root@main-bedroom /home/petar
╰─➤  head -11 /proc/19472/status
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   19472
Ngid:   0
Pid:    19472
PPid:   19367
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 256
╭─root@main-bedroom /home/petar
╰─➤  head -11 /proc/19482/status
Name:   bash
Umask:  0022
State:  S (sleeping)
Tgid:   19482
Ngid:   0
Pid:    19482
PPid:   19476
TracerPid:      0
Uid:    0       0       0       0
Gid:    0       0       0       0
FDSize: 256
╭─root@main-bedroom /home/petar

petarvucetin avatar Jun 28 '20 19:06 petarvucetin