[Plugin] NUT v2 - Network UPS Tools


dmacias

Recommended Posts

5 minutes ago, nicx said:

I am using NUT because I need network access to the NUT server. And as far as I understand the integrated UPS manager is not able to do that.

What, exactly, are you accessing over the network? The apcupsd used in Unraid is by default published as a server, and can easily be set as a client. I personally have 2 Unraid servers on the same UPS, and I use one to trigger the other for shutdowns.

  • Like 1
Link to comment
11 minutes ago, jonathanm said:

What, exactly, are you accessing over the network? The apcupsd used in Unraid is by default published as a server, and can easily be set as a client. I personally have 2 Unraid servers on the same UPS, and I use one to trigger the other for shutdowns.

I want to access the/a NUT network server with my Home Assistant instance. With NUT Plugin I can switch the mode from "standalone" to "netserver", is that possible with the integrated UPS solution, too? I thought that was not possible.

Link to comment
1 minute ago, nicx said:

I want to access the/a NUT network server with my Home Assistant instance. With NUT Plugin I can switch the mode from "standalone" to "netserver", is that possible with the integrated UPS solution, too? I thought that was not possible.

https://www.home-assistant.io/integrations/apcupsd/

16 minutes ago, jonathanm said:

The apcupsd used in Unraid is by default published as a server

 

  • Like 1
Link to comment
On 6/20/2021 at 4:15 PM, IGHOR said:

I built latest nut sources for unRAID with usb support only.

 

Here is steps to build it on ubuntu/debian:

 


apt update && apt install ca-certificates freeipmi git libusb-dev autoconf automake make libtool python --no-install-recommends -y
git clone --depth 1  https://github.com/networkupstools/nut.git && cd nut
./autogen.sh
./configure --enable-strip --with-usb --datarootdir=/usr/share/nut --bindir=/usr/bin --sbindir=/usr/sbin --prefix=/ --sysconfdir=/etc/nut --libexecdir=/usr/libexec/nut --runstatedir=/var/run/nut --libdir=/usr/lib64 --with-drvpath=/usr/libexec/nut && make -j `nproc` &&  make install


 

 

 

Thanks for this, I followed on a Ubuntu VM, but can't seem to find where the output *.txz package is written to?

Link to comment
5 minutes ago, cybrnook said:

I see, so you're going folder by folder based on the old package and then copying the "new" files and replacing, then re-tarring?

Yes, I did exactly this. I was expecting to do it once only thats why I made no scripts for that.
I hope I'll not need to do it and plugin dev will release update, or plugin dev share his build steps.
Anyway I'm with unRAID for a long time, and if it is really needed I can make automated updates for this plugin.

Edited by IGHOR
  • Like 1
Link to comment
  • 1 month later...

Need help.
my ups does not have the ups.load field for NUT to calculate the load. Is there any way to manually fix the NUT display calculation? (already set to manual but it still queries ups.load field which does not exist)

here's ups sample output

Spoiler

battery.charge: 100.00
battery.current: 214748364.70
battery.runtime: 3933.00
battery.voltage: 54.70
device.mfr: Huawei
device.model: UPS2000A
device.serial: 2102290712HGKA000033
device.type: ups
driver.name: snmp-ups
driver.parameter.pollinterval: 2
driver.parameter.port: 192.168.10.198
driver.parameter.snmp_version: v1
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: huawei MIB 0.1
driver.version.internal: 0.97
input.bypass.frequency: 50.00
input.bypass.L1-N.voltage: 241.60
input.bypass.L2-N.voltage: 0.00
input.bypass.L3-N.voltage: 0.00
input.frequency: 50.00
input.L1-N.voltage: 241.60
input.L2-N.voltage: 0.00
input.L3-N.voltage: 0.00
input.phases: 3
output.frequency: 50.00
output.L1-N.voltage: 219.60
output.L1.current: 1.10
output.L1.power: 0.20
output.L1.power.percent: 12.00
output.L1.realpower: 0.00
output.L2-N.voltage: 0.00
output.L2.current: 0.00
output.L2.power: 0.00
output.L2.power.percent: 0.00
output.L3-N.voltage: 0.00
output.L3.current: 0.00
output.L3.power: 0.00
output.L3.power.percent: 0.00
output.phases: 3
output.power.nominal: UNKNOWN
ups.firmware: V2R1C1SPC40
ups.id: UPS2000A
ups.mfr: Huawei
ups.model: UPS2000A
ups.serial: 2102290712HGKA000033
ups.status: OL
ups.test.result: UNKNOWN
ups.time: 1629951673.00

 

Link to comment
4 hours ago, Overrun said:

output.L1.power: 0.20
output.L1.power.percent: 12.00

 

You can maybe tweak the display pages to pickup output power (.20 * 100 = 20W?) and output power % (12). The "Optional" section of my post below should point you in the right direction. Your changes will be lost on reboot (or update) so follow the "go" instructions to preserve them.

 

Edited by CS01-HS
  • Thanks 1
Link to comment
17 hours ago, CS01-HS said:

You can maybe tweak the display pages to pickup output power (.20 * 100 = 20W?) and output power % (12). The "Optional" section of my post below should point you in the right direction. Your changes will be lost on reboot (or update) so follow the "go" instructions to preserve them.

Thank you so much!!!

I simply substituted 'ups.load' part with 'output.L1.power.percent'. Now everything works like usual!

And I edited the 'go' file just like your tutorial. 

  • Like 1
Link to comment
  • 3 weeks later...
On 9/12/2021 at 11:58 PM, jayephx said:

Can someone ELI5 the purpose of NUT? I have a Cyberpower (SL700U) UPS coming to use. I was planning to just connect USB and use UPS settings. Is that not sufficient or what is the purpose of NUT in addition to the system's UPS settings? 

 

My Cyberpower (685AVR) worked fine with the built in management with one exception:

 

Setting Turn off UPS after shutdown to Yes (which is necessary if you want the machine to boot automatically when power's restored) would seem to work then as the server was booting, cut power, which caused a dirty shutdown.

 

Apparently there's an incompatibility with Cyberpower's implementation - with Nut you can work around it (see my post linked above.)

Link to comment
  • 3 weeks later...

I'm using NUT with my Xtreme power p80 series UPS. NUT seems to detect it, though I have to manually set the battery size.

 

As far as I can tell everything is working correctly, except that it seems to shut my server and client down immediately upon AC power loss instead of depleting the battery.

 

I believe I have it setup correctly, it's set to power the server down at 10 minutes on the battery.

Link to comment
  • 3 weeks later...

I have a CyberPower OR2200LCDRT2U with the CyberPower RMCARD205 for network connectivity. I can not get NUT configured to access the UPS via its IP address on the network. The reason I am trying to do this is other machines don't have the ability to communicate with the UPS directly, but do allow for NUT communication to provide shut down commands.

Link to comment

Hi,

Probably a very noobish question but how do I edit the config files to add in the battery voltage levels?

 

I have a Powercool 650Va which I have got online and working but it doesnt show up the battery voltage levels and apparently I need to manually edit them in.  If someone could point me to the file location where I can do this I would be very grateful :)

 

Also do I need to fill in the input voltage flelds?  This is my first time setting up a UPS and its all a bit confusing as finding all this information has turned out to be very difficult.

 

ups.thumb.PNG.6437601ea7005dd8e09aa584922ce999.PNG

 

Edited by MendipMan
typos
Link to comment
43 minutes ago, MendipMan said:

Hi,

Probably a very noobish question but how do I edit the config files to add in the battery voltage levels?

 

I have a Powercool 650Va which I have got online and working but it doesnt show up the battery voltage levels and apparently I need to manually edit them in.  If someone could point me to the file location where I can do this I would be very grateful :)

 

Also do I need to fill in the input voltage flelds?  This is my first time setting up a UPS and its all a bit confusing as finding all this information has turned out to be very difficult.

 

ups.thumb.PNG.6437601ea7005dd8e09aa584922ce999.PNG

 

you need to enter them in the ups.conf file

 

i entered this:

 

ups.conf

 

Powercool 1000va

 

[ups]
driver = nutdrv_qx
port = auto
vendorid = 0001
productid = 0000
protocol = hunnox
langid_fix = 0x0409
novendor
noscanlangid
default.battery.voltage.high = 27.50
default.battery.voltage.low = 21.40
default.battery.voltage.nominal = 24.00

  • Like 1
Link to comment
  • Rysz featured this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.