UPS for FreeNas

Status
Not open for further replies.

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Hmm, looks fine. So let's try to crank up the logging/debugging output.
  1. Switch off the UPS service in the GUI
  2. Run: /usr/local/libexec/nut/blazer_usb -a ups -DDD
 

Akhademik

Explorer
Joined
Sep 25, 2013
Messages
60
it runs like a loop which these lines.

send: Q.1
read:(236.7 236.7 236.7 011 50.1 13.6 25.0 00001001
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
That's good news. The driver is able to communicate with the UPS via USB. The data you see are: input voltage & output voltage = 236.7V, ups load = 11%, input frequency = 50.1Hz, battery voltage = 13.6V and UPS temperature = 25 degC -- all those numbers are reasonable. We just need to figure out why upsd is not able to talk to the driver. I need to think what the next step is.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Keep UPS disabled in the GUI and run:
  1. /usr/local/libexec/nut/upsdrvctl start
  2. upsd -DDD
 

Akhademik

Explorer
Joined
Sep 25, 2013
Messages
60
[root@freenas ~]# /usr/local/libexec/nut/upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.5
Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5) 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@freenas ~]#

Network UPS Tools upsd 2.6.5
0.000000 fopen /var/db/nut/upsd.pid: No such file or directory
0.000253 listen_add: added 127.0.0.1:3493
0.000348 setuptcp: try to bind to 127.0.0.1 port 3493
0.000387 listening on 127.0.0.1 port 3493
0.000568 Connected to UPS [ups]: blazer_usb-ups
0.001260 user_add_action: adding 'login' for upsmon
0.001284 user_add_action: adding 'master' for upsmon
0.001301 user_add_action: adding 'fsd' for upsmon
0.001326 mainloop: polling 2 filedescriptors
0.001387 mainloop: polling 2 filedescriptors
0.001444 mainloop: polling 2 filedescriptors
0.001469 UPS [ups]: dump is done

I'm really appreciate your help and your time buddy. i have no idea why the ups works for the first try but the very next day it comes up with these erorrs.
 

Akhademik

Explorer
Joined
Sep 25, 2013
Messages
60
Gravedigger :D

Sorry mates, i would like to ask another question. This is the latest one i got from Console Message, could somebody tell me whether my UPS is working or not cause i don't know what it tells.

Oct 12 19:34:25 freenas notifier: UPS: ups (master) (power value 1)
Oct 12 19:34:25 freenas notifier: nut_upslog not running? (check /var/db/nut/upslog.pid).
Oct 12 19:34:25 freenas notifier: Starting nut_upslog.
Oct 12 21:47:08 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/local/bin/warden list -v
Oct 12 21:47:08 freenas last message repeated 3 times
Oct 13 01:00:19 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/local/bin/warden list -v
Oct 13 01:00:19 freenas last message repeated 3 times
Oct 13 09:10:25 freenas manage.py: [common.pipesubr:57] Popen()ing: /usr/local/bin/warden list -v

What is the last line about? If it has nothing to do with my UPS then i'm really happy to say that my UPS right now works just fine and i think i know the problem for the situation. It's all about the crappy usb cable provided by Santak, i've just changed it to another one from my printer and no more messages about connection of UPS.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
The last message is a debug output related to jails and it is OK. Everything looks fine in your output.
You can also check /var/log/ups.log, the upslog daemon records the UPS status every 5 minutes in that file. If you see new lines appearing the communication with UPS works.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
i thinks it works now. all about the crappy usb cable. Thanks.

OUCH! That... really sucks! Mostly because that's not exactly something that we say "oh yeah.. check the USB cable.. that's GOTTA be the problem". Glad you got it sorted out though! Congrats!
 

Akhademik

Explorer
Joined
Sep 25, 2013
Messages
60
OUCH! That... really sucks! Mostly because that's not exactly something that we say "oh yeah.. check the USB cable.. that's GOTTA be the problem". Glad you got it sorted out though! Congrats!
cause that the provided one by the UPS company, it supposed to work better :D anyways, problem solved
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Check the NUT compatibility list. If it's listed, then yes.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not really. :(
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Choosing to use the COM port or USB port isn't the problem. If his model isn't on the list then it hasn't been verified. The real limitation is going to be the protocol (the "language") that the UPS uses. If its like some UPSes it's made by one brand but then another name is slapped on it to use.

In short, you've got serious homework to do to find out *if* it had a language that is compatible. Even then, if you do manage to verify it and buy it there's a chance that your UPS might have a "revision b" or something that isn't compatible.

What's the MUCH safer and faster bet? Find something you can buy from that list.
 

panz

Guru
Joined
May 24, 2013
Messages
556
This UPS & NUT thing: I can't understand why one UPS unit works with one system and doesn't work with another.

My UPS is an APC Smart 1000 SU-Net, a 10 years old unit with serial port (only).

The SU-1000 works flawlessly with pfSense (NUT Master) but doesn't work properly with FreeNAS (NUT = Master, too).

So, I decided to connect the UPS to my pfSense box (acting as a Master) and let the FreeNAS server to hook-up to it via LAN as Slave. The setup works as expected!

This setup has one important advantage: the firewall is always on and all the computers at my home can be switched off using NUT, not only the server.

So, if you're going to buy an UPS, ask the computer store to test it with your hardware and your OS ;)
 
Status
Not open for further replies.
Top