I recently installed this plugin, it works like a charm. It happens that the NUT server is a Synology NAS that is shut down every night. Power resumes in the morning. I wonder whether the plugin could take that into account in order to avoid the flooding of the log.
Thank you
Python plugin: UPS monitoring
Moderator: leecollings
-
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Python plugin: UPS monitoring
Debian buster on NUC and three RPi with buster.
-
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Re: Python plugin: UPS monitoring
For those that might be interested, I modified the script as follows:
In def __init__(self):
Added
[/code]
And in the try section of I made this modification
So the communication error is reported once a day in the described scenario, and not every minutes, which is in my case useless and tend to spoil the log system. One could think the logic could be refined, that is take into account the periods when the NUT server (NAS Synology) is shutdown. I must admit I've been a bit lazy.
In def __init__(self):
Added
Code: Select all
self.commerror = False
And in the try section of I made this modification
Code: Select all
except Exception as errorcode:
if self.commerror == False:
Domoticz.Error("Cannot communicate with NUT Server at {}:{} due to {}".format(Parameters["Address"], Parameters["Port"], errorcode.args))
self.commerror = True
self.error = True
self.UpdateDevice("ups.status") # we flag the error to the status device
else:
if self.commerror == True:
Domoticz.Log("Communication with NUT Server resumed at {}:{}))
self.commerror = False
Last edited by Number8 on Saturday 14 April 2018 6:49, edited 1 time in total.
Debian buster on NUC and three RPi with buster.
-
- Posts: 228
- Joined: Sunday 28 August 2016 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Python plugin: UPS monitoring
@Number8,
I assume you refer to the NUT UPS plugin I wrote... almost by definition a UPS works 24/7 and so does my own synology server... and I have had a DS710+ working 24/7 since 2010 with the same HDDs that I only replaced two months ago not because it died but because it’s DSM version was obsolete. But this is off topic...
I would not recommend adding the tweak you described to the plugin standard code because most of us immediately want to know when the reading of the UPS status is incorrect or impossible.
I’d rather suggest that if you really need/want to shut down the NAS at night, you connect your UPS to your Raspberry and install a NUT server on the Pi... then you get 24/7 monitoring by domoticz and can still have your NAS safe shutdown if it is on when a power failure happens (though this set up probably requires some linux skills as probably not off the shelf from DSM).
I assume you refer to the NUT UPS plugin I wrote... almost by definition a UPS works 24/7 and so does my own synology server... and I have had a DS710+ working 24/7 since 2010 with the same HDDs that I only replaced two months ago not because it died but because it’s DSM version was obsolete. But this is off topic...
I would not recommend adding the tweak you described to the plugin standard code because most of us immediately want to know when the reading of the UPS status is incorrect or impossible.
I’d rather suggest that if you really need/want to shut down the NAS at night, you connect your UPS to your Raspberry and install a NUT server on the Pi... then you get 24/7 monitoring by domoticz and can still have your NAS safe shutdown if it is on when a power failure happens (though this set up probably requires some linux skills as probably not off the shelf from DSM).
-
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Re: Python plugin: UPS monitoring
First of all I'd like to thank you for this very handy and excellent plugin.
So, yes I agree that it would be preferable to install the code on a RaspPI which is a bit more engaging, that this ready made one. On my side I don't have time to dig into that.
I just wanted to share this modification, which is perfect in my specific case, no intent to ask for a modification, whatsoever.
Again, thank you
Nicolas
This is an endless debate, I can't say I disagree, neither I agree, it depens. My professional experience on this matter says that disk failures do not depend on 24/7 operation or nightly shutdown, and all NAS are powered by UPS. I'm not referrring to big farms, but small professional operations.almost by definition a UPS works 24/7
So, yes I agree that it would be preferable to install the code on a RaspPI which is a bit more engaging, that this ready made one. On my side I don't have time to dig into that.
I just wanted to share this modification, which is perfect in my specific case, no intent to ask for a modification, whatsoever.
Again, thank you
Nicolas
Debian buster on NUC and three RPi with buster.
Who is online
Users browsing this forum: Google [Bot] and 1 guest