The cb dsm now has a script installed which monitors the snow pillow data.  If any pillow does not report Load data for 20 minutes, the script cycles the BANK1 power relay.  There is a built-in recovery time of 1 hour, so if a sensor is broken for some other reason, the power will never cycle more often than once an hour.  The crontab entry which cycled power once each day has been commented out.

The script is running as a systemd user unit.  Use this command to see the status:

daq@cb:~ $ systemctl --user status snow_pillows_monitor.service 
● snow_pillows_monitor.service - Monitor snow pillows at SOS and cycle power when a pillow not reporting.
   Loaded: loaded (/home/daq/isfs/projects/SOS/ISFS/scripts/./snow_pillows_monitor.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2023-01-19 21:19:34 UTC; 2h 35min ago
 Main PID: 5611 (python3)
   CGroup: /user.slice/user-1001.slice/user@1001.service/snow_pillows_monitor.service
           ├─5611 python3 /home/daq/isfs/projects/SOS/ISFS/scripts/snow_pillows_monitor.py --log info
           └─5626 data_stats -p -a -i 40,1052 -i 40,1054 -i 40,1056 -i 40,1058 -P 60 -n 0 --json /tmp/data_stats.abemv6jg/data_stats.json

Jan 19 23:20:37 cb bash[5611]: INFO:__main__:updated stream SOS.40.1056: {"Load.1.p3":[48.462],"Load.2.p3":[53.189],"Load.3.p3":[50.822],"Load.4.p3":[46.256],"streamid":"SOS.40.1056","time":["2023-01-19T23:
Jan 19 23:21:37 cb bash[5611]: INFO:__main__:updated stream SOS.40.1058: {"Load.1.p4":[52.252],"Load.2.p4":[47.441],"Load.3.p4":[52.397],"Load.4.p4":[51.611],"streamid":"SOS.40.1058","time":["2023-01-19T23:

Use this command to watch the log output:

daq@cb:~ $ journalctl --user -f --unit snow_pillows_monitor

The details will be in this Jira issue:

https://jira.ucar.edu/browse/ISFS-576


  • No labels