I have a Raspberry PI that I have connected to a Deltec UPS via serial (upscode2 driver). I had an older version of Rasbian running. The nut configuration worked fine but I had mail issues I couldn't resolve when gmail changed how it handled MTAs. Plus it was running an old version of Deb that is no longer supported. It was broken enough I could not upgrade to a never version so I started from scratch. I have NUT running but can not get upssched.conf to work. On the old OS when I pull the power I would see a message in the syslog that a timer was set. On the new system I never see that message. I do get these new messages when I unplug the UPS to test Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: DI STLR Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: NO STOK Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: 11 STBO Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: 11 STBL Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: 00 STBM Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: DI STLR Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: NO STAT Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: US BTIME Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: 0015.00 MIUL1 Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: 0001.00 MBUUU Jan 26 16:51:27 nutpi upscode2[453]: Unknown response to UPDS: 0025.00 MBIII Jan 26 16:51:28 nutpi upscode2[453]: Unknown response to UPDS: -020.00 MOUL1 Jan 26 16:51:28 nutpi upscode2[453]: Unknown response to UPDS: 0117.00 MOIL1 Jan 26 16:51:28 nutpi upscode2[453]: Unknown response to UPDS: 0004.00 MOPL1 Jan 26 16:51:28 nutpi upscode2[453]: Unknown response to UPDS: 0000.38 MOFFF Jan 26 16:51:30 nutpi upscode2[453]: Communications with UPS lost: Empty value from UPS for UPDS 0060.00! Jan 26 16:51:34 nutpi upscode2[453]: Communications with UPS re-established I stopped the upsmon service and started manually with upsmon -DDD. Here is the output : 55.140869 parse_status: [OB] 55.141018 parsing: [OB] 55.141105 ups_on_batt: deltec-PRA1500 at localhost (first time) 55.141193 do_notify: ntype 0x0001 (ONBATT) 90.160602 Poll UPS [deltec-PRA1500 at localhost] failed - Data stale 90.160764 do_notify: ntype 0x0005 (COMMBAD) 90.160889 Communications with UPS deltec-PRA1500 at localhost lost 90.160889 Communications with UPS deltec-PRA1500 at localhost lost 90.162235 Current power value: 1 90.162541 Minimum power value: 1 95.162828 pollups: deltec-PRA1500 at localhost 95.163045 get_var: deltec-PRA1500 at localhost / status 95.164228 parse_status: [OB] 95.164385 do_notify: ntype 0x0004 (COMMOK) 95.164502 Communications with UPS deltec-PRA1500 at localhost established 160.214327 ups_on_line: deltec-PRA1500 at localhost (first time) 160.214426 do_notify: ntype 0x0000 (ONLINE) 160.214537 UPS deltec-PRA1500 at localhost on line power I've checked to make sure PIPEFN LOCKFIN directory can be written to by my nut user. I never see a pid file created after the power is pulled however. here is my upssched.conf CMDSCRIPT /bin/upssched-cmd PIPEFN /home/nutmon/upssched/upssched.pipe LOCKFN /home/nutmon/upssched/upssched.lock AT COMMBAD deltec-PRA1500 at localhost START-TIMER upsgone 10 AT ONBATT deltec-PRA1500 at localhost START-TIMER upsonbat 60 AT COMMOK deltec-PRA1500 at localhost CANCEL-TIMER upsgone AT ONLINE deltec-PRA1500 at localhost CANCEL-TIMER upsonbat AT COMMOK deltec-PRA1500 at localhost EXECUTE upsback AT ONLINE deltec-PRA1500 at localhost EXECUTE upsonac AT LOWBATT deltec-PRA1500 at localhost EXECUTE upslow Not that I am getting there but /bin/upssched-cmd is executable by my Nut user and works. Thanks for any help with this. -- Greg http://www.linkedin.com/in/gregtreantosI -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200126/155d00ed/attachment.html>
On Sun, 26 Jan 2020, Greg Treantos wrote:> I have a Raspberry PI that I have connected to a Deltec UPS via serial > (upscode2 driver). ... On the old OS when I pull the power I would see a > message in the syslog that a timer was set. On the new system I never see that > message.> here is my upssched.conf > CMDSCRIPT /bin/upssched-cmd > PIPEFN /home/nutmon/upssched/upssched.pipe > LOCKFN /home/nutmon/upssched/upssched.lock > AT COMMBAD deltec-PRA1500 at localhost START-TIMER upsgone 10 > AT ONBATT deltec-PRA1500 at localhost START-TIMER upsonbat 60When a timer is running, the ps command will show that upssched is running. For example, I have timers running 24hrs to operate a "heartbeat" function, and at any time the command "ps -elf | grep upssched" reports 1 S upsd 2962 1 00:00:18 /usr/sbin/upssched UPS heartbeat at localhost: At a moment when a timer should be running in your PI, what does this command report? Roger