SOLVED Tripp Lite HTR22-3U UPS driver?

Status
Not open for further replies.

RedBear

Explorer
Joined
May 16, 2015
Messages
53
I'm not seeing the Tripp Lite HTR22-3U on the list of UPS drivers in the FreeNAS web GUI. I'm hoping I won't need to buy an SNMPWEBCARD to put in it to make it work with FreeNAS. Any input on an appropriate alternative driver would be greatly appreciated.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
So, the official compatibility list for the UPS daemon is here:
http://www.networkupstools.org/stable-hcl.html

You'll note that only two HTR models are listed, but, both of them use the usbhid-ups driver. I would say there is an 82% that it will work with your UPS.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
So, the official compatibility list for the UPS daemon is here:
http://www.networkupstools.org/stable-hcl.html

You'll note that only two HTR models are listed, but, both of them use the usbhid-ups driver. I would say there is an 82% that it will work with your UPS.

I wanted to wait a few days for my two HTR22-3U units to show up and I'd had a while to play with them before I responded to this. Thanks for the link.

I'm now pleased (and somewhat shocked) to report that I seem to have gotten lucky. While the other HTR models on the driver list have USB ports I can confirm that the HTR22-3U has only a serial port built in. After a few wrong tries the "tripplitesu" driver seems to work fine. It's on the driver list as "Tripp Lite ups 1 SmartOnline (tripplitesu)". All the relevant data seems to be reported correctly and the system recognizes when the UPS goes on and off battery.

Code:
battery.charge: 100
battery.temperature: 19
battery.voltage: 82.6
battery.voltage.nominal: 72
device.mfr: Tripp Lite
device.model: HTR22-3U
device.type: ups
driver.name: tripplitesu
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/cuau0
driver.version: 2.7.2
driver.version.internal: 0.03
input.frequency: 59.9
input.transfer.high: 138
input.transfer.low: 65
input.voltage: 127.9
input.voltage.nominal: 120
output.frequency: 59.9
output.voltage: 119.9
output.voltage.nominal: 120
ups.firmware: 00
ups.load: 0
ups.mfr: Tripp Lite
ups.model: HTR22-3U
ups.status: OL
ups.test.result: No test performed


And /var/log/ups.log is populated with relevant information:

Code:
20150602 234418 100 127.9 0 [OL] NA 59.9
20150602 234918 100 127.9 0 [OL] NA 59.9
20150602 235418 100 127.1 0 [OL] NA 60.0
20150602 235918 100 127.1 0 [OL] NA 59.9
20150603 000418 100 127.1 0 [OL] NA 59.9
20150603 000918 100 127.9 0 [OL] NA 59.9
20150603 001418 100 127.9 0 [OL] NA 59.9
20150603 001918 100 127.9 0 [OL] NA 60.0
20150603 002418 100 127.9 0 [OL] NA 60.0
20150603 002918 100 127.1 0 [OL] NA 60.1
20150603 003418 100 126.3 0 [OL] NA 59.9
20150603 003918 100 127.1 0 [OL] NA 60.0
20150603 004418 100 127.1 0 [OL] NA 60.0
20150603 004918 100 127.1 0 [OL] NA 59.8
20150603 005418 100 127.9 0 [OL] NA 60.0


Although since there's no data in that second to last field where it says "NA" I can't figure out what it's supposed to be showing, and I can't find any examples or documentation online to explain the file format. So I don't know if I should be worried about that remaining "NA" or not.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
I wanted to wait a few days for my two HTR22-3U units to show up and I'd had a while to play with them before I responded to this. Thanks for the link.

I'm now pleased (and somewhat shocked) to report that I seem to have gotten lucky. While the other HTR models on the driver list have USB ports I can confirm that the HTR22-3U has only a serial port built in. After a few wrong tries the "tripplitesu" driver seems to work fine. It's on the driver list as "Tripp Lite ups 1 SmartOnline (tripplitesu)". All the relevant data seems to be reported correctly and the system recognizes when the UPS goes on and off battery.

Code:
battery.charge: 100
battery.temperature: 19
battery.voltage: 82.6
battery.voltage.nominal: 72
device.mfr: Tripp Lite
device.model: HTR22-3U
device.type: ups
driver.name: tripplitesu
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/cuau0
driver.version: 2.7.2
driver.version.internal: 0.03
input.frequency: 59.9
input.transfer.high: 138
input.transfer.low: 65
input.voltage: 127.9
input.voltage.nominal: 120
output.frequency: 59.9
output.voltage: 119.9
output.voltage.nominal: 120
ups.firmware: 00
ups.load: 0
ups.mfr: Tripp Lite
ups.model: HTR22-3U
ups.status: OL
ups.test.result: No test performed


And /var/log/ups.log is populated with relevant information:

Code:
20150602 234418 100 127.9 0 [OL] NA 59.9
20150602 234918 100 127.9 0 [OL] NA 59.9
20150602 235418 100 127.1 0 [OL] NA 60.0
20150602 235918 100 127.1 0 [OL] NA 59.9
20150603 000418 100 127.1 0 [OL] NA 59.9
20150603 000918 100 127.9 0 [OL] NA 59.9
20150603 001418 100 127.9 0 [OL] NA 59.9
20150603 001918 100 127.9 0 [OL] NA 60.0
20150603 002418 100 127.9 0 [OL] NA 60.0
20150603 002918 100 127.1 0 [OL] NA 60.1
20150603 003418 100 126.3 0 [OL] NA 59.9
20150603 003918 100 127.1 0 [OL] NA 60.0
20150603 004418 100 127.1 0 [OL] NA 60.0
20150603 004918 100 127.1 0 [OL] NA 59.8
20150603 005418 100 127.9 0 [OL] NA 60.0


Although since there's no data in that second to last field where it says "NA" I can't figure out what it's supposed to be showing, and I can't find any examples or documentation online to explain the file format. So I don't know if I should be worried about that remaining "NA" or not.

That's good news sir. A couple pieces of information for you:

  1. Your missing column would normally denote the internal temperature of the UPS battery. For it to be missing is "normal" in that most UPS's do not report this information. This is the link denoting how the format works in the log.
  2. The 127.9 etc column is your line input voltage. 127.9 is much too high for North American voltage. I would try to confirm that at the circle panel, if you have a volt meter. Sometimes the UPS voltage things aren't exactly precise. But let's suppose you confirm your voltage is 128ish and above. I mean, it'll do--aside from your lightbulbs probably losing 20% of their lifetime, there's more than likely no harm done; but it's absolutely at the right edge cusp of what's acceptable. If you call and tell your electric company that you're at nearly 130V line voltage, they will probably want to adjust it for you.
  3. That column with the 0's in it is your "load percentage". I.e., you have nothing plugged into the UPS, according to that. On my UPS, that column is about 10 for my FreeNAS.
I would say there is a 99.9914% chance that your UPS is working just fine now. Everything looks great.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
That's good news sir. A couple pieces of information for you:

  1. Your missing column would normally denote the internal temperature of the UPS battery. For it to be missing is "normal" in that most UPS's do not report this information. This is the link denoting how the format works in the log.
  2. The 127.9 etc column is your line input voltage. 127.9 is much too high for North American voltage. I would try to confirm that at the circle panel, if you have a volt meter. Sometimes the UPS voltage things aren't exactly precise. But let's suppose you confirm your voltage is 128ish and above. I mean, it'll do--aside from your lightbulbs probably losing 20% of their lifetime, there's more than likely no harm done; but it's absolutely at the right edge cusp of what's acceptable. If you call and tell your electric company that you're at nearly 130V line voltage, they will probably want to adjust it for you.
  3. That column with the 0's in it is your "load percentage". I.e., you have nothing plugged into the UPS, according to that. On my UPS, that column is about 10 for my FreeNAS.
I would say there is a 99.9914% chance that your UPS is working just fine now. Everything looks great.

  1. Oh, I actually found that UPSLOG(8) man page link a few days back but couldn't properly parse out the information at the time to find what I was looking for. Now with more context I understand what it's saying under "The default format string is:". But actually I found this link just last night where someone more succinctly described the fields in ups.log. Now I'm left wondering why the temperature value isn't making it into the log when it is clearly shown in the output of "upsc ups". Assuming it's in Celcius the range I'm seeing, between 19 and 22, seems accurate and normal. It's not a nominal, static value.
  2. The high voltage does concern me. I was reading about 126.5V consistently off the outlets in another room with a cheap multimeter. Until I get another data source I'm going to assume the expensive UPS might be the more accurate one. It would explain why light bulbs don't seem to last very long around here. When you say "confirm that at the circle panel" I assume you're referring to the meter box outside? I'll have to look up how to do that safely. Anyway I think I will call the electric department and see if they will do something about it. They just came out a couple months ago and fixed some bizarre problem at the transformer (loose cable, I suspect) that was randomly cutting power to my entire house for several seconds at a time. It took some real prodding to finally get them to get up on that pole and do whatever it is they did that fixed it (I wasn't here when they showed up that time). They kept saying it was impossible that there was anything wrong at the transformer because nobody else on that transformer was complaining about outages. I seem to recall also asking them about the voltage at the time and they just brushed it off. Which makes me think it may be difficult getting them to take care of it. And I'm not good at being pushy.
  3. During my initial testing I've had one of the redundant PSUs on my TS440 plugged into the UPS and the other on a surge strip. I've been wondering how the switching circuit determines which PSU to take power from. Looks like it's been taking nothing from the UPS side. I'll have to try plugging both PSUs into the UPS and see what the load ends up being. I'm assuming that's load percentage of the continuous load rating for this particular model UPS.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Sorry, by "circle panel" what I meant to say was "circuit panel".

I personally think 127VAC is too high. I'd never go for that in my home, and I'd be on the phone with the electric company.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
Sorry, by "circle panel" what I meant to say was "circuit panel".

I personally think 127VAC is too high. I'd never go for that in my home, and I'd be on the phone with the electric company.

Circuit panel makes a lot more sense.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
My UPS doesn't seem to report battery.charge.low, battery.runtime or battery.runtime.low, but I wanted to see if it could be set up to shutdown my system when it reaches low battery. And I wanted to find out where the low battery threshold was. Turns out it's set at 20%, just like in other examples I found online, and it does successfully shut down the system and the UPS shortly after the charge falls below 20%. Although I'm not 100% certain that the system was completely shutdown before the UPS powered itself off. The recent June 4th FreeNAS update makes the UPS shutdown optional, so I think I'll leave that turned off.

The ten-minute shutdown time from start of "OB" status makes sense because I had changed the timed shutdown from 300 to 600 seconds. But this makes me wonder why the shutdown timer field gets grayed out when you change to "UPS reaches low battery" as shutdown mode. I think this is a bug and the field should not be grayed out.

Also, yes it did take a couple of hours to run it down to 20% with just the TS440 and a Netgear 16-port switch plugged into it.

Remaining issues: "ups.load" variable continues to show zero at all times, even though there is definitely a load. Temperature value doesn't make it into the log, even though it's definitely being reported by "upsc". And the "upsrw" and "upscmd" commands keep giving me an "ACCESS DENIED" error, which I'm wondering if I should post as a bug.

Code:
20150604 213226 NA NA NA [NA] NA NA
20150604 213232 NA NA NA [WAIT] NA NA
20150604 213732 100 126.3 0 [OL] NA 59.9
20150604 214232 100 127.1 0 [OL] NA 60.1
20150604 214732 100 127.1 0 [OL] NA 60.0
20150604 215232 100 127.1 0 [OL] NA 60.0
20150604 215732 100 127.1 0 [OL] NA 59.9
20150604 220232 100 0.0 0 [OB] NA 0.0
                                                                              
Broadcast Message from root@Test-FreeNAS.local                                
        (no tty) at 22:02 AKDT...                                             
                                                                              
UPS ups on battery                                                            
                                                                              
20150604 220732 100 0.0 0 [OB] NA 0.0
20150604 221232 100 0.0 0 [OB] NA 0.0
20150604 221732 100 0.0 0 [OB] NA 0.0
20150604 222232 100 0.0 0 [OB] NA 0.0
20150604 222732 100 0.0 0 [OB] NA 0.0
20150604 223232 100 0.0 0 [OB] NA 0.0
20150604 223732 100 0.0 0 [OB] NA 0.0
20150604 224232 100 0.0 0 [OB] NA 0.0
20150604 224732 87 0.0 0 [OB] NA 0.0
20150604 225232 87 0.0 0 [OB] NA 0.0
20150604 225732 75 0.0 0 [OB] NA 0.0
20150604 230232 70 0.0 0 [OB] NA 0.0
20150604 230732 65 0.0 0 [OB] NA 0.0
20150604 231232 60 0.0 0 [OB] NA 0.0
20150604 231732 60 0.0 0 [OB] NA 0.0
20150604 232232 55 0.0 0 [OB] NA 0.0
20150604 232732 50 0.0 0 [OB] NA 0.0
20150604 233232 45 0.0 0 [OB] NA 0.0
20150604 233732 40 0.0 0 [OB] NA 0.0
20150604 234232 35 0.0 0 [OB] NA 0.0
20150604 234732 30 0.0 0 [OB] NA 0.0
20150604 235232 25 0.0 0 [OB] NA 0.0
20150604 235732 22 0.0 0 [OB] NA 0.0
20150605 000232 20 0.0 0 [OB] NA 0.0
                                                                              
Broadcast Message from root@Test-FreeNAS.local                                
        (no tty) at 0:02 AKDT...                                              
                                                                              
UPS ups battery is low                                                        
                                                                              
                                                                              
Broadcast Message from root@Test-FreeNAS.local                                
        (no tty) at 0:02 AKDT...                                              
                                                                              
Executing automatic power-fail shutdown                                       

                                                                              
20150605 000732 16 0.0 0 [FSD OB LB] NA 0.0
20150605 001232 12 0.0 0 [FSD OB LB] NA 0.0
                                                                              
*** FINAL System shutdown message from root@Test-FreeNAS.local ***          

System going down IMMEDIATELY                                                 

                                                                              
20150605 001313 10 0.0 0 [FSD OB LB] NA 0.0
Connection to test-freenas.local closed by remote host.
Connection to test-freenas.local closed.




20150605 001636 NA NA NA [WAIT] NA NA
20150605 002137 68 127.1 0 [OL] NA 59.9
20150605 002636 70 126.3 0 [OL] NA 59.8
20150605 003136 71 127.1 0 [OL] NA 59.9
20150605 003636 73 127.1 0 [OL] NA 60.0
20150605 004136 75 127.1 0 [OL] NA 59.9
20150605 004636 76 127.1 0 [OL] NA 60.0
20150605 005136 78 127.1 0 [OL] NA 59.9
20150605 005636 79 127.1 0 [OL] NA 59.9
20150605 010136 81 127.1 0 [OL] NA 59.9
20150605 010636 82 127.1 0 [OL] NA 60.0
20150605 011136 84 127.1 0 [OL] NA 60.1
20150605 011636 85 127.1 0 [OL] NA 60.0
20150605 012136 87 127.9 0 [OL] NA 60.0
20150605 012636 87 127.1 0 [OL] NA 59.9
20150605 013136 89 127.1 0 [OL] NA 59.8
20150605 013636 90 127.1 0 [OL] NA 59.8
20150605 014136 92 127.1 0 [OL] NA 60.0
20150605 014636 93 127.1 0 [OL] NA 60.1
20150605 015136 93 127.9 0 [OL] NA 59.9
20150605 015636 95 127.9 0 [OL] NA 60.0
20150605 020136 95 127.9 0 [OL] NA 60.0
20150605 020636 96 127.1 0 [OL] NA 60.0
20150605 021136 96 127.1 0 [OL] NA 60.0
20150605 021636 98 127.1 0 [OL] NA 60.0
20150605 022136 98 127.1 0 [OL] NA 59.8
20150605 022636 98 127.1 0 [OL] NA 59.9
20150605 023136 100 127.1 0 [OL] NA 60.0
20150605 023636 100 127.1 0 [OL] NA 59.8
20150605 024136 100 127.1 0 [OL] NA 60.0
20150605 024636 100 127.9 0 [OL] NA 60.0
20150605 025136 100 127.9 0 [OL] NA 59.9
20150605 025636 100 127.1 0 [OL] NA 60.0
20150605 030136 100 127.9 0 [OL] NA 60.0
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
I meant it took 10 minutes to shut down after the start of "FSB OB LB" or "low battery" status.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
The ten-minute shutdown time from start of "OB" status makes sense because I had changed the timed shutdown from 300 to 600 seconds. But this makes me wonder why the shutdown timer field gets grayed out when you change to "UPS reaches low battery" as shutdown mode. I think this is a bug and the field should not be grayed out.

This is definitely a bug. See bug numbers 5913 and 7991, which are actually duplicates despite their different disposal. When you set a timed shutdown for going on battery, FreeNAS not only sets a timer for x seconds, but also alters FINALDELAY in upsmon.conf to the same value. Three problems follow from that. Firstly, the delay after going on battery before shutting down is 2x instead of x seconds. Secondly, any slave computers shutdown after x seconds, halfway through the wait for FreeNAS to shutdown. This is not necessarily harmful, but surprising.

The third is the killer problem that you have discovered. If FreeNAS just changed the timer value in upssched.conf for shutdown a certain time after going on battery (edited to make sense), it would be quite right for the box to be greyed out when shutting down on low battery. When the battery is low you want to shut down as soon as you comfortably can. But when you go to shutting down on low battery having previously set a time x seconds before shutting down when going on battery, this value x is left in FINALDELAY. AFAICS you do not want to alter FINALDELAY at all, 5 seconds is perfectly reasonable, and gives time to read the console message. (It is additional to an internal 15 second wait for any slave computers to shutdown.) Now you have a delay (in your case 300 or 600 seconds) before shutdown is implemented on low battery. This is IMHO a bad thing.

There is a workaround: go back to timed shutdown after going on battery so the box is ungreyed. Set the delay at 5 seconds. This is not a practical value, we are just resetting FINALDELAY to the default. Save this. When you open the UPS dialogue again the greyed out box contains '5' when you set the function back to shutdown on low battery. And all is well.

BTW, did you notice that according to man tripplitesu you can set the percentage battery left before low battery is asserted, by putting an entry in the ups.conf box in the FreeNAS GUI? I don't know if it works though. If it is like other ups.conf entries you must not put spaces round the "=" sign.
 
Last edited:

RedBear

Explorer
Joined
May 16, 2015
Messages
53
This is definitely a bug. See bug numbers 5913 and 7991, which are actually duplicates despite their different disposal. When you set a timed shutdown for going on battery, FreeNAS not only sets a timer for x seconds, but also alters FINALDELAY in upsmon.conf to the same value. Three problems follow from that. Firstly, the delay after going on battery before shutting down is 2x instead of x seconds. Secondly, any slave computers shutdown after x seconds, halfway through the wait for FreeNAS to shutdown. This is not necessarily harmful, but surprising.

The third is the killer problem that you have discovered. If FreeNAS just changed the timer value in upssched.conf for shutdown a certain time after going on battery (edited to make sense), it would be quite right for the box to be greyed out when shutting down on low battery. When the battery is low you want to shut down as soon as you comfortably can. But when you go to shutting down on low battery having previously set a time x seconds before shutting down when going on battery, this value x is left in FINALDELAY. AFAICS you do not want to alter FINALDELAY at all, 5 seconds is perfectly reasonable, and gives time to read the console message. (It is additional to an internal 15 second wait for any slave computers to shutdown.) Now you have a delay (in your case 300 or 600 seconds) before shutdown is implemented on low battery. This is IMHO a bad thing.

Indeed I do consider that behavior a bad thing. Before I did the experiment I had assumed that as soon as it passed the low battery threshold it would almost immediately start shutting down. When it didn't I surmised that my 600 seconds entry was affecting the low battery shutdown sequence despite the fact that the field gets grayed out. I waited the designated 10 minutes to make sure that the system really would shut itself down under low battery circumstances. Thankfully, it did.

So this is definitely a bug. Do I need to do something about that? Add my voice to one of the already designated bugs?

There is a workaround: go back to timed shutdown after going on battery so the box is ungreyed. Set the delay at 5 seconds. This is not a practical value, we are just resetting FINALDELAY to the default. Save this. When you open the UPS dialogue again the greyed out box contains '5' when you set the function back to shutdown on low battery. And all is well.

Once the problem is understood, this workaround suggests itself readily. But the value in that field should definitely be totally ignored and a new, properly short, value should be written out by FreeNAS whenever the user switches to low battery shutdown mode. The UPS takes two hours to run down, what if I'd changed that timer to 3600 seconds just for the hell of it? The system would have happily run the battery down to its own auto-shutoff limit.

BTW, did you notice that according to man tripplitesu you can set the percentage battery left before low battery is asserted, by putting an entry in the ups.conf box in the FreeNAS GUI? I don't know if it works though. If it is like other ups.conf entries you must not put spaces round the "=" sign.

I was not even thinking of the driver itself as being something that would have a man page. Silly me. Unfortunately "man tripplitesu" on my system produces the response "No manual entry for tripplitesu". Another bug? I looked it up online and I see what you're referring to. I will attempt to put it in the upsd.conf box in the GUI and we'll see what happens. I'll fix the timer setting and then set lowbatt=96 or something and give it a test.

Thanks for the well-informed input. Now if only I could figure out why upsrw/upscmd keeps giving me "access denied" errors and complaints about "old commands". The choices of commands and variables available for this unit seem limited but I would like to see if any of them work, especially the battery test:

Code:
[root@Test-FreeNAS] /nonexistent# upsrw ups
[input.transfer.high]
Description unavailable
Type: ENUM
Option: "133"
Option: "134"
Option: "135"
Option: "136"
Option: "137"
Option: "138" SELECTED

[input.transfer.low]
Description unavailable
Type: ENUM
Option: "65" SELECTED
Option: "66"
Option: "67"
Option: "68"
Option: "69"
Option: "70"

[root@Test-FreeNAS] /nonexistent# upsrw -s input.transfer.high ups
Username (root): upsmon
Password:
Enter new value for input.transfer.high: 133
Unexpected response from upsd: ERR ACCESS-DENIED
[root@Test-FreeNAS] /nonexistent# upscmd -l ups
Instant commands supported on UPS [ups]:

load.off - Description unavailable
load.on - Description unavailable
shutdown.reboot - Description unavailable
shutdown.reboot.graceful - Description unavailable
shutdown.return - Description unavailable
shutdown.stop - Description unavailable
test.battery.start - Description unavailable
test.battery.stop - Description unavailable
[root@Test-FreeNAS] /nonexistent# upscmd test.battery.start ups
Error: old command names are not supported
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
Success. I changed the delay to 5 seconds in "UPS goes on battery" mode, and saved it. Then went back in and changed to "UPS reaches low battery" shutdown mode, and inserted "lowbatt=96" in the GUI, saved, unplugged the UPS, and waited. And waited. And waited. And got tired of waiting. And tried "99", then "100", then "102", then finally went back to "99" when the others didn't work.

Once the UPS finally stopped reporting 100% charge after nearly 40 minutes, when it suddenly started going back and forth between 100% and 91%, the system started to shut down within seconds. Exactly as it should. Although since it jumped from 100% to 91% I don't know if shutdown would have been triggered at 99% or 98%, but that hardly matters.

The software must be programmed to ignore values of 100 or higher. Or maybe the shutdown sequence doesn't get triggered until the reported charge dips below 100%, no matter what lowbatt says. I have it set to 50% for now.

The lowbatt setting gets reported in the upsc output as driver.parameter.lowbatt.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I'm afraid I can't help with the UPS commands, and readings, they do seem to be very manufacturer, model and driver dependent. You can't actually set the turn off delay on your UPS as far as I can see, so it is fortunate that the latest FreeNAS update enables you to disable switching off the UPS. If there are any UPS registers you need to change it may be best to connect it temporarily to a Windows machine and use the proprietary software. They may or may not remain fixed.

The thing with the shutdown delay field in the GUI is that if it worked properly it wouldn't affect shutdown at all when you were using low battery, so it wouldn't be necessary to change it.

You are right about the NUT manpages, bug number 9974.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
I'm afraid I can't help with the UPS commands, and readings, they do seem to be very manufacturer, model and driver dependent. You can't actually set the turn off delay on your UPS as far as I can see, so it is fortunate that the latest FreeNAS update enables you to disable switching off the UPS. If there are any UPS registers you need to change it may be best to connect it temporarily to a Windows machine and use the proprietary software. They may or may not remain fixed.

The thing with the shutdown delay field in the GUI is that if it worked properly it wouldn't affect shutdown at all when you were using low battery, so it wouldn't be necessary to change it.

You are right about the NUT manpages, bug number 9974.

I'm guessing I'll have to hop over to the actual NUT forums to make any further progress on the missing temp data and load=zero issue. But some comments I found in various places make me think the "access denied" issue is something that FreeNAS needs to fix. One person mentioned ACLs, another talked about putting something in hosts.allow. There doesn't seem to be anything wrong with my upsd.users file. I have no idea how to further troubleshoot that issue, but I definitely feel it should be working out of the box.

Meanwhile, the basic functions of the UPS are working far better than I had ever hoped, thanks to you and DrKK.
 

DJ9

Contributor
Joined
Sep 20, 2013
Messages
183
Another quick suggestion is to check your firmware and see if there is a update available. I had to do this on one of my APC's to get the battery temp to show.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I've just remembered something! Did you give your user 'speshul powas' beyond just monitoring? Mine has all the powers I could find and the command one seems particularly relevant. I kept the default user name 'upsmon', but clearly it applies to whatever user name you choose. Edit: in upsd.users of course.

Code:
[upsmon]
        password = password
        upsmon master

        actions SET
        actions FSD
        instcmds ALL
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
Another quick suggestion is to check your firmware and see if there is a update available. I had to do this on one of my APC's to get the battery temp to show.

That's a good thought but I've found no downloads available for this model from Tripp Lite's website, not even so much as a PDF manual, even after searching for archived files. I have an old laptop with a serial port that I could throw WinXP on and try the included PowerAlert software, but it doesn't seem worth the trouble at this point.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
I've just remembered something! Did you give your user 'speshul powas' beyond just monitoring? Mine has all the powers I could find and the command one seems particularly relevant. I kept the default user name 'upsmon', but clearly it applies to whatever user name you choose. Edit: in upsd.users of course.

Code:
[upsmon]
        password = password
        upsmon master

        actions SET
        actions FSD
        instcmds ALL

I gave this a try. Weird things happened. Very weird things. FreeNAS appears to completely delete and then rewrite the entire /etc/local/nut directory and all files therein when you do so much as stop/restart the UPS service from the web UI. This of course erased both the backup copy I made of upsd.users and the changes I made to the original upsd.users file. I only realized what happened after I tried "ls /etc/local/nut" while I was in the directory and ls said there were no files. Then when I tried to "cd .." to see if the nut directory even still existed, I was kicked all the way out to root and had to cd back to /etc/local/nut, where everything was back the way it was before I made any changes. I assume that means the folder I was in got destroyed and a new one was created with a different inode number (or something). See code snippet.

I made the changes again and then tried "killall -HUP upsd". No luck, still get the errors.

Code:
[root@Test-FreeNAS] /etc/local/nut# ls -lah
total 28
drwxr-xr-x   2 root  wheel   200B Jun  6 01:10 ./
drwxr-xr-x  40 root  wheel   3.3k Jun  6 01:06 ../
-r--r-----   1 root  uucp     78B Jun  6 01:06 ups.conf
-r--r-----   1 root  uucp     15B Jun  6 01:06 upsd.conf
-r--r-----   1 root  uucp     76B Jun  6 01:11 upsd.users
-r--r-----   1 root  uucp    455B Jun  6 01:06 upsmon.conf
-r--r-----   1 root  uucp    475B Jun  6 01:06 upssched.conf
[root@Test-FreeNAS] /etc/local/nut# cp upsd.users upsd.users.old
[root@Test-FreeNAS] /etc/local/nut# ls -lah
total 32
drwxr-xr-x   2 root  wheel   240B Jun  6 01:33 ./
drwxr-xr-x  40 root  wheel   3.3k Jun  6 01:06 ../
-r--r-----   1 root  uucp     78B Jun  6 01:06 ups.conf
-r--r-----   1 root  uucp     15B Jun  6 01:06 upsd.conf
-r--r-----   1 root  uucp     76B Jun  6 01:11 upsd.users
-r--r-----   1 root  wheel    76B Jun  6 01:32 upsd.users.old
-r--r-----   1 root  uucp    455B Jun  6 01:06 upsmon.conf
-r--r-----   1 root  uucp    475B Jun  6 01:06 upssched.conf
[root@Test-FreeNAS] /etc/local/nut#
[root@Test-FreeNAS] /etc/local/nut# echo "Restarting UPS service via GUI at this point"
Restarting UPS service via GUI at this point
[root@Test-FreeNAS] /etc/local/nut#
[root@Test-FreeNAS] /etc/local/nut# ls -lah
total 0
ls: .: No such file or directory
[root@Test-FreeNAS] /etc/local/nut# echo "WTF?"
WTF?
[root@Test-FreeNAS] /etc/local/nut#
[root@Test-FreeNAS] /etc/local/nut# cd ..
/
[root@Test-FreeNAS] /# cd etc/local/nut/
[root@Test-FreeNAS] /etc/local/nut# ls -lah
total 28
drwxr-xr-x   2 root  wheel   200B Jun  6 01:35 ./
drwxr-xr-x  40 root  wheel   3.3k Jun  6 01:34 ../
-r--r-----   1 root  uucp     78B Jun  6 01:34 ups.conf
-r--r-----   1 root  uucp     15B Jun  6 01:34 upsd.conf
-r--r-----   1 root  uucp     51B Jun  6 01:34 upsd.users
-r--r-----   1 root  uucp    455B Jun  6 01:34 upsmon.conf
-r--r-----   1 root  uucp    475B Jun  6 01:34 upssched.conf
[root@Test-FreeNAS] /etc/local/nut#
[root@Test-FreeNAS] /etc/local/nut# echo "Seriously, WTF?"
Seriously, WTF?
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
I think it is better not to edit the /etc/local/nut files directly, but only to do so via the GUI. Admittedly that means that, apart from user name and password, you can only edit upsd.users and ups.conf, but for your current purposes those seem to be the only ones you need to edit.
 

RedBear

Explorer
Joined
May 16, 2015
Messages
53
I think it is better not to edit the /etc/local/nut files directly, but only to do so via the GUI. Admittedly that means that, apart from user name and password, you can only edit upsd.users and ups.conf, but for your current purposes those seem to be the only ones you need to edit.

I agree. I've been trying to avoid making changes in the CLI, but didn't realize as usual that I could just paste those last three lines in the GUI and they would be inserted into upsd.users for me. That part of the GUI just says "Extra users (upsd.users):" after all. GUIs tend to be very confusing and unhelpful when inexperienced users are not given clear examples of what type of entry each field is actually asking for, and what will be done with that entry.

So now my upsd.users has those three lines permanently added to it via the GUI. Same difference, still get the access denied error. The blockage must be somewhere else.

I think I'll go ahead and mark this thread "Solved" and leave it at that. Thanks for all the help.
 
Status
Not open for further replies.
Top