Hi Charles, Thank you so much for getting back to me. I should have given you a bit of background in my last message but I'm actually doing this for my grandmother's benefit! She has Dementia and lives on her own so we want to be notified if she has a power cut... I'd hate to think she might be stumbling around in the dark (which has happened before)! In terms of stopping the older driver process (usbhid-ups) you mentioned, how would I go about that? Could you advise me on the necessary commands? Sorry for being rather daft - I'm not quite used to Linux yet! 🙁 I'm using the latest version of NUT which I downloaded yesterday. I'm running the whole thing from the Raspberry Pi I have. I'm not entirely sure which version it is but I bought it back in 2014 I think. The OS is Debian 9 (Stretch) if that helps? I'll change the driver back to usbhid-ups as you advised. Thank you for confirming that. The strange thing is though, the keyboard I attach to the Pi is showing to have usbhid-ups driver! Nothing to worry about I guess? Just another thing I wanted to mention... once I've resolved the aforementioned issues, would it be possible for the system to run without any maintenance or checking up on it? What I mean is, once I've plugged it into my grandmother's house, I'd like to leave it running and forget about it basically - in the knowledge and trust it would notify us if there's ever a power cut! Many thanks Gareth ________________________________ From: Charles Lepple <clepple at gmail.com> Sent: 06 May 2019 13:55 To: Gareth Davies Cc: nut-upsuser at alioth-lists.debian.net Subject: Re: [Nut-upsuser] Data Stale issue On May 6, 2019, at 8:10 AM, Gareth Davies wrote:> > Hello, > > I apologise if I've sent this question to the wrong place/e-mail! I'm new to the site! I was wondering if anyone could help me... I downloaded Network UPS Tools yesterday so that I could receive e-mail notifications of when my UPS switched to battery power. I got it up and running and was working brilliantly! Then, after a while I tested the system by switching off power to my UPS.... I wasn't receiving any e-mail notifications! I was puzzled by this given it had worked perfectly fine just a few minutes (or an hour) before! I then ran the nut-server status command and saw the following error: > > Data for UPS [ups] is stale - check driver > Duplicate driver instance detected! Terminating other driver!The "data is stale" message does happen from time to time. The "duplicate driver" message shouldn't happen, though it can be the result of mixing things up while testing. When starting and stopping NUT, be sure that the old driver process (usbhid-ups) has stopped before restarting things. Which version of NUT are you using, and assuming Linux, which distribution?> I checked the web and given I have a CyberPower UPS it seemed I had the correct driver stated (usbhid-ups). However after running the command usb-devices in the terminal it indicated that the driver associated with the UPS was 'usbfs'? I changed this in the conf file but no luck 🙁The term "driver" is a bit overloaded - NUT started using that term prior to when USB became a common connection type for an UPS. "usb-devices" is reading the kernel's view of the USB subsystem, and "usbfs" is the kernel's way of handing over a USB device to a process that uses libusb (like the current USB UPS drivers in NUT). Long story short, "driver = usbhid-ups" is the right thing to use in ups.conf for a CyberPower USB UPS. There might be some other options to try in ups.conf, but the version/distro information will help narrow that down.> Just to add to the above, I've tried all other solutions I found on the web such as increasing the MAXAGE, DEADTIME and POLLINTERVAL values....[please use reply-all to include the list, and consider subscribing below in case someone else replies directly to the list - it's a low-volume list, and you can unsubscribe easily later.]> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20190506/d915abf1/attachment-0001.html>
On Mon, 6 May 2019, Gareth Davies wrote:> Just another thing I wanted to mention... once I've resolved the > aforementioned issues, would it be possible for the system to run without any > maintenance or checking up on it? What I mean is, once I've plugged it into my > grandmother's house, I'd like to leave it running and forget about it > basically - in the knowledge and trust it would notify us if there's ever a > power cut!If you want to trust your setup, you need to guard against a silent failure, particularly if you have carers and cleaners with access to the equipment. I suggest you run a heartbeat check for example using NUT as described at http://rogerprice.org/NUT/ConfigExamples.A5.pdf chapter 6, together with a daily cron job which checks that the heartbeat is running, and sends you an e-mail if all is well. Roger
On Mon, 6 May 2019, Gareth Davies wrote:> Just another thing I wanted to mention... once I've resolved the > aforementioned issues, would it be possible for the system to run without > any maintenance or checking up on it? What I mean is, once I've plugged it > into my grandmother's house, I'd like to leave it running and forget about > it basically - in the knowledge and trust it would notify us if there's ever > a power cut!I use nagios (another OSS product) on another linux system (which could be a VPS or at your house) to check up on NUT installations of that nature, and warn me if they stop responding. I also have NUT run a script to send me an SMS message to notify me of power failures (and restoration). You generally need to sign up with a service (email me privately if you want to know which service I use) to send SMS messages via a web api. The going rate is about USD $.01 per SMS. If the rPi is too fragile, consider getting a small Intel desktop (which are not much more used than an rPi is new). The desktop uses more power, but still tiny compared to air conditioning. -- Stuart D. Gathman <stuart at gathman.org> "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
Hello, Just to say, I stopped the driver and started it again and the errors went away! However, I turned off power to the UPS but I wasn’t receiving any e-mails :( also when I rebooted the RPi the driver/service didn’t start back up automatically... I wonder if you have any thoughts on the above? Kind Regards Gareth On 6 May 2019, at 3:27 pm, Gareth Davies <gareth94 at hotmail.co.uk<mailto:gareth94 at hotmail.co.uk>> wrote: Hi Charles, Thank you so much for getting back to me. I should have given you a bit of background in my last message but I'm actually doing this for my grandmother's benefit! She has Dementia and lives on her own so we want to be notified if she has a power cut... I'd hate to think she might be stumbling around in the dark (which has happened before)! In terms of stopping the older driver process (usbhid-ups) you mentioned, how would I go about that? Could you advise me on the necessary commands? Sorry for being rather daft - I'm not quite used to Linux yet! 🙁 I'm using the latest version of NUT which I downloaded yesterday. I'm running the whole thing from the Raspberry Pi I have. I'm not entirely sure which version it is but I bought it back in 2014 I think. The OS is Debian 9 (Stretch) if that helps? I'll change the driver back to usbhid-ups as you advised. Thank you for confirming that. The strange thing is though, the keyboard I attach to the Pi is showing to have usbhid-ups driver! Nothing to worry about I guess? Just another thing I wanted to mention... once I've resolved the aforementioned issues, would it be possible for the system to run without any maintenance or checking up on it? What I mean is, once I've plugged it into my grandmother's house, I'd like to leave it running and forget about it basically - in the knowledge and trust it would notify us if there's ever a power cut! Many thanks Gareth ________________________________ From: Charles Lepple <clepple at gmail.com<mailto:clepple at gmail.com>> Sent: 06 May 2019 13:55 To: Gareth Davies Cc: nut-upsuser at alioth-lists.debian.net<mailto:nut-upsuser at alioth-lists.debian.net> Subject: Re: [Nut-upsuser] Data Stale issue On May 6, 2019, at 8:10 AM, Gareth Davies wrote:> > Hello, > > I apologise if I've sent this question to the wrong place/e-mail! I'm new to the site! I was wondering if anyone could help me... I downloaded Network UPS Tools yesterday so that I could receive e-mail notifications of when my UPS switched to battery power. I got it up and running and was working brilliantly! Then, after a while I tested the system by switching off power to my UPS.... I wasn't receiving any e-mail notifications! I was puzzled by this given it had worked perfectly fine just a few minutes (or an hour) before! I then ran the nut-server status command and saw the following error: > > Data for UPS [ups] is stale - check driver > Duplicate driver instance detected! Terminating other driver!The "data is stale" message does happen from time to time. The "duplicate driver" message shouldn't happen, though it can be the result of mixing things up while testing. When starting and stopping NUT, be sure that the old driver process (usbhid-ups) has stopped before restarting things. Which version of NUT are you using, and assuming Linux, which distribution?> I checked the web and given I have a CyberPower UPS it seemed I had the correct driver stated (usbhid-ups). However after running the command usb-devices in the terminal it indicated that the driver associated with the UPS was 'usbfs'? I changed this in the conf file but no luck 🙁The term "driver" is a bit overloaded - NUT started using that term prior to when USB became a common connection type for an UPS. "usb-devices" is reading the kernel's view of the USB subsystem, and "usbfs" is the kernel's way of handing over a USB device to a process that uses libusb (like the current USB UPS drivers in NUT). Long story short, "driver = usbhid-ups" is the right thing to use in ups.conf for a CyberPower USB UPS. There might be some other options to try in ups.conf, but the version/distro information will help narrow that down.> Just to add to the above, I've tried all other solutions I found on the web such as increasing the MAXAGE, DEADTIME and POLLINTERVAL values....[please use reply-all to include the list, and consider subscribing below in case someone else replies directly to the list - it's a low-volume list, and you can unsubscribe easily later.]> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net<mailto:Nut-upsuser at alioth-lists.debian.net> > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20190506/615bffda/attachment-0001.html>
On Mon, 6 May 2019, Gareth Davies wrote:> Just to say, I stopped the driver and started it again and the errors went > away! However, I turned off power to the UPS but I wasn’t receiving any > e-mails :( also when I rebooted the RPi the driver/service didn’t start back > up automatically... > > I wonder if you have any thoughts on the above?Those are issues with understanding your distro. For the latter, if you are using systemd, and your systemd service is called nut-server.service (as it is in Fedora), you would enable it at boot with "systemctl enable nut-server". Systemd automatically starts prerequistites first, so on Fedora at least, starting nut-server first starts nut-driver. You probably also need to start nut-monitor, as that is the usual place you would configure sending notifications. Sorry, I don't have details on Debian. -- Stuart D. Gathman <stuart at gathman.org> "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
Interesting stuff! Once I get NUT running properly I'll definitely look into Nagios! Many thanks Gareth ________________________________ From: Stuart D. Gathman <stuart at gathman.org> Sent: 06 May 2019 17:27 To: Gareth Davies Cc: Charles Lepple; nut-upsuser at alioth-lists.debian.net Subject: Re: [Nut-upsuser] Data Stale issue On Mon, 6 May 2019, Gareth Davies wrote:> Just another thing I wanted to mention... once I've resolved the > aforementioned issues, would it be possible for the system to run without > any maintenance or checking up on it? What I mean is, once I've plugged it > into my grandmother's house, I'd like to leave it running and forget about > it basically - in the knowledge and trust it would notify us if there's ever > a power cut!I use nagios (another OSS product) on another linux system (which could be a VPS or at your house) to check up on NUT installations of that nature, and warn me if they stop responding. I also have NUT run a script to send me an SMS message to notify me of power failures (and restoration). You generally need to sign up with a service (email me privately if you want to know which service I use) to send SMS messages via a web api. The going rate is about USD $.01 per SMS. If the rPi is too fragile, consider getting a small Intel desktop (which are not much more used than an rPi is new). The desktop uses more power, but still tiny compared to air conditioning. -- Stuart D. Gathman <stuart at gathman.org> "Confutatis maledictis, flamis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20190506/48cbb011/attachment.html>
I just set up a UPS on a Debian Stretch system for my sister-in-law. Obviously, I want NUT to properly shut down the unit when the battery gets low. This means upsmon must be running and healthy. When I run 'systemctl status nut-monitor`, I see the following in the journal: nut-monitor.service: Supervising process 778 which is not our child. We'll most likely not notice when it exits Process 778 is /lib/nut/upsmon Is this an issue? Presumably nut-monitor should know if upsmon dies, shouldn't it?