NUT package (2.8.0 and below)
-
I tried to enable SSL, and I got this:
Dec 12 16:45:58 pfsense upsd[12551]: upsd.conf: invalid directive CERTFILE /etc/ssl/nut_cert/upsd.pem
Dec 12 16:45:58 pfsense upsd[12551]: upsd.conf: invalid directive CERTREQUEST REQUIRE
Dec 12 16:45:58 pfsense upsd[12551]: upsd.conf: invalid directive DISABLE_WEAK_SSL true
I think this means SSL support was not compiled into the package. -
@gooberpatrol66 said in NUT package:
I think this means SSL support was not compiled into the package.
I believe you are correct, there is no certificate support.
-
I installed the package, connected the USB socket to an APC Back-UPS BX2200MI, in the console I see that it recognizes it, but then in Services/UPS/Status I see:
"Failed to retrieve status" -
@whitetiger-it Generally this is a permissions problem with initial USB install. Addressed by Rebooting or by unplugging and re-plugging the USB.
-
@dennypage
Perfect, now it shows.
Thank you.How can I now manage the shutdown of pfSense and the PCs-Servers in the network?
I should be able to define minutes and load limits, also in the clients installed on the PCs-Servers I should be able to define parameters to synchronize with the NUT package. -
@whitetiger-it said in NUT package:
How can I now manage the shutdown of pfSense and the PCs-Servers in the network?
I should be able to define minutes and load limits, also in the clients installed on the PCs-Servers I should be able to define parameters to synchronize with the NUT package.NUT will manage the shutdown for you. Unless you are familiar with NUT itself, and have a specific need to fix something that isn't working, I would recommend sticking with the default NUT parameters.
Remote access options are detailed in the second post.
-
I have been defeated by my recently acquired Tripplite Smart1500LCD. I put in the work.... My OCD is not about let me give up until my Amazon return window closes. I've read all 850 some posts of this thread multiple times. I've read everything google has thrown at me regarding NUT and Smart1500LCD. I've read NUT mailing list... Github... Literally everything I can find that's relevant.
The problem I'm having is I cant get the UPS to trigger pfSense to shutdown unless I use
ignorelb
override.battery.charge.low = 20 or override.battery.runtime.low = 300
or I use theupsmon -c fsd
command. When those commands initiate a shutdown, pfSense starts shutting down but triggers the UPS to shut down too fast before pfSense has a chance to fully shutdown. Then the UPS powers back up the outlets after about 20-30 seconds no matter if the main is on/off or no matter how much battery the UPS has left. Its as if the UPS isnt giving pfSense any shutdown command. The Smart1500LCD default battery.charge.low is suppose to be 50%. Its basically a dump UPS... Rides all the way to the battery dies. I even ran it down past 0%, after about an hour on 0% it shut down pfSense then started back up again pushing my switch until I turned main back on. I can not getoffdelay=60
to work at all.There's a video on YouTube where someone with the same Smart1500LCD UPS got NUT working on debian. I've tried every setting in this thread with no luck. The settings I currently have below are the same settings from the YouTube vid. The video, and NUT mailing list say there is a issue with this UPS constantly disconnecting due to the USB and there is a patch for it that goes in
/etc/udev/rules.d
but when I look atdmesg
I don't have a bunch of disconnects every 10 seconds like they are talking about. I only get a few when NUT starts then none after. Example below.igb0: link state changed to UP igb0.50: link state changed to UP igb0.20: link state changed to UP igb0.40: link state changed to UP igb0.10: link state changed to UP igb0.60: link state changed to UP ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected) uhid0: at uhub1, port 1, addr 3 (disconnected) uhid0: detached igb1: link state changed to UP ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 uhid0 on uhub1 uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0 tun1: changing name to 'ovpns1' ovpns1: link state changed to UP pflog0: promiscuous mode enabled ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected) uhid0: at uhub1, port 1, addr 3 (disconnected) uhid0: detached ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 uhid0 on uhub1 uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0 ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected) uhid0: at uhub1, port 1, addr 3 (disconnected) uhid0: detached ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 uhid0 on uhub1 uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0 ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 (disconnected) uhid0: at uhub1, port 1, addr 3 (disconnected) uhid0: detached ugen0.3: <Tripp Lite Tripp Lite UPS> at usbus0 uhid0 on uhub1 uhid0: <Tripp Lite Tripp Lite UPS, class 0/0, rev 1.10/0.09, addr 3> on usbus0 igb1: promiscuous mode enabled igb0: promiscuous mode enabled igb0.10: promiscuous mode enabled igb0.20: promiscuous mode enabled igb0.40: promiscuous mode enabled igb0.50: promiscuous mode enabled igb0.60: promiscuous mode enabled
cat /usr/local/etc/nut/ups.conf pollinterval=1 maxretry=3 [tripplite] driver=usbhid-ups port=auto vendorid=09ae productid=2012 offdelay=60
cat /usr/local/etc/nut/upsmon.conf MONITOR tripplite 1 local-monitor 2bf97a0eaa539f360a90 master SHUTDOWNCMD "/sbin/shutdown -p +0" POWERDOWNFLAG /etc/killpower NOTIFYCMD /usr/local/pkg/nut/nut_email.php NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC NOTIFYFLAG FSD SYSLOG+WALL+EXEC NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC RUN_AS_USER root
cat /usr/local/etc/nut/upsd.conf LISTEN 127.0.0.1 LISTEN ::1
upscmd -l tripplite Instant commands supported on UPS [tripplite]: beeper.disable - Disable the UPS beeper beeper.enable - Enable the UPS beeper beeper.mute - Temporarily mute the UPS beeper beeper.off - Obsolete (use beeper.disable or beeper.mute) beeper.on - Obsolete (use beeper.enable) load.off - Turn off the load immediately load.off.delay - Turn off the load with a delay (seconds) reset.watchdog - Reset watchdog timer shutdown.reboot - Shut down the load briefly while rebooting the UPS shutdown.stop - Stop a shutdown in progress test.battery.start.deep - Start a deep battery test test.battery.start.quick - Start a quick battery test test.battery.stop - Stop the battery test
below ups.delay.shutdown reports 60 with setting offdelay=60 for about 20mins.
then ups.delay.shutdown reports 20 with setting offdelay=60 after 20mins or so.
Please help!
-
Coincidentally, that is the exact UPS I used to initially develop the pfSense NUT package. It has been extensively tested.
I still have a few of them around, but none are connected to NUT at the moment, so I'm going off old memory...
First recommendation, get rid of everything you have in the Extra Arguments to driver section, and everything in the Advanced section. You don't need or want that stuff in the nut config.
Several of the things you are trying to set in the configuration need to be set in the UPS itself via the upsrw command:
- battery.charge.low
- ups.delay.shutdown
- ups.delay.start
Use upsrw without the -s option to see the list of variables available in your UPS.
-
upsrw tripplite [ups.delay.shutdown] Interval to wait after shutdown with delay command (seconds) Type: STRING Maximum length: 10 Value: 20
I've tried running nut with no arguments in advanced setting and get the same results. I've also tried running nut with no arguments in advanced settings or Extra Arguments to driver and get the same results. Im convinced there is something wrong with this UPS.
I've run
upsrw -s ups.delay.shutdown=60 -u admin -p 7828770f3f0c7aaa299b tripplite@localhost
multiple times over the last few weeks without the desired results. Reply comes back with OK and ups.delay.shutdown changes to 60 on the UPS Status page but it doesnt change the behavior of the UPS.Even if
ups.delay.shutdown
some how worked and I used Extra Arguments to driverignorelb
andoverride.battery.charge.low = 20
oroverride.battery.runtime.low = 300
to get pfSense to actually shut down I'd still have the issue of the UPS powering back up the outlets even though the main is off and running until the UPS battery completely dies. -
I just tested again. I wiped all settings. Then I added
ignorelb
andoverride.battery.charge.low = 70
to the Extra Arguments to driver field and saved.
Then I went to command line and ranupsrw -s ups.delay.shutdown=60 -u admin -p b6a197675f5b5b2e1334 tripplite@localhost
with the correct password and got theOK
reply. I checked andups.delay.shutdown
displayed60
on the UPS status page.I cut the main... pfSense started shutting down at 70% battery charge. Before pfSense could fully shutdown the UPS killed power to the outlets for 20 seconds then restored power to them even though the main was off. Since pfSense wasnt able to fully shutdown it didnt start back up but my switch did. I had to pull the plug to my Netgate 1U firewall appliance for 60 seconds to let the power drain from the PSU to get it to boot again. UPS would have run until its battery completely drained.
-
@whoami-tm After loosing power and restarting, what do you see if you read the ups.delay.shutdown with upsrw? Perhaps it isn't saving to NVRAM? Or it could be overwritten at NUT startup.
-
@dennypage said in NUT package:
After loosing power and restarting, what do you see if you read the ups.delay.shutdown with upsrw?
ups.delay.shutdown goes back to the default of 20... Even without losing power and restarting ups.delay.shutdown goes back to the default of 20 after an hour or so.
-
@whoami-tm Okay, now add
offdelay=60 ondelay=90
(and only that) in the Extra Arguments to driver section and repeat the test.
-
@dennypage I removed all settings, which only consisted of
ignorelb
andoverride.battery.charge.low = 20
in the Extra Arguments to driver field, and started with a blank slate.I added
offdelay=60
andondelay=90
to the Extra Arguments to driver field and saved. On the UPS Status page it addedUsing the command
upsrw tripplite
the response was[ups.delay.shutdown] Interval to wait after shutdown with delay command (seconds) Type: STRING Maximum length: 10 Value: 60
I let about 20mins pass and checked the UPS Status page again and ups.delay.shutdown reverted back to the default
ups.delay.shutdown 20
. I also checked by looking using the commandupsrw tripplite
and the response was[ups.delay.shutdown] Interval to wait after shutdown with delay command (seconds) Type: STRING Maximum length: 10 Value: 20
but it still displayed
I went back into UPS settings and saved again and again got the results posted above of
ups.delay.shutdown 60
in both the status page and using cmdupsrw tripplite
.
The UPS said it had 60mins of run time. I killed power to the main... The UPS instantly dropped run time down to 30mins... The UPS passed 50% which should have been the Smart1500LCD default, pfSense did not shut down and the Smart1500 did nothing. I let the UPS go all the way down to 0% and it continued for another 30-45 mins before it didnt have enough power to push my Netgate box and both my Netgate box and Unifi POE switch shut off from the Tripplite losing power then a few seconds later my Unifi switch started up again with more power now that the Netgate box was offline. Then I gave power back to the main, pulled the plug on my Netgate box and let the power drain from the PSU so it would start again, then I had to back up my pfSense config because the config.xml got wiped.I'm convinced there is something wrong with this Tripplite UPS amazon sent me. I just bought an APC Back-UPS Pro 1500VA Gaming UPS to run a Windows PC that runs my BlueIris NVR software and DeepStack AI server to process images sent by BlueIris and it also uses about 100 watts and says it has 60 mins of runtime but when I cut the main it doesn't drop the runtime in half like the Tripplite.
As a test, I've connected this headless Windows PC running BlueIris to the Tripplite UPS and used the PowerAlert software to change settings. For one I could only see half of the words in the PowerAlert software, possibly because I'm remoting into the windows PC from a laptop with 4k screen ¯_(ツ)_/¯. I was able to set
offdelay = 60
andondelay = 120
and clicked execute to test and it actually worked. But just like the networking gear, the runtime dropped in half when I cut the main. I have yet to do a full test with the windows pc and poweralert software letting the ups run down battery past the default 50% to see what would happen. -
@whoami-tm said in NUT package:
I let about 20mins pass and checked the UPS Status page again and ups.delay.shutdown reverted back to the default ups.delay.shutdown 20.
Yea, this should not happen. Something is wrong.
@whoami-tm said in NUT package:
The UPS said it had 60mins of run time. I killed power to the main... The UPS instantly dropped run time down to 30mins... The UPS passed 50% which should have been the Smart1500LCD default, pfSense did not shut down and the Smart1500 did nothing.
The sudden drop of runtime is is not completely abnormal for a standby UPS. To fix this, you need would need to run a deep test while the load is enabled.
The default battery.charge.low on the TrippLite is 10% rather than 50%. This is settable via upsrw.
Seems like your UPS may have some nvram problems though...
-
@dennypage said in NUT package:
The default battery.charge.low on the TrippLite is 10% rather than 50%. This is settable via upsrw.
I'm a little confused.
upsrw -h
says:Network UPS Tools upsrw 2.7.4 usage: upsrw [-h] upsrw [-s <variable>] [-u <username>] [-p <password>] <ups> Demo program to set variables within UPS hardware. -h display this help text -s <variable> specify variable to be changed use -s VAR=VALUE to avoid prompting for value -u <username> set username for command authentication -p <password> set password for command authentication <ups> UPS identifier - <upsname>[@<hostname>[:<port>]] Call without -s to show all possible read/write variables.
upsrw tripplite
returns:[ups.delay.shutdown] Interval to wait after shutdown with delay command (seconds) Type: STRING Maximum length: 10 Value: 20
Doesn't that mean that the only option upsrw supports on this UPS is
ups.delay.shutdown
upsrw -s battery.charge.low=20 -u admin -p ea798a2ea466af5134e4 tripplite@localhost
returns and error message:Unexpected response from upsd: ERR VAR-NOT-SUPPORTED
-
@whoami-tm I'm pretty sure I was mistaken about you having the same UPS I did. Mine was definitely a standby unit, but looking at the Tripp-Lite site, that model shows as a line interactive UPS.
Just to be clear, this is the UPS you have, correct?
The NUT report for the SMART1500LCD does show battery.charge.low as being settable, but your output definitely indicates that it is not.
Not sure what to think think about that.
-
@dennypage said in NUT package:
Just to be clear, this is the UPS you have, correct?
Yes, the Rack Version.
There is a lot of conflicting info. Tripplite says on its website its compatible with Windows and Mac OS X. But in the manual it says Windows/Mac/Linux... and if you follow links from the website into the PowerAlert software page it also says its compatible with NUT.
NUT website says its compatible here. The link to the NUT report you posted is for the Tower which has a different product ID of 3016 and I'm guessing protocol too since the SMART1500LCD I have has product ID and protocol number of 2009.
I called Tripplite support and they said since its not listed as NUT compatible on the direct website they couldn't help me. But I was able to verify that the default ```
battery.charge.low=10 -
@whoami-tm said in NUT package:
I called Tripplite support and they said since its not listed as NUT compatible on the direct website they couldn't help me.
Rather unfortunate...
-
I figured I'd give a follow up for anyone in the future who's reading my posts on the Tripplite SmartPro1500LCD aka SMART1500LCD trying to figure out why it wont work.
Personally I ended up giving up and opening a return before my return window closed. I just wanted a cheap rack mountable UPS that had a depth less than 16" to power my network on power failure but the Tripplite Smart1500LCD isn't it. After spending well over 40hrs trying to figure out why the Smart1500LCD wouldn't play nice with NUT I ended up buying a APC BackUps Pro 1500 gaming bgm1500 and a 1U rack shelf. It took me about a whole 2 hrs to get the APC working with apcuspd and do a full test to verify it would accomplish what I was trying to achieve.
If I was to guess why the Smart1500LCD doesn't work with the NUT package in pfSense I think the driver is sending the reboot command to the UPS.
I assume that NUT sends the available instant commands with usbhid-ups based on what is available for
productid=2012
to the UPS to get it to respond.upscmd -l tripplite
returnsInstant commands supported on UPS [tripplite]: beeper.disable - Disable the UPS beeper beeper.enable - Enable the UPS beeper beeper.mute - Temporarily mute the UPS beeper beeper.off - Obsolete (use beeper.disable or beeper.mute) beeper.on - Obsolete (use beeper.enable) load.off - Turn off the load immediately load.off.delay - Turn off the load with a delay (seconds) reset.watchdog - Reset watchdog timer shutdown.reboot - Shut down the load briefly while rebooting the UPS shutdown.stop - Stop a shutdown in progress test.battery.start.deep - Start a deep battery test test.battery.start.quick - Start a quick battery test test.battery.stop - Stop the battery test
I can verify that
beeper.enable
&beeper.disable
work and the setting holds.So I'm guessing that
ups.delay.shutdown
is not written to the actual UPS it's self until the final shutdown command is issued and the timer is set inload.off.delay
. I'm thinking this is why settingups.delay.shutdown
withupsrw
wouldn't hold and kept reverting back to the default of 20 after a period of time. I'm also thinking settingoffdelay=60
in the driver config wouldn't work because the driver is actually sendingshutdown.reboot
to the UPS instead ofload.off.delay
with the time specified byoffdelay=
onfsd
which is why the UPS would shutdown within 20 seconds killing pfSense in mid shutdown then waiting about 20-30 seconds before restoring power even though it was on battery and the main was off.Maybe by reverse engineering and figuring out exactly what commands the driver is sending to the UPS, then editing the driver, you might be able to get this to work.