dmacias Posted September 18, 2017 Share Posted September 18, 2017 (edited) NUT plugin v2 for unRAID 6.1+ NUT - Network UPS Tools - http://www.networkupstools.org/ Based on the original NUT plugin by macester Original thread https://forums.lime-technology.com/topic/40690-plug-in-nut-network-ups-tools/ 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 - Notifications to webGui and email 1. Copy the plugin url: https://raw.githubusercontent.com/dmacias72/NUT-unRAID/master/plugin/nut.plg 2. Paste url into install plugin text input and click install To disable the built in UPS try settiing it to: Start APC UPS daemon: No UPS cable: Custom UPS type: Dumb Change Log###2020.03.17- gfjardim added footer and dashboard plus many other tweaks###2019.02.03- update all icons to fa icons- fix editor font in black theme###2019.01.24- update settings icon to fa font###2018.11.25- add autov to css and js- build nut package from usblib-1.0 branch- remove support link from readme###2018.05.09- fix Autodetect- fix null port error ###2018.04.29 - fix rc script interfering with cupsd - fix Run time in red only when on battery thanks@realies - compile nut-2.7.4.20180429 libusb 1.0+0.1 branch for 6.5 added patch for wait and retry ###2018.01.16 - tweak notification event and subject ###2018.01.14 - fix nut power showing 0 ###2018.01.09 - update nut package to 2.7.4 2017.11.29 commit fd7189d - revert Eaton use-case since it is included in nut package - add ups va and watt capacity inputs for ups that do not present real power nominal ###2018.01.06 - add Eaton use-case to improve load accuracy thanks@realies ###2018.01.03 - fix load for ups with ups.power.nominal vs ups.realpower.nominal ###2017.11.29 - fix permissions so nut conf are not world readable - fix nut-scanner options, only scan usb for auto config ###2017.11.26 - fix plugin install service starting when disabled ###2017.11.25 - fix snmp port input box length and add ip mask ###2017.11.03 - update killpower flag - update permissions and security for nut configs - change username and password variables - add slave user and password ###2017.10.28 - downgrade nut package to 2.7.4 due to usb resets in 6.4rc10b ###2017.10.10 - fix ipaddr filter - update input masks for ipaddr, name and username ###2017.10.08a - fix move old pids to new location - compile nut package to latest commit 2017.09.21 - fix: new nut package uses /etc/nut and /var/run/nut ###2017.10.05 - fix add username and password to upsd users - add autorefresh to editor to fix line number placement - move cdnjs to local - update support for new themes ###2017.09.17 - add ability to change UPS Monitor Name, User and Password ###2017.06.17a - add support for 6.4 themes ###2017.06.04 - add net-snmp package ###2017.05.27 - add autodetection for UPS - fix ip mask ###2017.05.26 - add master/slave options - fix runtime display format ###2017.05.24 - add dropdown options for battery and timers - add killpower flag condition to shutdown script ###2017.05.22 - fix shutdown scripts - move default nut conf files ###2017.05.20 - fix manual config settings ###2017.05.19 - fix reload button - add start conditions to rc script ###2017.05.17 - add manual mode, reload and config editor to settings page - reformat settings page, hide unused vars - add vars, rewrite, combine and move scripts - add snmp settings from Ambrotos fork - untested - add UPS summary, UPS details page and dashboard page - add dynamix plugin api - remove depreciated code - restructure and repackage plugin - rename nut plugin package to difer from nut package ###2015.09.19### - UPS statistics now auto updates(every two seconds) ###2015.08.24### - added launch from plugins(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) Edited April 30, 2018 by dmacias 4 2 Quote Link to comment
Vr2Io Posted September 18, 2017 Share Posted September 18, 2017 Thanks for the modify / update, it is a good news for QNAP/Synology NAS user to share the UPS. Quote Link to comment
kaiguy Posted September 18, 2017 Share Posted September 18, 2017 Thanks for continuing to maintain this plugin! Just FYI -- I updated and the NUT service never started back up. I had to manually toggle the NUT service off then back on within the plugin settings. Now it appears to be working as expected. Quote Link to comment
dadarara Posted September 21, 2017 Share Posted September 21, 2017 (edited) deleted the old Plugin and installed new. now its not working. have old UPS. the driver I used before is upbhid-ups no IPs, no user names . it just worked. Scanning for UPS...Scanning USB bus.Scanning NUT bus (avahi method).[nutdev1]driver = "usbhid-ups"port = "auto"vendorid = "0D9F"productid = "0001"bus = "002" so now what ? Edited September 21, 2017 by dadarara Quote Link to comment
dmacias Posted September 21, 2017 Author Share Posted September 21, 2017 deleted the old Plugin and installed new. now its not working. have old UPS. the driver I used before is upbhid-ups no IPs, no user names . it just worked. Scanning for UPS...Scanning USB bus.Scanning NUT bus (avahi method).[nutdev1]driver = "usbhid-ups"port = "auto"vendorid = "0D9F"productid = "0001"bus = "002" so now what ? Did you try leaving the name as ups and ip as localhost then username monuser and password monpass? Edit. Do you have your previous conf files? Quote Link to comment
dadarara Posted September 21, 2017 Share Posted September 21, 2017 (edited) all left as is. no, dont have conf file. also tried to make manual config. also didnt work what should I do with the config editor? I chose ups.conf while starting up the plugin. not clear how it should work really in the log I have: see the change after I chose the manual config. no diff... BTW, it sounds strange that it tries to address the localhost as this UPS is not connected to network. only USB. ErrorWarningSystemArrayLogin Sep 21 13:28:15 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:20 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:25 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:30 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:35 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:40 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:45 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:50 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:28:55 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:00 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:05 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:10 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:15 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:20 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:25 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:30 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:35 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:40 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:45 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:50 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:29:55 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:30:00 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:30:05 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:30:10 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:30:15 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:30:19 Tower php: /usr/local/emhttp/plugins/nut/scripts/stopSep 21 13:30:20 Tower upsmon[21015]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:30:21 Tower upsmon[21015]: Signal 15: exitingSep 21 13:30:21 Tower upsmon[21014]: upsmon parent: readSep 21 13:30:23 Tower usbhid-ups[20999]: Signal 15: exitingSep 21 13:37:09 Tower php: /usr/local/emhttp/plugins/nut/scripts/startSep 21 13:37:14 Tower usbhid-ups[11551]: Startup successfulSep 21 13:37:15 Tower upsmon[11570]: Startup successfulSep 21 13:37:15 Tower upsmon[11571]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:37:15 Tower upsmon[11571]: Communications with UPS [email protected] lostSep 21 13:37:20 Tower upsmon[11571]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:37:20 Tower upsmon[11571]: UPS [email protected] is unavailableSep 21 13:37:25 Tower upsmon[11571]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:37:30 Tower upsmon[11571]: UPS [[email protected]]: connect failed: Connection failure: Connection refusedSep 21 13:37:35 Tower upsmon[11571]: UPS [[email protected]]: connect failed: Connection failure: Connection refused Edited September 21, 2017 by dadarara Quote Link to comment
dmacias Posted September 22, 2017 Author Share Posted September 22, 2017 The localhost is for the monitor. As a slave you would enter an ip. What do your ups.conf and upson.conf have in then? Also with the Start Network UPS Service set to yes. Try running /etc/rc.d/rc.nut stop Then run /etc/rc.d/rc.nut start. See if there's any errors. You also might try uninstalling the plugin and renaming or deleting the config/plugins/nut directory on the flash drive Quote Link to comment
realies Posted September 22, 2017 Share Posted September 22, 2017 Quote - Turn off ups (needed for auto-poweron) Does it mean that if the system is powered off, the ups goes out of power and shuts down, upon the power being restored the computer will not power on? Or is that nothing will power on the computer if power gets restored during the interval of the UPS being still up and the computer being off already? Quote Link to comment
wgstarks Posted September 22, 2017 Share Posted September 22, 2017 It means that the ups will shutdown after the computer and then power on again when power is restored triggering the computer to boot (if boot options on the computer are configured for this). If the ups never shuts down then the computer will not detect that power has been restored, so no boot up. Quote Link to comment
xoddoza Posted October 4, 2017 Share Posted October 4, 2017 Hi Guys, I've got a Cyberpower PR750ELCD UPS which is plugged into my unraid server by USB cable. NUT V2.0 recognises it using the USBHID-UPS mode and displays the status etc correctly. It will function like this correctly, until a few hours later Oct 4 16:21:21 EntityLite upsd[3807]: Can't connect to UPS [ups] (usbhid-ups-ups): No such file or directoryOct 4 16:21:22 EntityLite upsmon[3811]: Poll UPS [[email protected]] failed - Driver not connected And then the log fills with the last line until I hit 'reload' on the NUT UPS plugin page and then it reconnects just fine. I've tried swapping USB ports 2.0 and 3.0 I havn't tried a different cable. Any other suggestions? Cheers Quote Link to comment
etsi Posted October 4, 2017 Share Posted October 4, 2017 (edited) When using nut how we disable the internal UPS function of unraid ? It's turned off but I get spam of Communications with UPS lost messages in log file. NUT communicates just fine. - UPS settings in unraid UPS Status Lost communication , Start APC UPS daemon: NO - NUT settings UPS status online Edited October 4, 2017 by etsi Quote Link to comment
dmacias Posted October 4, 2017 Author Share Posted October 4, 2017 When using nut how we disable the internal UPS function of unraid ? It's turned off but I get spam of Communications with UPS lost messages in log file. NUT communicates just fine. - UPS settings in unraid UPS Status Lost communication , Start APC UPS daemon: NO - NUT settings UPS status online I have Start APC UPS Daemon set to no, UPS cable set to custom, Custom UPS Cable set blank and UPS Type set to dumb. You might try starting and stopping APC UPS too. Quote Link to comment
dmacias Posted October 4, 2017 Author Share Posted October 4, 2017 Hi Guys, Oct 4 16:21:21 EntityLite upsd[3807]: Can't connect to UPS [ups] (usbhid-ups-ups): No such file or directoryThe usbhid-ups-ups part doesn't look right. I would check your /boot/config/plugins/nut/ups/ups.conf. You also might try uninstalling the plugin, renaming/deleting the /boot/config/plugins/nut directory and then reinstalling the plugin and trying Autodetect. Edit. I believe the usbhid-ups-ups is ok. I'll look through things a bit more. Quote Link to comment
etsi Posted October 4, 2017 Share Posted October 4, 2017 1 hour ago, dmacias said: 2 hours ago, etsi said: When using nut how we disable the internal UPS function of unraid ? It's turned off but I get spam of Communications with UPS lost messages in log file. NUT communicates just fine. - UPS settings in unraid UPS Status Lost communication , Start APC UPS daemon: NO - NUT settings UPS status online I have Start APC UPS Daemon set to no, UPS cable set to custom, Custom UPS Cable set blank and UPS Type set to dumb. You might try starting and stopping APC UPS too. Thanks! Using the above settings it worked (apcupsd[31937]: apcupsd shutdown succeeded). Quote Link to comment
BillClinton Posted October 9, 2017 Share Posted October 9, 2017 (edited) Just Updated to day to your latest 2017.10.08 update and my NUT refused to show up. NUT Settings screen completely blank. So i manually removed my NUT plugin from my flash and reinstalled. Got the settings page back but now I can't get to run. The setting screen show the plugin as running even though the setting is off. Tried with different user and password and I have tried running /etc/rc.d/rc.nut stop and then start. it seemed to work but didn't. I have screen shots to try and explain and I have got diagnostics if you need them. the only thing I haven't tried is restarting my server. My UPS is a MGE Nova 1100 AVR and it has worked up until know, and it also gets found when going through auto detect. any help would be greatly appreciated Edited October 9, 2017 by BillClinton update info Quote Link to comment
dmacias Posted October 9, 2017 Author Share Posted October 9, 2017 Try running from the command lineps aux | grep ups If something is still running run e.g. killall upsmon There's some differences between the nut packages. I think I need to add some more checks to stop the previous version. 2 Quote Link to comment
BillClinton Posted October 9, 2017 Share Posted October 9, 2017 Will try soon. AFK for about the next hour. Thanks for the quick reply. Sent from my iPhone using Tapatalk Quote Link to comment
dmacias Posted October 9, 2017 Author Share Posted October 9, 2017 (edited) 2 hours ago, BillClinton said: Will try soon. AFK for about the next hour. Thanks for the quick reply. Sent from my iPhone using Tapatalk Ok Im getting the same when I upgrade from previous to latest now. I'll fix shortly Edit: It's fixed now. It will copy all the old pids to the new /var/run/nut location. Edited October 9, 2017 by dmacias 1 Quote Link to comment
BillClinton Posted October 9, 2017 Share Posted October 9, 2017 latest update got it working. thanks so much. Quote Link to comment
dmacias Posted October 9, 2017 Author Share Posted October 9, 2017 latest update got it working. thanks so much.No problem. Quote Link to comment
themaxxz Posted October 9, 2017 Share Posted October 9, 2017 Hi, I iust updated to last version, but I had to first stop and manually kill the remaining 'upsmon' processes to get it working again. Regards, Quote Link to comment
dmacias Posted October 9, 2017 Author Share Posted October 9, 2017 Which latest and what wasn't working? 2017.10.8a should have fixed that problem. The rc.nut script will now killall upsd and upsmon processes if not gracefully shut down. But it should have been fixed by moving the pids to /var/run/nut. Quote Link to comment
themaxxz Posted October 10, 2017 Share Posted October 10, 2017 Hi, I had the problem after updating to 2017.10.08 I guess I missed the update check for 2017.10.8a. I just updated to 2017.10.09 which seems to work. But the update plugin was missing the 'done' button. Quote Link to comment
dmacias Posted October 10, 2017 Author Share Posted October 10, 2017 Ok thanks for the update. I have never figured the missing Done button. It happens on a few of my plugins that start and stop the plugin's services. But the missing button only happens if the service is enabled and started. It's like a process hangs but if you click the X everything has competed. So I don't know.I have tried setid /etc/rc.d.rc.script &. It works for my ipmi plugin but not for nut. Quote Link to comment
Squid Posted October 10, 2017 Share Posted October 10, 2017 I have never figured the missing Done button.AFAIK it happens if the install script exists or finished while it's running a php script. 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.