Gnomuz Posted October 21, 2020 Share Posted October 21, 2020 (edited) Hi all, I'd like to report an issue I have with my brand new APC UPS SMC1000IC (tower model) on my DIY Unraid server (6.9.0 beta 30). I first updated the UPS to the latest firmware (v 04.1) and enabled ModBus communication protocol via the LCD display (it is disabled by default, even though the operation manual states the contrary, so beware ...) After setting up apcupsd accordingly (UPS cable USB, UPS type ModBus), I plugged the UPS in the server (USB-A to USB-A), and all information were properly populated, especially the nominal power and load percent. So far, it was plug and play, what a good surprise after the various posts I had read in this forum ! But, there's a but, as you may have guessed ... After a reboot, all info were wrong, except for "runtime left" : a fully charged battery was reported as 6% charged, no nominal power nor load percent, and many other tags were absent or totally out of range, including an output voltage of 400+ volts ! After many attempts stopping and starting the daemon, with the UPS plugged or unplugged, I finally reached a stable behaviour : - when the server boots with the UPS plugged in, the daemon gets fanciful information, and the workaround is to unplug the UPS, restart the daemon, plug the UPS back, and everything is back to normal - when the server boots with the UPS unplugged, and I plug it after the boot process is over, communication with the UPS is established, and all information are correct at first sight So, I highly suspect the apcupsd dameon establishes the communication "a bit" too early, at a stage where the USB "stack" on my server is not totally ready (sorry for the improper words, I'm not an Unraid/Linux expert...). To try and sort it out, I thought that delaying the launch of the apcupsd plugin / daemon might be a solution, but I didn't find any setting or thread on this forum to do so. Thanks in advance for your thoughts and help on this issue. Edited October 27, 2020 by Gnomuz Quote Link to comment
Gnomuz Posted October 27, 2020 Author Share Posted October 27, 2020 Sorry to up, but no one to give a clue on how to setup a delay in the apcupsd daemon startup at boot ? Thx in advance Quote Link to comment
JonathanM Posted October 27, 2020 Share Posted October 27, 2020 Try using the NUT plugin instead? Quote Link to comment
Gnomuz Posted October 27, 2020 Author Share Posted October 27, 2020 (edited) 2 hours ago, jonathanm said: Try using the NUT plugin instead? Thanks for the suggestion, but as far as I understand NUT does not support the ModBus protocol. The point is my UPS reports very little information in basic USB mode (just battery charge level and runtime left, no load percent, no nominal power, no voltages, ...). I've already tested with both apcupsd and NUT and get the same limited set of info. I agree these info (batt level and runtime left) are sufficient to manage a smooth shutdown in case of power outage, so I could run apcupsd with UPS type set to "USB" instead of "ModBus" (or NUT, which would be the same), as I have no issue at boot with this setup. But I also want to feed various UPS data to my dashboard (custom UUD 1.4 currently) through telegraf, so I don't see any other solution than apcupsd running with UPS type set to "ModBus" to capture what I want in the dashboard. Remember that after a reboot, if the UPS USB is plugged after "a while" everything runs smoothly until ... next reboot. That's why I suspect that the daemon starts too early, at a moment when the communication between the UPS and the USB "stack" is not properly established or "unstable". But my poor Linux / Unraid skills don't go further than this vague hypothesis 😞 Thus my request to find a way to delay the start of apcupsd during the boot phase by 30 seconds for instance just to check this intuition ! I hope that clarifies my initial post and experts will take time to have a quick look at it. Edited October 27, 2020 by Gnomuz rewording Quote Link to comment
tamet83 Posted May 28, 2023 Share Posted May 28, 2023 Hi please have a look here 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.