How to configure the UPS port?

Status
Not open for further replies.

andymemo

Dabbler
Joined
Jun 2, 2011
Messages
29
HP T1500 XR, Serial UPS

Hi,

Just to share my experience with getting my HP T1500XR UPS to work - connected through serial. In FreeNAS 0.7, I used the bcmxcp driver, so in the UPS setup for v8.0-Beat4 I selected one of the HP UPS's with this driver. In the port field, I have entered '/dev/cuau0' as my mobo only has 1 serial port header. When I start the service, I get:
Code:
Jul 20 21:10:06 NAS freenas[1820]: Executing: /usr/sbin/service ix-ups quietstart
Jul 20 21:10:06 NAS freenas[1820]: Executing: /usr/sbin/service nut restart
Jul 20 21:10:06 NAS freenas: nut not running? (check /var/db/nut/upsd.pid).
Jul 20 21:10:06 NAS freenas: Attempting to autodect baudrate
Jul 20 21:10:19 NAS freenas: Connected to UPS on /dev/cuau0 with baudrate 9600
Jul 20 21:10:20 NAS freenas: Network UPS Tools - UPS driver controller 2.4.1
Jul 20 21:10:20 NAS freenas: Starting nut.
Jul 20 21:10:21 NAS freenas: listening on 0.0.0.0 port 3493
Jul 20 21:10:21 NAS freenas: Connected to UPS [upshh]: bcmxcp-upshh
Jul 20 21:10:21 NAS freenas[1820]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd


Running 'upsc upshh@localhost' on the CLI gives:
Code:
NAS# upsc upshh@localhost
ambient.temperature: 42
ambient.temperature.high: 70
battery.charge: 95
battery.runtime: 3155
battery.voltage: 52.26
driver.name: bcmxcp
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/cuau0
driver.version: 2.4.1
driver.version.internal: 0.21
input.frequency: 49.65
input.frequency.high: 54
input.frequency.low: 46
input.frequency.nominal: 50
input.transfer.boost.high: 207
input.transfer.high: 266
input.transfer.low: 171
input.transfer.trim.low: 243
input.voltage: 224
input.voltage.nominal: 230
outlet.1.delay.shutdown: -1
outlet.1.delay.start: 1
outlet.1.id: 1
outlet.1.status: On
outlet.2.delay.shutdown: -1
outlet.2.delay.start: 2
outlet.2.id: 2
outlet.2.status: On
output.current:  1.0
output.current.nominal:  6.8
output.frequency: 49.65
output.phases: 1
output.voltage: 224
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.firmware: Cont:02.03 Inve:02.03
ups.load:  14.8
ups.model: T1500 XR   1500VA
ups.power: 222
ups.power.nominal: 1500
ups.serial: CN96060
ups.status: OL


Next to see if my UPS is actually working as suggested by Milhouse.

Cheers,
Andy
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I have an APC Back-UPS Pro BR1000G plugged into the ugen1.2 port. Running chmod 777 /dev/ugen1.2 allows the UPS to connect. Typing upsc UPS@localhost displays all the info for my UPS and it does appear correct. The settings I'm using are Back-UPS Pro USB USB (usbhid-ups), Port: usbus4. I will perform more testing tomorrow but I don't believe the chmod sticks after reboot. I'll test again tomorrow to make sure I got it correctly and see if the server will shutdown properly when the power is pulled. Here is the display to the command...
Code:
freenas# upsc UPS@localhost
Error: Connection failure: Connection refused
freenas# chmod 777 /dev/ugen1.2
freenas# upsc UPS@localhost
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2011/03/09
battery.runtime: 4692
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.2
battery.voltage.nominal: 24.0
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: usbus4
driver.version: 2.4.1
driver.version.data: APC HID 0.93
driver.version.internal: 0.34
input.transfer.high: 147
input.transfer.low: 88
input.voltage: 122.0
input.voltage.nominal: 120
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.firmware: 868.L2 .D
ups.firmware.aux: L2
ups.load: 13
ups.mfr: American Power Conversion
ups.mfr.date: 2011/03/09
ups.model: Back-UPS BR1000G
ups.productid: 0002
ups.serial: 3B1111X16679
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
freenas#
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
What happened Joe?

So... M-Joe, what happened when you tested?
Have you tried 'putting anything but blank' into the GUI for port ?
Let us all know.

Peace,
CB
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
CB,
Haven't had time to test, too many issues at home the past two days. The weekend will hopefully give me some time to check it out. On another note, haven't seen much progress from the Dev team over the past two weeks. I know one person was moving across the country but you would think the others would be doing something. Hopefully we will see some progress soon and once I get some time to play with the UPS, I'll post my findings.

-Mark
 

KitDavis

Dabbler
Joined
Jul 16, 2011
Messages
18
CBRay You are correct, once you have run chmod, then you can put anything in the port name.
Additionally, in my tests, putting the UPS on battery power and running the UPS battery down to zero does not initiate a shutdown. Moreover, once the UPS is unplugged, upsc reports "data stale" and continues to report this even after the UPS is plugged back in. I have to turn the UPS service off and back on before the UPS will be recognized again.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Kit,
In your next posting would you include the UPS model you have and the configuration you are using. It's just for info here in case someone else has the same or similar model.
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
UPS service.

M-Joe ;)
I'm right with ya brother, I've been lagging behind on my FreeNAS this past week too(I've been trying to get helping with the FN8 documentation). But doctors and then more doctors happened. It pisses me off no Wi-Fi in the waiting rooms, ah, the price we pay to stay alive.

Kit,
I was suspecting that was the situation with the UPS service. My mistyping of the port name in the GUI and having the service start anyway was my first clue something could be wrong. I just didn't get deeper than to try a few 'test' port names like 'hall of the mountain king' and blank (hall works, blank doesn't).
I guess you've confirmed that the chmod 777 was enabling the UPS service to start despite the port name in the GUI, THANK YOU.
At the time, something just didn't seem right to me after that. It didn't seem as though the UPS service was really running properly. I guess you've confirmed that also.
Were you able to start the UPS service with the UPS disconnected from the NAS box?
And Thank you Kit, for doing some further testing that I (we others) haven't managed the time to do.

Andy,
Please let us know your progress with the 'Milhouse' protocol.

Tekkie,
Could you go back and do some checking with your UPS setup and let us know what you find ? Is it really working properly and fully functional ?

Everyone (WG),
I think I may have worded this question incorrectly in it's original form:
Does the system need a user entry for UPS similar to other daemons?
Maybe it should read:
Would creating a user entry for the service be helpful for permissions as well as email notifications?

I will try to see how each of my UPSs (UPSes? :confused:, ah! Uninteruptable Power Supplies) react with FN8 asaic.

I'm sure that this thread is just gettin' warmed up for the weekend.

Thanks to everyone working on and testing this out, as it is a VITAL part of the FreeNAS 8 solution, but I think it's brought over 'as-is' from FreeBSD, not completely sure.

I'll stop now as I've already done my 'Rant' for July.:o

Peace,
CB
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
I am waiting for a USB extension cable to hook it up in its final location, having the FreeNAS box in the living room did not meet the wife's image of what a living room should look like... I wonder why... ;)
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
Hell Tekkie, if she tells you what does meet a wife's image of what a living room should look like, Please let us know, I'm still trying to figure that one out!

Peace,
CB

Might want to post that answer in 'How To' forum also...
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
Code:
shrek# upsc upshh@localhost
Error: Unknown UPS
shrek# upsc upshh@localhost:3493
Error: Unknown UPS

Weird... I am sure I was getting more info previously I did the 'chmod 777' of the port on which the UPS is connected but when starting the service I get this
Code:
Jul 31 09:16:37 shrek freenas: Network UPS Tools - UPS driver controller 2.4.1
Jul 31 09:16:37 shrek freenas: Will not 'start' nut because nut_enable is NO.
Jul 31 09:16:38 shrek freenas[1945]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
Jul 31 09:16:41 shrek freenas[1945]: Popen()ing: sysctl -b kern.geom.confxml
Jul 31 09:16:41 shrek freenas[1945]: Executing: /usr/sbin/service ix-ups quietstart
Jul 31 09:16:41 shrek freenas[1945]: Executing: /usr/sbin/service nut restart
Jul 31 09:16:41 shrek freenas: nut not running? (check /var/db/nut/upsd.pid).
Jul 31 09:16:42 shrek root: Unknown USB device: vendor 0x051d product 0x0002 bus uhub0
Jul 31 09:16:42 shrek freenas: Using subdriver: APC HID 0.93
Jul 31 09:16:42 shrek freenas: Network UPS Tools - Generic HID driver 0.34 (2.4.1)
Jul 31 09:16:42 shrek freenas: USB communication driver 0.31
Jul 31 09:16:42 shrek freenas: Network UPS Tools - UPS driver controller 2.4.1
Jul 31 09:16:42 shrek freenas: Starting nut.
Jul 31 09:16:42 shrek freenas: listening on 127.0.0.1 port 3493
Jul 31 09:16:42 shrek freenas: Connected to UPS [ups]: usbhid-ups-ups
Jul 31 09:16:43 shrek freenas[1945]: Executing: /bin/pgrep -F /var/db/nut/upsd.pid upsd
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
He was telling it to be quiet, fear of the wife :o (upshh).
 

ohnename

Explorer
Joined
May 26, 2011
Messages
88
Does it work for someone that the UPS is shutting down the FN8 Box?
It doesn´t work for me, communication with the a powerware 9120 UPS via RS232 is OK and the ups service is starting properly.
I waited until the batteries were empty, nothing happens. Tested with 8.0.1 beta3 and beta4.
UPS2.jpg UPS.jpg
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I haven't been able to get it to work either. It just looks nice having the UPS option there, too bad no once can get it to function.
 

cbray

Explorer
Joined
Jun 16, 2011
Messages
68
shh

But Joe...errr Mark... it does make for an interesting thread :rolleyes:
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
Well, UPS was developed but not tested!

If anyone can find out why freenas is not shutting down the machine (by looking logs and messing with the scripts) please fill a ticket into support.freenas.org and the fix will be integrated.

Unfortunately I don't have a UPS myself to do so...
 

jfr2006

Contributor
Joined
May 27, 2011
Messages
174
from which release has this been fixed?
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
@William there is a ticket in for the usb port access which is blocked, lets start with that. ;)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I agree with William, but if anyone can get the UPS shutdown to function, post so others can test and submit a ticket with a possible solution.
 
Status
Not open for further replies.
Top