macester Posted August 22, 2015 Share Posted August 22, 2015 NUT Plugin I have moved away fron unRAID I will still maintain updades(off nut core package for slackware) but no new develpment will me made NUT - Network UPS Tools - http://www.networkupstools.org/ This Plugin will install Nut Network UPS Tools, the plugin i based on the frontend of the ups settings in unRAID(apcupsd) to stream line it into the interface. However, diffrent from the built in ups "settings" NUT supports a wide varity of ups brands and models. The plugin is currently only tested with usb connection to the ups (but quite extensively). Features - Start on boot - All NUT usb drivers selectable (can set custom driver) - Shutdown on (Battery Level, Battery Runtime, Timer) - Turn off ups (needed for auto-poweron) - Settings in webGui - Stats in webGui - Compatible with powerdown plugin(using "powerdown" as shutdown command) - Notifications to webGui and email Notes * "UPS Mode:" not yet implemeted (future option for using unRAID as ups "client" for now leave as "standalone") * Click the help button on the unRAID main bar for settings explanations * Passwords and Usernames for slave nut clients (click help) (tested and works with nut clients) * "Runtime left to initiate shutdown" Be aware that different ups`s calculates this diffrently and the runtime can dip below the user defined variable while the ups recalculates, also not all ups´s outputs this value in senconds (most does), so dont use this unless you are sure you´re ups can use this shutdown mode (ask if uncertain). Install *Highly Recommend installing the Powerdown plugin: http://lime-technology.com/forum/index.php?topic=31735.0 Copy the link and paste in the unRAID plugin tab and click "install" https://raw.githubusercontent.com/macexx/plugins/master/nut/nut.plg Setup, your UPS in unRAIDs settings menu under "NUT Settings" -------------------------------------------------------------------------------------------------------- Change log 2015.09.19 UPS statistics now auto updates(every two seconds) 2015.08.24 added launch from plugins menu (thanx saarg) 2015.08.23 added "blazer_ser" to drivers 2015.08.23 Public Release Fix, Restart on upgrades 2015.08.22 Uninstall fixes Fix autorestart after upgrade Make USB drivers selectable Add shutdown on battery levels Remove user/password and hardcode them (see plugin help) Moved scripts to plugin folder for 6.1 (ln -s rc.nut) 2015.08.21 Initial Release Test Version (plg) 2 Quote Link to comment
trurl Posted August 22, 2015 Share Posted August 22, 2015 Does it do notifications? Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 Does it do notifications? Aye to webGui and mail, will add it to features Quote Link to comment
RobJ Posted August 22, 2015 Share Posted August 22, 2015 Thank you for this, macester, fills a need. With this, I think we can say, unRAID has full UPS support now. Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 Thank you for this, macester, fills a need. With this, I think we can say, unRAID has full UPS support now. Still some work need to be done for Serial ups´s(guess they died with the battery ) and ppl running network connected ones. But should be simple enough just need some feedback on whats needed. Quote Link to comment
BRiT Posted August 22, 2015 Share Posted August 22, 2015 Installed fine via the plugin system on v 6.0.1. I had to manually start the service via the command line using /etc/rc.d/rc.nut start. No amount of toggling settings, hitting apply, hitting done, etc would start the service. Quote Link to comment
trurl Posted August 22, 2015 Share Posted August 22, 2015 When you say Netserver havent been tested - (Give feedback)Is this referring to functionality that would allow another computer to be a slave, getting UPS status over ethernet from the master? Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 Installed fine via the plugin system on v 6.0.1. I had to manually start the service via the command line using /etc/rc.d/rc.nut start. No amount of toggling settings, hitting apply, hitting done, etc would start the service. Havent tried it on v 6.0.1., but if started fine with /etc/rc.d/rc.nut start? and gives an output in webgui or by ssh "upsc ups"? if i does, would you mind posting me the output of "cat /boot/config/plugins/nut/nut.cfg" "cat /etc/ups/ups.conf". However if it starts it means that there is something in the php "post" that is acting up, maby something changes in unraid 6.1? Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 When you say Netserver havent been tested - (Give feedback)Is this referring to functionality that would allow another computer to be a slave, getting UPS status over ethernet from the master? Not geting status, but yes beeing a slave (lets say a vm) with nut installed. Quote Link to comment
trurl Posted August 22, 2015 Share Posted August 22, 2015 When you say Netserver havent been tested - (Give feedback)Is this referring to functionality that would allow another computer to be a slave, getting UPS status over ethernet from the master? Not geting status, but yes beeing a slave (lets say a vm) with nut installed. Maybe I just need to follow the link in the first post. Not really interested in this for VMs. I currently have an APC UPS. unRAID and my PC are both getting their power from this same UPS, so I want both of them to be able to respond to the same UPS events. Since the UPS only provides information from USB, my PC has to rely on its installed apcupsd getting its UPS information over the network from the other apcupsd built-in to unRAID which is getting the UPS information over USB. The main reason I would be interested in this plugin is so I could use other brands of UPS in a similar configuration. Quote Link to comment
BRiT Posted August 22, 2015 Share Posted August 22, 2015 Havent tried it on v 6.0.1., but if started fine with /etc/rc.d/rc.nut start? and gives an output in webgui or by ssh "upsc ups"? if i does, would you mind posting me the output of "cat /boot/config/plugins/nut/nut.cfg" "cat /etc/ups/ups.conf". However if it starts it means that there is something in the php "post" that is acting up, mayby something changes in unraid 6.1? I wouldn't be surprised if its possibly something related to the 6.1 security changes that don't quite line up with 6.0.1 . battery.charge: 100 battery.charge.low: 30 battery.charge.warning: 30 battery.runtime: 120 battery.type: PbAc battery.voltage: 27.1 battery.voltage.nominal: 24 device.mfr: Belkin device.model: Belkin UPS device.serial: device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.3 driver.version.data: Belkin/Liebert HID 0.17 driver.version.internal: 0.39 input.frequency: 60.0 input.frequency.nominal: 60 input.transfer.high: 140 input.transfer.high.max: 144 input.transfer.high.min: 140 input.transfer.low: 88 input.transfer.low.max: 88 input.transfer.low.min: 84 input.voltage: 123.4 input.voltage.nominal: 120 output.frequency: 60.0 output.voltage: 123.4 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.firmware: 1 ups.load: 8 ups.mfr: Belkin ups.model: Belkin UPS ups.power.nominal: 1500 ups.productid: 0751 ups.serial: ups.status: OL CHRG ups.test.result: No test initiated ups.timer.shutdown: 0 ups.timer.start: 0 ups.type: offline ups.vendorid: 050d SERVICE="enable" DRIVER="usbhid-ups" SERIAL="" PORT="auto" MODE="standalone" SHUTDOWN="sec_timer" BATTERYLEVEL="60" SECONDS="300" TIMEOUT="300" UPSKILL="disable" [ups] driver = usbhid-ups port = auto Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 When you say Netserver havent been tested - (Give feedback)Is this referring to functionality that would allow another computer to be a slave, getting UPS status over ethernet from the master? Not geting status, but yes beeing a slave (lets say a vm) with nut installed. Maybe I just need to follow the link in the first post. Not really interested in this for VMs. I currently have an APC UPS. unRAID and my PC are both getting their power from this same UPS, so I want both of them to be able to respond to the same UPS events. Since the UPS only provides information from USB, my PC has to rely on its installed apcupsd getting its UPS information over the network from the other apcupsd built-in to unRAID which is getting the UPS information over USB. The main reason I would be interested in this plugin is so I could use other brands of UPS in a similar configuration. This is possible, I used to run this config with NUT when my UPS was hooked up to my ubuntu server... It´s should be simple enough to choose netserver in the config and enter the slave user from "help" however I havent tested it. Apparently discharging an cheap Eaton ups about (100 x times) pretty much kills it so I need a new UPS to get started testing again :'( Quote Link to comment
BRiT Posted August 22, 2015 Share Posted August 22, 2015 I rebooted my system and NUT installed fine and automatically started. Quote Link to comment
saarg Posted August 22, 2015 Share Posted August 22, 2015 I was going to make a plug-in for NUT to kick me into learn programming, but now that is lost... :'( On the serious side, this is good work I need to use the serial driver for my UPS, so what is needed for it to work? Just change the config file? My UPS doesn't play nice on a USB connection, but I'll try it again with this plugin. Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 I rebooted my system and NUT installed fine and automatically started. Thank you for the logs//output, Just noticed that runtime on battery(yours seems to output minutes) is a no go(atleast simple enough =P), will install 6.0 and buy a new ups on monday for moore testing. Aye the plugin should start on boot or upgrade if "start" is selected in plugin settings, this is handled by two different factors then starting it from "apply". *The -plg file, on reboot or upgrade * by unRAIDs webgui conf. So most likely an issue in the webgui. Quote Link to comment
macester Posted August 22, 2015 Author Share Posted August 22, 2015 I was going to make a plug-in for NUT to kick me into learn programming, but now that is lost... :'( On the serious side, this is good work I need to use the serial driver for my UPS, so what is needed for it to work? Just change the config file? My UPS doesn't play nice on a USB connection, but I'll try it again with this plugin. Fist of check which driver is needed, or google your ups with "ups.conf", Hopefully just a "driver and tty connection is needed"(doubt it =P), well if it is, just enter "cutsom driver" and the driver you need. Then add the port ,example, "/dev/tty/tty0". But accoarding to my findings some more settings are usually needed in "ups.conf", so pls if you find out that this is the case post the settings etc... So i can add some way to enter/edit it in the webGui. PS, sorry about the programming, i´m glad to let you know that I killed my ups battery creating this plugin =P Quote Link to comment
saarg Posted August 22, 2015 Share Posted August 22, 2015 I was going to make a plug-in for NUT to kick me into learn programming, but now that is lost... :'( On the serious side, this is good work I need to use the serial driver for my UPS, so what is needed for it to work? Just change the config file? My UPS doesn't play nice on a USB connection, but I'll try it again with this plugin. Fist of check which driver is needed, or google your ups with "ups.conf", Hopefully just a "driver and tty connection is needed"(doubt it =P), well if it is, just enter "cutsom driver" and the driver you need. Then add the port ,example, "/dev/tty/tty0". But accoarding to my findings some more settings are usually needed in "ups.conf", so pls if you find out that this is the case post the settings etc... So i can add some way to enter/edit it in the webGui. PS, sorry about the programming, i´m glad to let you know that I killed my ups battery creating this plugin =P I have my config somewhere well hidden and I'll report back if there is anything needed if the USB doesn't work. I thank you for sacrificing your UPS so I didn't have to sacrifice mine Quote Link to comment
saarg Posted August 22, 2015 Share Posted August 22, 2015 Just tried with the USB cable and I got the same problems as with my own version. It rapidly disconnects/connects and the info from the UPS is wrong. It thinks the battery charge is 2V So I connected it with serial through the usb to serial adapter, chose custom, filled in the correct port (/dev/ttyUSB0) and voilà! the correct info appeared If you want to add the right driver for the serial for the drop down list it's blazer_ser. Thanks again for this great plugin! You might want to add the launch entity so users can just click the icon in the plugins list and get to the settings page. to do this you have to add this to your PLG file: <!ENTITY version "2015.05.28-1"> <!ENTITY launch "Settings/NUT Settings"> <!ENTITY pluginURL "https://raw.githubusercontent.com/theone11/serverlayout_plugin/master/&name;.plg"> ... ... <PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" > Quote Link to comment
luca2 Posted August 24, 2015 Share Posted August 24, 2015 Great Macester! Thx for this plugin. I am on a trip this week..when I return I will test my RIELLO ups (supported by NUT!). I will post my results. Quote Link to comment
clowrym Posted August 24, 2015 Share Posted August 24, 2015 Testing out on my Dell UPS Rack/Tower 2700W/2300W LV, I was never able to get the built UPS setting in unraid to see my dell, so i've been looking for something like this!! Quote Link to comment
clowrym Posted August 26, 2015 Share Posted August 26, 2015 So far I've had no issues!! Quote Link to comment
saarg Posted August 26, 2015 Share Posted August 26, 2015 Thanks for adding the blazer_ser driver in the dropdown list Quote Link to comment
trurl Posted August 29, 2015 Share Posted August 29, 2015 This plugin is in the 6.0 plugins subforum, for those plugins that have not yet been verified to work with 6.1. After reviewing the whole thread, it seems that this plugin actually works and was developed on 6.1, and if it does have any problem, it is with the 6.0 version of unRAID. So macester, should I move this topic to the 6.1 plugins? Quote Link to comment
macester Posted August 30, 2015 Author Share Posted August 30, 2015 This plugin is in the 6.0 plugins subforum, for those plugins that have not yet been verified to work with 6.1. After reviewing the whole thread, it seems that this plugin actually works and was developed on 6.1, and if it does have any problem, it is with the 6.0 version of unRAID. So macester, should I move this topic to the 6.1 plugins? The reason I was holding of with it is that the default button in the webGui is curently broke, "Bon" wrote that he fixed this for a later realease so I wanted to check what he did before I pm´d ya. But aye it was developed for 6.1 so might aswell move it Quote Link to comment
grizzly Posted September 15, 2015 Share Posted September 15, 2015 I have a eaton ellipse pro 850 and nut installed and works but with a few issues. Right now i does shutdown as it should (the important part) at the time/battery level i set (and after a restart for that to take effect). The problem is that the unraid box does not start up again (and i waited for over an hour) if i press the start button on unraid it starts up or if i shutdown and start the ups (as in disable/enable power out from the ups) it also start. The unraid motherboard is set to always start when it gets power which works fine during power outages before i bought the ups. Also tried to disable the damn beeping (don´t need it as the ups fan is loud enough and then some to tell me that power is out). The eaton menu (ON the ups it self) does not work as it should for me you should hold scroll down for 5sec for menu to come up (it works but takes 10s) then hold for 2 sec to go to next menu and it is here it starts to not work. Going from input voltage to output works fine but then it goes back to input voltage again besides one time when i came to eco mode but from eco mode to alarm did not work that time as it went to input voltage again. All in all i cant disable the damn beeping using the ups itself so tried inserting some lines in the nut.cfg under boot/config/plugins/nut. Also tried adding some line for the delayed start and tried 0/1/10 but no change. But none of the two did not seem to work. The ups does work the same if the start delay and beeping line is not there and will change that back after this posting. And the time/battery level is set that high for now when testing but using the default level do not change anything on the startup issue. This will probably be set relatively high (to save the battery some and my sanity from the damn beeping) after my testing as i have no devices that needs or could connect to the unraid box during a power outage anyway. So anyone have any idè why the unraid box do not want to start after a power outage? And is it possible to turn of the alarm using nut? When i tried using a windows 8,1 pc and eatons prg the computer started fine after a outage and i could disable the alarm so to ups seems to work like it should (except for the damn menu). My nut status is battery.charge: 78 battery.charge.low: 20 battery.runtime: 1722 battery.type: PbAc device.mfr: EATON device.model: Ellipse PRO 850 device.serial: G358F17013 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.3 driver.version.data: MGE HID 1.38 driver.version.internal: 0.39 input.frequency: 50.0 input.transfer.high: 285 input.transfer.low: 165 input.voltage: 229.0 input.voltage.extended: no outlet.1.desc: PowerShare Outlet 1 outlet.1.id: 2 outlet.1.status: on outlet.1.switchable: no outlet.2.desc: PowerShare Outlet 2 outlet.2.id: 3 outlet.2.status: on outlet.2.switchable: no outlet.desc: Main Outlet outlet.id: 1 outlet.switchable: no output.frequency: 50.0 output.frequency.nominal: 50 output.voltage: 227.0 output.voltage.nominal: 230 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.firmware: 01.08.0016 ups.load: 14 ups.mfr: EATON ups.model: Ellipse PRO 850 ups.power: 81 ups.power.nominal: 850 ups.productid: ffff ups.realpower: 75 ups.serial: G358F17013 ups.status: OL ups.timer.shutdown: 0 ups.timer.start: 0 ups.vendorid: 0463 Input transfer is that high and low because i tried the high setting range last time and have not changed it back to low (low=default) yet (will do as soon as i post). cat /boot/config/plugins/nut/nut.cfg gives this. SERVICE="enable" DRIVER="usbhid-ups" SERIAL="" PORT="auto" MODE="standalone" SHUTDOWN="batt_level" BATTERYLEVEL="95" SECONDS="1800" TIMEOUT="1800" UPSKILL="disable" UPS.DELAY.START="10" UPS:BEEPER.STATUS="disabled" I should add that if i update the NUT Settings screen in the browser the stat does update fine and is the same that is seen on the ups screen. Quote Link to comment
Recommended Posts
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.