Squid Posted August 22, 2022 Share Posted August 22, 2022 PSA Since it *appears* that @dmacias is absent and development has stopped on all of his plugins, if in the future this plugin winds up having compatibility issues with the OS then it will be marked as deprecated / obsolete. There is nothing however at this time that I can tell that would dictate any user to stop using this plugin or for me to take that action (short of a very minor display aberration) Quote Link to comment
cantanga Posted August 25, 2022 Share Posted August 25, 2022 Thanks for the posts @k1netic I have been trying for a couple of weeks to figure out how to get the digitech UPS connected, your troubleshooting helped a lot. You haven't figured out how to get the system to do a clean shutdown have you? I'm finding that it's ignoring the no ups shutdown command and the delay doesn't work. As soon as the command is sent the UPS shuts off giving unraid a dirty shutdown Quote Link to comment
k1netic Posted August 27, 2022 Share Posted August 27, 2022 On 8/25/2022 at 10:54 PM, cantanga said: Thanks for the posts @k1netic I have been trying for a couple of weeks to figure out how to get the digitech UPS connected, your troubleshooting helped a lot. You haven't figured out how to get the system to do a clean shutdown have you? I'm finding that it's ignoring the no ups shutdown command and the delay doesn't work. As soon as the command is sent the UPS shuts off giving unraid a dirty shutdown Hey mate, Yeah I have a clean shutdown once the UPS switches to battery mode with notifications working. The settings langid_fix = 0x409 novendor noscanlangid are needed otherwise I get initial data but nothing after that. My problem is the opposite though. The UPS wont shutdown after the server, so the server never knows to turn back on once AC power is reapplied to the UPS. My settings ups.conf [ups] driver = nutdrv_qx port = auto subdriver = hunnox productid = 0000 vendorid = 0001 product = MEC0003 protocol = hunnox langid_fix = 0x409 novendor noscanlangid default.battery.voltage.high = 13.7 default.battery.voltage.low = 11 default.battery.voltage.nominal = 12.7 runtimecal = 480,100,1200,50 idleload = 15 ondelay = 360 offdelay = 300 upsd.conf LISTEN 127.0.0.1 upsd.users [admin] password=adminpass actions=set actions=fsd instcmds=all [monuser] password=monpass upsmon master [slaveuser] password=slavepass upsmon slave upsmon.conf MONITOR [email protected] 1 monuser monpass master SHUTDOWNCMD "/sbin/poweroff" POWERDOWNFLAG /etc/nut/no_killpower NOTIFYFLAG ONBATT SYSLOG+EXEC NOTIFYFLAG ONLINE SYSLOG+EXEC NOTIFYCMD "/usr/sbin/nut-notify" What have you done to get an immediate UPS shutdown? Quote Link to comment
k1netic Posted August 29, 2022 Share Posted August 29, 2022 I finally got it all working, i was getting permissions errors and the like trying to get upsdrvctl shutdown to work so.... I uploaded @IGHOR's file to my dropbox to create a direct download link i edited the nut.plg to point to the file on dropbox and installed the plugin pulling the modified .txz finally for my setup i needed user = root in global settings of ups.conf I can pull the power, the server notifies me, then after a specified time shuts down. Another specified time after that using offdelay = 180 ondelay = 0 in ups.conf and the ups shuts off too. Finally. That was painful. 1 Quote Link to comment
cantanga Posted September 2, 2022 Share Posted September 2, 2022 (edited) On 8/27/2022 at 11:33 AM, k1netic said: Hey mate, Yeah I have a clean shutdown once the UPS switches to battery mode with notifications working. The settings langid_fix = 0x409 novendor noscanlangid are needed otherwise I get initial data but nothing after that. My problem is the opposite though. The UPS wont shutdown after the server, so the server never knows to turn back on once AC power is reapplied to the UPS. ... What have you done to get an immediate UPS shutdown? No idea. Seems to be pretty much the exact same configuration as yours (except for some tweaking on the runtimecal) I am definitely above my head on this one, but hey I'm learning something, not sure what it is, but something. Can I ask what you mean by: i edited the nut.plg to point to the file on dropbox and installed the plugin pulling the modified .txz was it <!ENTITY gitURL you edited? or is it something different you changed in nut.plg to point to the modified .txz? Edited September 2, 2022 by cantanga Quote Link to comment
k1netic Posted September 3, 2022 Share Posted September 3, 2022 18 hours ago, cantanga said: No idea. Seems to be pretty much the exact same configuration as yours (except for some tweaking on the runtimecal) I am definitely above my head on this one, but hey I'm learning something, not sure what it is, but something. Can I ask what you mean by: i edited the nut.plg to point to the file on dropbox and installed the plugin pulling the modified .txz was it <!ENTITY gitURL you edited? or is it something different you changed in nut.plg to point to the modified .txz? i left the entity section alone as the other packages rely on those links, i only changed this section <!-- The 'nut-package' file. --> <FILE Name="&plgPATH;/nut-2.7.4.20200318-x86_64-1.txz" Min="6.8" Run="upgradepkg --install-new"> <URL>http://dl.dropboxusercontent.com/s/uw90m96dp6altt0/nut-2.7.4.20200318-x86_64-1.txz</URL> </FILE> you can try that url, no idea how dropbox works for things like this, ill leave it on my dropbox in case it works. Otherwise substitute that url for whatever you like. Ive been playing around with this plg file to see if i can get nut 2.8.0 to work on the RC unraid update, it will download and install, but get permission denied errors on the upsd/upsc/upsmon etc files and related folders. I can change the permissions and it will sort of work but a reboot reverts the changes i make. Anyone smarter than me? I dont know why i'm punishing myself when it works now... Quote Link to comment
cantanga Posted September 3, 2022 Share Posted September 3, 2022 10 hours ago, k1netic said: I dont know why i'm punishing myself when it works now... One of the great mysteries of life I guess, your work has helped me at least. Meanwhile I'm giving up. The dropbox plugin (either from my own or the one you put above) method hasn't seemed to help any, still can't get it to safe shutdown so I figure I'll set it to run for 30 minutes before it tries to shut down, battery will die well before that but if it's going to do it unsafely either way then may as well try to get it to ride out any outage as long as it can. At least I got monitoring going. Hopefully someone can get a 2.8.0 plugin (or docker maybe?) up and running for unraid. Quote Link to comment
k1netic Posted September 4, 2022 Share Posted September 4, 2022 16 hours ago, cantanga said: One of the great mysteries of life I guess, your work has helped me at least.... Have you tried override.ups.delay.shutdown = time in ups.conf ? offdelay might not be cutting it Quote Link to comment
cantanga Posted September 4, 2022 Share Posted September 4, 2022 18 hours ago, k1netic said: Have you tried override.ups.delay.shutdown = time in ups.conf ? offdelay might not be cutting it I had not. I had tried ups.delay.shutdown (or at least some variant I found in the nut documents) and nut wouldn't even start. Looks like override made the world of difference. I now have safe shutdown of unraid. Thanks. I haven't tried to see if the ups turns off and on again like it should but that is a future problem. Quote Link to comment
cassiusdrow Posted September 5, 2022 Share Posted September 5, 2022 (edited) On 9/2/2022 at 8:34 PM, k1netic said: Ive been playing around with this plg file to see if i can get nut 2.8.0 to work on the RC unraid update, it will download and install, but get permission denied errors on the upsd/upsc/upsmon etc files and related folders. I have 2.8.0 running on unraid 6.10.3. I am using an APC SMT1000RM2U with a AP9630 network management card. It uses the snmp-ups driver and it was failing with this error: /usr/libexec/nut/snmp-ups: error while loading shared libraries: libnetsnmp.so.35: cannot open shared object file: No such file or directory Driver failed to start (exit status=127) This post suggested installing net-snmp v5.8, but the file no longer exists. Instead I decided to try to get nut 2.8.0 to run. I downloaded these package files to the directory /pkg on the flash drive: https://ftp.sotirov-bg.net/pub/contrib/slackware/packages/slackware64-15.0/nut-2.8.0-x86_64-1gds.txz https://slackware.uk/slackware/slackware64-15.0/patches/packages/net-snmp-5.9.3-x86_64-1_slack15.0.txz Then added commands to the go script to install the packages and modify the NUT plugin to work with them: # Stop nut plugin /usr/local/emhttp/plugins/nut/scripts/stop # Install upgraded nut and net-snmp packages installpkg /boot/pkg/net-snmp-5.9.3-x86_64-1_slack15.0.txz installpkg /boot/pkg/nut-2.8.0-x86_64-1gds.txz # Link nut config to NUT plugin config rm -rf /etc/ups ln -s /etc/nut /etc/ups # Modify the NUT plugin to look for upsmon.pid in new location sed -i '[email protected]/var/run/nut/[email protected]/var/run/[email protected]' /usr/local/emhttp/plugins/nut/NUTsettings.page sed -i '[email protected]/var/run/nut/[email protected]/var/run/[email protected]' /usr/local/emhttp/plugins/nut/include/nut_config.php sed -i '[email protected]/var/run/nut/[email protected]/var/run/[email protected]' /usr/local/emhttp/plugins/nut/include/nut_footer.php sed -i '[email protected]/var/run/nut/[email protected]/var/run/[email protected]' /usr/local/emhttp/plugins/nut/include/nut_status.php # Start nut plugin /usr/local/emhttp/plugins/nut/scripts/start Nut 2.8.0 appears to be working with these changes. EDIT 2023-03-26: This post was originally written for dmacias's version 2023.02.14. It also works for SimonF's version 2023.02.14. SimonF suggested using the SNMP plugin to install net-snmp but I have not tried it. Edited March 26 by cassiusdrow Quote Link to comment
k1netic Posted September 6, 2022 Share Posted September 6, 2022 On 9/5/2022 at 8:37 AM, cantanga said: I had not. I had tried ups.delay.shutdown (or at least some variant I found in the nut documents) and nut wouldn't even start. Looks like override made the world of difference. I now have safe shutdown of unraid. Thanks. I haven't tried to see if the ups turns off and on again like it should but that is a future problem. To test that safely, plug the server directly to the wall, leave the UPS connected by USB, and in terminal issue the command upsdrvctl shutdown See if the UPS turns off after the time you specified in the override.ups.delay.shutdown If it doesn't or it gives an error try upsdrvctl -u root shutdown If that works you need to add user = root to the global settings of ups.conf which is above the area [upsname] where your ups specific settings are. On 9/5/2022 at 2:15 PM, cassiusdrow said: Nut 2.8.0 appears to be working with these changes. Well, thats all super helpful. I havent come across the sed command before, but if those edits work it may be possible to make the changes in the plugin.txz itself. Something to play with anyway. 1 Quote Link to comment
Donald-K Posted September 20, 2022 Share Posted September 20, 2022 (edited) This is my first question post. If there is anything rude or awkward, I think it's because I'm not from an English-speaking world, so please forgive me. I searched for "synology unraid nut", "unraid ups slave", etc, but couldn't find a way. Is there a way to set Synology as a UPS server and Unraid as a slave to make it work properly? Unraid IP address: 192.168.111.10 Synology IP address: 192.168.111.13 In addition, Synology and the UPS are connected via USB, and the Windows PC is working fine with WinNUT. Edited September 20, 2022 by Donald-K Quote Link to comment
autumnwalker Posted September 27, 2022 Share Posted September 27, 2022 Hi All. I've forked this plugin and web searched my way through getting NUT 2.8.0 and net-snmp 5.9.3 working. I AM NOT A DEVELOPER. USE THIS AT YOUR OWN RISK. I don't even know how to use Git efficiently. https://github.com/autumnwalker/NUT-unRAID If you want to install this - open Unraid, navigate to Plugins, click the "install plugin" tab and paste the following URL into the URL field (next to "install") button, then click "install". https://raw.githubusercontent.com/autumnwalker/NUT-unRAID/master/plugin/nut.plg If this works for you then I'm glad. If it doesn't work I probably cannot help you. It took me all day to get this working based on what I was reading in the thread here and cobbling things through google-fu. If anyone wants to take this and "make it right" or validate what I have done please feel free to provide feedback. I'm sure there are better or more efficient ways to do what I've done with the code. 2 Quote Link to comment
BeardElk Posted October 8, 2022 Share Posted October 8, 2022 On 9/27/2022 at 9:10 PM, autumnwalker said: Hi All. I've forked this plugin and web searched my way through getting NUT 2.8.0 and net-snmp 5.9.3 working. I AM NOT A DEVELOPER. USE THIS AT YOUR OWN RISK. I don't even know how to use Git efficiently. https://github.com/autumnwalker/NUT-unRAID If you want to install this - open Unraid, navigate to Plugins, click the "install plugin" tab and paste the following URL into the URL field (next to "install") button, then click "install". https://raw.githubusercontent.com/autumnwalker/NUT-unRAID/master/plugin/nut.plg If this works for you then I'm glad. If it doesn't work I probably cannot help you. It took me all day to get this working based on what I was reading in the thread here and cobbling things through google-fu. If anyone wants to take this and "make it right" or validate what I have done please feel free to provide feedback. I'm sure there are better or more efficient ways to do what I've done with the code. I tried this just for the heck of it, and it broke the NUT plugin to the point I had to uninstall both your plugin and @dmacias original plugin, then reinstall the "old og plugin" to get it working again. Anyway, I've got an annoying problem. Sometimes, only sometimes, when I reboot my server, the NUT plugin freaks the f-out and thinks the ups is on battery with 0% left, and instantly orders a safe shutdown of the system. This has been ongoing since day one, but it happens so scarcely, that it's more of an annoyance then a problem. If anyone has a any idea on how to fix it, I'll happily try it! Quote Link to comment
autumnwalker Posted October 11, 2022 Share Posted October 11, 2022 On 10/8/2022 at 10:35 AM, BeardElk said: I tried this just for the heck of it, and it broke the NUT plugin to the point I had to uninstall both your plugin and @dmacias original plugin, then reinstall the "old og plugin" to get it working again. You probably should remove the @dmacias plugin before installing my version of it. I'm sure there will be wild conflicts otherwise. Quote Link to comment
JudasD Posted October 29, 2022 Share Posted October 29, 2022 Is anyone running NUT with 6.11.1? Upon reboot, my NUT config files return to default. Thanks, JD Quote Link to comment
ELP1 Posted October 30, 2022 Share Posted October 30, 2022 (edited) Hello, I am using NUT with 6.11.1 however I do not experience any issues with configuration as you mentioned. But what I see (I do not know how it worked before)... There is no realtime update of UPS status in Unraid dashboard. Whole page has to be refreshed to see latest percentage of battery / status. Is this standard behavior? I started to use this plugin only 1 day ago so it is hard for me to judge if it is normal or not. Edited October 30, 2022 by ELP1 Quote Link to comment
JudasD Posted November 2, 2022 Share Posted November 2, 2022 On 10/30/2022 at 3:34 AM, ELP1 said: Hello, I am using NUT with 6.11.1 however I do not experience any issues with configuration as you mentioned. But what I see (I do not know how it worked before)... There is no realtime update of UPS status in Unraid dashboard. Whole page has to be refreshed to see latest percentage of battery / status. Is this standard behavior? I started to use this plugin only 1 day ago so it is hard for me to judge if it is normal or not. I also see the static display on the dashboard that will only update when the page is refreshed. Have you made any changes to the config files in your NUT setup? The unraid NUT settings page retains the settings. It is the NUT config files that get defaulted. Quote Link to comment
ELP1 Posted November 14, 2022 Share Posted November 14, 2022 On 11/2/2022 at 11:08 PM, JudasD said: I also see the static display on the dashboard that will only update when the page is refreshed. Have you made any changes to the config files in your NUT setup? The unraid NUT settings page retains the settings. It is the NUT config files that get defaulted. No, I have not made any changes, just installed. Quote Link to comment
BeardElk Posted December 3, 2022 Share Posted December 3, 2022 Does anyone know how to change the IP address of the nut plugin when running as a netserver? I'm trying to connect my synology nas to it, but it wont accept 127.0.0.1 as an ip Quote Link to comment
cassiusdrow Posted December 3, 2022 Share Posted December 3, 2022 1 hour ago, BeardElk said: Does anyone know how to change the IP address of the nut plugin when running as a netserver? I'm trying to connect my synology nas to it, but it wont accept 127.0.0.1 as an ip The "netclient" machines must use the IP address of the "netserver" machine, not 127.0.0.1. Quote Link to comment
BeardElk Posted December 8, 2022 Share Posted December 8, 2022 (edited) On 12/3/2022 at 8:15 PM, cassiusdrow said: The "netclient" machines must use the IP address of the "netserver" machine, not 127.0.0.1. Yeah but if I input the correct address it cant connect, bc the netserver is setup with 127.0.0.1 and is greyed out so I cant change it. Edit: Got it working! Followed this and pieced it together! Edited December 9, 2022 by BeardElk Quote Link to comment
bigsub Posted December 12, 2022 Share Posted December 12, 2022 Hello everyone, I use to use a remote unraid nas server only when I need, and not 24/7. That nas is under a tecnoware ups and I use NUT. I don't want electric energy consumption when the unraid server is off, but (obvsiously) the ups take some energy to charge batteries. Is there a way to shutdown the ups via command line, as occurs in case of low battery? So then I can put off the smart plug at which ups is connected. Quote Link to comment
cassiusdrow Posted December 12, 2022 Share Posted December 12, 2022 6 hours ago, bigsub said: Hello everyone, I use to use a remote unraid nas server only when I need, and not 24/7. That nas is under a tecnoware ups and I use NUT. I don't want electric energy consumption when the unraid server is off, but (obvsiously) the ups take some energy to charge batteries. Is there a way to shutdown the ups via command line, as occurs in case of low battery? So then I can put off the smart plug at which ups is connected. In this page, the author uses this command to trigger a UPS shutdown in the section "Testing with actual results": upsmon -c fsd It appears to activate the actual shutdown process that nut will use during a real low power event. 1 Quote Link to comment
warp760 Posted December 26, 2022 Share Posted December 26, 2022 Powerwalker VI 1000 RT doesnt works According to the compatibility list, blazer_usb should be used. Then there is no data / connection at all. If I go to autodetect (unraid server), comes usbhid_ups and also data. However, I get a rhythm every 5 minutes that the UPS has failed. If I switch off the power, the message only comes up after 5 minutes. 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.