Winpower (UPS app) can't close the Proxmox

mes mariusz

New Member
Aug 30, 2020
8
0
1
40
The application: http://ever.eu/download/pl/93115 has been installed on Proxmox:

Code:
root@pve:/# /opt/Winpower/Winpower_setup_LinuxAMD64/LinuxAMD64/setup_console.bin

Then I run the agent:

Code:
root@pve:/opt/MonitorSoftware# ./agent start
Starting Agent:
Serialio.com jspLuxArm 4.5
Copyright (C) Serialio.com 1996-2002. All rights reserved.
Done

Just to be sure:

Code:
root@pve:/opt/MonitorSoftware# ./AgentStatus
Agent is running...

Then I'm connecting from a different instance of Winpower from LAN and start checking the UPS (disconnect the power from UPS).

eKYUor3.png


I see the command for system shutdown, but Proxmox is still alive and no any action I see in Proxmox web interface. Like there was completly no any shutdown command?

Any idea how to make it working?
 
Hi,

please ensure that this software is compatible with Debian10.
 
Hi.

None of commands:

Code:
cat /var/log/kern.log* | grep shutdown

find /var/log -type f -iname "*.log" | xargs -r grep -l "shutdown"

is able to return for me anything (no feedback).


But I noticed that beeing logged into Proxmox via Putty, after supply from UPS disconnect, I can see messages below:

Code:
Broadcast message from root@pve (somewhere) (Mon Sep  7 09:33:06 2020):

Winpower Message: LINE-INT in /dev/ttyS0 input power failed


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:33:06 2020):

Winpower Message: LINE-INT in /dev/ttyS0 input power failed


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:33:14 2020):

Winpower Message: HOST pve is being shut down.


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:33:14 2020):

Winpower Message: HOST pve is being shut down.


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:33:16 2020):

Winpower Message: Shutdown: Notifying workstations to shut down, waiting for 00:10 seconds.


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:33:16 2020):

Winpower Message: Shutdown: Notifying workstations to shut down, waiting for 00
:10 seconds.


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:34:55 2020):

Winpower Message: LINE-INT in /dev/ttyS0 input power restored.


Broadcast message from root@pve (somewhere) (Mon Sep  7 09:34:55 2020):

Winpower Message: LINE-INT in /dev/ttyS0 input power restored.


root@pve:~#

Maybe if application Winpower is not able to shutdown directly, I could catch (somehow)
the message "HOST pve is being shut down" ? and make real shutdown based on that ?

And how to do it?
 
Try to use nut (Network UPS Tools) https://networkupstools.org/documentation.html
Nut has package in Debian.


Hi.

Unfornately there is an issue because from some reason NUT can't talk with my UPS Active Power:

ffhtF8M.png


nano /etc/nut/ups.conf

[Active_Power]
driver = blazer_ser
port = /dev/ttyS0
desc = "Web server"
maxretry = 3


But the result is always:

Code:
root@pve:~# upsc -L
Error: Connection failure: Connection refused

root@pve:~# /usr/bin/upsc Active_Power@192.168.56.14
Error: Connection failure: Connection refused

The same is for genericups driver (instead of blazer_ser).

More regarding drivers:
https://networkupstools.org/stable-hcl.html

And with Winpower communication works properly.

IPDgoKH.png


But then I need (somehow) to catch the "broadcast message"s from Winpower and make shutdown automatically base on these messages somehow.
 
Last edited:
Try this (from https://networkupstools.org/docs/man/blazer_ser.html):
"cablepower = string
By default the driver will set DTR and clear RTS (normal). If you find that your UPS isn’t detected or the communication with the UPS is unreliable, you may try if clear DTR and set RTS (reverse), set DTR and RTS (both) or clear DTR and RTS (none) improves this situation."
 
Try this (from https://networkupstools.org/docs/man/blazer_ser.html):
"cablepower = string
By default the driver will set DTR and clear RTS (normal). If you find that your UPS isn’t detected or the communication with the UPS is unreliable, you may try if clear DTR and set RTS (reverse), set DTR and RTS (both) or clear DTR and RTS (none) improves this situation."

Thankyou for your hint.

So I tried three times with three possible cases:

Code:
 [Active_Power]
       driver = blazer_ser
       port = /dev/ttyS0
       desc = "Web server"
       cablepower = normal

or

Code:
 [Active_Power]
       driver = blazer_ser
       port = /dev/ttyS0
       desc = "Web server"
       cablepower = reverse

or

Code:
 [Active_Power]
       driver = blazer_ser
       port = /dev/ttyS0
       desc = "Web server"
       cablepower = both


But in every three cases the same:

Code:
root@pve:/opt# nano /etc/nut/ups.conf
root@pve:/opt# upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (2.7.4)
Duplicate driver instance detected! Terminating other driver!
Supported UPS detected with megatec protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf

Using 'guestimation' (low: 10.400000, high: 13.000000)!
Battery runtime will not be calculated (runtimecal not set)
root@pve:/opt# upsc -L
Error: Connection failure: Connection refused

Code:
root@pve:/opt# nano /etc/nut/ups.conf
root@pve:/opt# upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (2.7.4)
Duplicate driver instance detected! Terminating other driver!
Supported UPS detected with megatec protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf

Using 'guestimation' (low: 10.400000, high: 13.000000)!
Battery runtime will not be calculated (runtimecal not set)
root@pve:/opt# upsc -L
Error: Connection failure: Connection refused

Code:
root@pve:/opt# nano /etc/nut/ups.conf
root@pve:/opt# upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Megatec/Q1 protocol serial driver 1.57 (2.7.4)
Duplicate driver instance detected! Terminating other driver!
Supported UPS detected with megatec protocol
Vendor information unavailable
No values provided for battery high/low voltages in ups.conf

Using 'guestimation' (low: 10.400000, high: 13.000000)!
Battery runtime will not be calculated (runtimecal not set)
root@pve:/opt# upsc -L
Error: Connection failure: Connection refused
root@pve:/opt#
 
Ok, It started working right now:

Code:
root@pve:/opt# upsd
Network UPS Tools upsd 2.7.4
fopen /var/run/nut/upsd.pid: No such file or directory
listening on 192.168.56.14 port 3493
listening on 127.0.0.1 port 3493
Connected to UPS [Active_Power]: blazer_ser-Active_Power
root@pve:/opt# upsc Active_Power@localhost
Init SSL without certificate database
battery.charge: 100
battery.voltage: 13.60
battery.voltage.high: 13.00
battery.voltage.low: 10.40
battery.voltage.nominal: 12.0
device.type: ups
driver.name: blazer_ser
driver.parameter.cablepower: both
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.internal: 1.57
input.current.nominal: 2.0
input.frequency: 50.1
input.frequency.nominal: 50
input.voltage: 238.7
input.voltage.fault: 238.7
input.voltage.nominal: 230
output.voltage: 238.7
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 0
ups.status: OL
ups.temperature: 25.0
ups.type: offline / line interactive

So I see that I had to configure upsd.conf and upsd.users to run it.

So probably the topic could be closed right now.

But I will keep it open just in case that someone have an idea why shutdown wasn't able to be done wia the Winpower application.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!