Python plugin: UPS Monitor

Python and python framework
User avatar
ycahome
Posts: 199
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python plugin: UPS Monitor

Post by ycahome » Thursday 15 February 2018 21:51

Also, am wondering if you could include a bash script on your plugin in order to update with a single command:

filename: upgrade.sh

Code: Select all

#!/bin/bash

git reset --hard
git pull --force
sudo chmod +x plugin.py
sudo chmod +x upgrade.sh
sudo /etc/init.d/domoticz.sh restart
this way, next time you can upgrade with a single command

Code: Select all

sudo ./upgrade.sh

Logread
Posts: 191
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Logread » Friday 16 February 2018 0:00

@ycahome,

Thanks for the suggestions... please feel free to contribute the script on GitHub and/or the wiki

hamster
Posts: 23
Joined: Friday 28 April 2017 19:11
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by hamster » Saturday 17 February 2018 7:05

Logread wrote:
Thursday 15 February 2018 15:13
New version 0.2.1 is available.
AWESOME! Will install and begin testing.

manutremo
Posts: 48
Joined: Saturday 19 November 2016 18:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by manutremo » Saturday 17 February 2018 9:18

Hi, just wanted to let you know that I just installed it on my Synology and it works perfect. Many thanks!

Logread
Posts: 191
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Logread » Saturday 17 February 2018 18:24

manutremo wrote:
Saturday 17 February 2018 9:18
Hi, just wanted to let you know that I just installed it on my Synology and it works perfect. Many thanks!
Thanks for the positive feedback 8-)

nmaster
Posts: 102
Joined: Saturday 16 August 2014 17:17
Target OS: Linux
Domoticz version: 3.6304
Contact:

Re: Python plugin: UPS Monitor

Post by nmaster » Saturday 17 February 2018 20:01

Hi Logread,

I upgraded to the last plugin version, all is fine here with 4 UPS.

Velly
Posts: 21
Joined: Sunday 22 October 2017 19:56
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by Velly » Sunday 18 February 2018 16:05

Help needed with EATON 9130 running on Windows 10:
EATON 9130
ip of Windows server : 192.168.1.107
port: 4679
Usp name in EATON Intelligent Power Manager: EATON9130

error:
2018-02-18 16:57:52.553 Error: (UPS EATON) Error reading UPS variables: HTTP/1.0 501 Not Implemented
2018-02-18 16:58:44.241 Error: (UPS EATON) Error reading UPS variables: HTTP/1.0 501 Not Implemented
2018-02-18 17:00:09.587 Error: (UPS EATON) Error reading UPS variables: HTTP/1.0 501 Not Implemented
2018-02-18 17:01:18.703 Error: (UPS EATON) Error reading UPS variables: HTTP/1.0 501 Not Implemented
2018-02-18 17:02:18.751 Error: (UPS EATON) Error reading UPS variables: HTTP/1.0 501 Not Implemented

Anybody with NUT on Windows Intelligent Power Manager?
Thank you!
Attachments
eaton 3.PNG
eaton 3.PNG (18.07 KiB) Viewed 1542 times
eaton.PNG
eaton.PNG (23.65 KiB) Viewed 1542 times
eaton2.PNG
eaton2.PNG (9.09 KiB) Viewed 1542 times

hamster
Posts: 23
Joined: Friday 28 April 2017 19:11
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by hamster » Monday 19 February 2018 2:35

Latest update working great for me on pi Logread. Thanks!

Logread
Posts: 191
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Logread » Monday 19 February 2018 8:27

Velly wrote:
Sunday 18 February 2018 16:05
2018-02-18 16:57:52.553 Error: (UPS EATON) Error reading UPS variables: HTTP/1.0 501 Not Implemented
@Velly, looks like you are configuring the plugin to hit a http webserver (the Eaton intelligent power manager) rather than a NUT server... first make sure you have a NUT server up and running and adjust to the right IP/Port

jeecee
Posts: 3
Joined: Tuesday 27 February 2018 14:46
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by jeecee » Tuesday 27 February 2018 14:48

Tnx a lot, works perfectly!

febalci
Posts: 334
Joined: Monday 03 July 2017 19:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by febalci » Wednesday 14 March 2018 21:52

@Logread, thanks for the great work! Works perfectly with 2 APC BX950U-GR UPSes. One of them is installed on a Synology and the other one on ubuntu Domoticz Server Intel NUC. Everything works perfectly, i also set a notification on UPS Alert Sensor; If svalue is 'ONBATTERY DISCHARGING', send a notification as 'Power Cut!!!', If 'ONLINE CHARGING' send 'Power Back ON!'. However, as you have guessed the status change waits up to 1 minute for UPS Status update. Is there any way you can suggest for the status change to be reflected instantenously?

Thanks again...

copernicnic
Posts: 3
Joined: Thursday 26 April 2018 10:27
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by copernicnic » Thursday 26 April 2018 10:34

Hello, thanks for the plugins :D . I have a little worry with nut, my ups is directly plugged into my raspberry and the server nut is also on the raspberry. my problem is that i can not disable user / password access.
do you have an idea of ​​how?

Logread
Posts: 191
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Logread » Friday 27 April 2018 7:39

@copernicnic, authentication is not yet handled by the plugin. Not difficult to implement, bear with me for a few days and I’ll send you by pm a new version for testing.

copernicnic
Posts: 3
Joined: Thursday 26 April 2018 10:27
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by copernicnic » Friday 27 April 2018 10:57

hello, everything is ok now :D :D , just wait a moment that domoticz update the device.
do you know what value to put in the event to make interact?
screenshot 2018-04-27 à 10.54.41 1.jpg
screenshot 2018-04-27 à 10.54.41 1.jpg (34.77 KiB) Viewed 1072 times
Thank you very much for your work

copernicnic
Posts: 3
Joined: Thursday 26 April 2018 10:27
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by copernicnic » Friday 27 April 2018 11:32

@Logread,
I just tested the plugin you sent me, it does not work unfortunately. here is the log
The attachment screenshot 2018-04-27 à 11.28.57.jpg is no longer available
I just saw in the command that there is a story of master and slave
The attachment screenshot 2018-04-27 à 11.28.57.jpg is no longer available
Attachments
screenshot 2018-04-27 à 11.31.21.jpg
screenshot 2018-04-27 à 11.31.21.jpg (49.13 KiB) Viewed 1068 times
screenshot 2018-04-27 à 11.28.57.jpg
screenshot 2018-04-27 à 11.28.57.jpg (38.82 KiB) Viewed 1070 times

Logread
Posts: 191
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Logread » Friday 27 April 2018 19:18

@copernicnic, let’s debug this by private message rather than posting on the public thread, to avoid clogging it... in my last pm, I told you that the edits were not tested... since my own setup does not require a login. Let me do some investigations in the network ups tools code and docs but this will not be before several days.
In the meantime, if you have the knowledge to do this, please try to login from shell with a telnet session and post me the result by pm, not on the forum thread pls.

toutazimuth
Posts: 21
Joined: Tuesday 29 September 2015 19:20
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin: UPS Monitor

Post by toutazimuth » Friday 11 May 2018 20:47

Hi Logread
Your Python plugin UPS monitor, works perfectly with my Pi3B, Python 3.4, Domoticz béta 9424, Synology and eaton 650 Pro.
everything is great
Thx ;)

Logread
Posts: 191
Joined: Sunday 28 August 2016 7:48
Target OS: Raspberry Pi
Domoticz version:
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by Logread » Saturday 12 May 2018 14:27

toutazimuth wrote:
Friday 11 May 2018 20:47
Hi Logread
Your Python plugin UPS monitor, works perfectly with my Pi3B, Python 3.4, Domoticz béta 9424, Synology and eaton 650 Pro.
everything is great
Thx ;)
Thanks for your appreciation !

User avatar
lmet
Posts: 27
Joined: Wednesday 19 July 2017 22:35
Target OS: Raspberry Pi
Domoticz version: v4.9700
Location: France
Contact:

Re: Python plugin: UPS Monitor

Post by lmet » Wednesday 01 August 2018 14:31

Hi,
Now i have UPS Monitor working fine on Domoticz 4.9700 using stretch.
For me the reason was python version 3.5.1.x after downgrade it to 3.4.1.x all is Ok now.
Thanks a lot for this very usefull plugin.

Post Reply

Who is online

Users browsing this forum: prelude and 7 guests