PeterB

APCUPSD plugin adapted for v6, 64 bit!

98 posts in this topic

There is a change in php in unRAID that is causing this problem.

 

Is there a workaround that anyone have found to fix the issue?

 

I know that there are problems, but I've not spent any time on this because we're waiting for Tom to upload his own version of apcupsd 'pretty soon'.

0

Share this post


Link to post
Share on other sites

I know that there are problems, but I've not spent any time on this because we're waiting for Tom to upload his own version of apcupsd 'pretty soon'.

 

Agreed.

0

Share this post


Link to post
Share on other sites

Well, based on past experience, pretty soon for Tom can mean several months, just saying :-)

0

Share this post


Link to post
Share on other sites

There is a change in php in unRAID that is causing this problem.

 

Is there a workaround that anyone have found to fix the issue?

You could try this one https://raw.githubusercontent.com/dmacias72/unRAID_6.0/master/apcupsd_64.plg

I added everyone's fixes, hoxbox382's build and added a display of the ups current load in watts. I was able to switch settings. 

0

Share this post


Link to post
Share on other sites

I have just installed this under UnRaid V6b4 by entering the plg website into the Install Extension box. It installed and works OK and a new UPS icon shows up under the Settings menu.

 

However if you then click on the Plugins tab after entering the Extensions tab, only Tom's plugins are listed. As such it looks like that you won't be able to check for updates in the future?

 

0

Share this post


Link to post
Share on other sites

That section might just be for unRAID supported / baked in plugins. Have to wait and see how tom plans to use that section

0

Share this post


Link to post
Share on other sites

Lets hope that Tom comes back to us soon, but it is good to know that my server is now protected by my UPS whilst running V6

 

Thanks to dmacias for providing the plugin

0

Share this post


Link to post
Share on other sites

Lets hope that Tom comes back to us soon, but it is good to know that my server is now protected by my UPS whilst running V6

 

Thanks to dmacias for providing the plugin

No problem, but I didn't see the need to invest much time if there's gonna be an official plugin, plus there has been no direction yet as to the use of the extension page.  The main thing I added was the ability to view the power usage of your system (everything on ups protected side) from the settings page as long as your ups shows a nompower variable.  If it doesnt you can change this line to a static nompower variable if you know that for your ups

$nompowerint = preg_replace('/[^0-9\.]/', '', $nompower);

to

$nompowerint = 500;

or whatever the value is.

 

0

Share this post


Link to post
Share on other sites

There is a change in php in unRAID that is causing this problem.

 

Is there a workaround that anyone have found to fix the issue?

You could try this one https://raw.githubusercontent.com/dmacias72/unRAID_6.0/master/apcupsd_64.plg

I added everyone's fixes, hoxbox382's build and added a display of the ups current load in watts. I was able to switch settings.

 

Thanks for this.  I just installed it and rebooted.  I can make changes and they stick, but I'm getting this on the status page...

 

UPS: Lost Communication

 

I've just checked and the USB is connected correctly.  I'm not sure why it can't seem to communicate, but thought I should report it.

0

Share this post


Link to post
Share on other sites

Did it work initially before you changed settings or rebooted?  Also you might try checking your apcupsd.cfg and verify the settings were saved correctly or delete the apcupsd folder and start over. Also maybe try a different port and your not passing any usb ports to vms.

0

Share this post


Link to post
Share on other sites

it showed offline before I started it, but once started, it's always showed Lost Communications.

 

I had previously installed a different version (Apcupsd-3.14.10-x86_64_3pb.plg), but it wouldn't accept realtime input/changes, so more research led me to your version.

 

I just deleted the apcupsd folder (and the powerdown folder), then reinstalled the plugin, but no change.  I'm rebooting unRAID now.

 

no change.  it recreated the powerdown folder, but still shows Lost Communications.  I'll change the USB port and see if that helps.

0

Share this post


Link to post
Share on other sites

You could try replacing the package in the plugin with 3.14.10 instead of 3.14.12

Edit

Replace this

 <FILE Name="/boot/packages/apcupsd-3.14.12-x86_64-4_SBo.tgz" Run="upgradepkg --install-new">
<URL>https://dl.dropboxusercontent.com/u/35005524/apcupsd-3.14.12-x86_64-4_SBo.tgz</URL>
</FILE>

with this

 <FILE Name="/boot/packages/apcupsd-3.14.10-x86_64-1_rlw.txz" Run="upgradepkg --install-new">
<URL>http://rlworkman.net/pkgs/14.1/x86_64/apcupsd-3.14.10-x86_64-1_rlw.txz</URL>
<MD5>7a30888a2706575d641fccf013994db0</MD5>
</FILE> 

 

0

Share this post


Link to post
Share on other sites
I'm getting this on the status page...

 

UPS: Lost Communication

 

Are you running any VMs?

 

When I had one cpu pinned to Dom0 (Xen), I found that I was getting intermittent spells of lost communications.  Then I started running cache_dirs and found that apcupsd spent most of its time reporting lost communication with intermittent spells of good connection.

 

Since I pinned a second cpu to Dom0, I've not seen any lost communications reported.

0

Share this post


Link to post
Share on other sites

I'm getting this on the status page...

 

UPS: Lost Communication

 

Are you running any VMs?

 

When I had one cpu pinned to Dom0 (Xen), I found that I was getting intermittent spells of lost communications.  Then I started running cache_dirs and found that apcupsd spent most of its time reporting lost communication with intermittent spells of good connection.

 

Since I pinned a second cpu to Dom0, I've not seen any lost communications reported.

 

Nope no VM's running now.  I have also not pinned any cpu's to Dom0.  i do have some things excluded from unRAID to try to pass them thru to my Windows VM, but that project is dead for now, so I'll remove the lines from syslinux.cfg then reboot.  if that doesn't work, I'll try to change the apcupsd version mentioned earlier.

0

Share this post


Link to post
Share on other sites

I have an SMT3000i which was working fine using Powerchute under Win 8, with a serial connection.

 

I've transferred it to UnRaid 6 beta, onto COM1 on the motherboard, and APCUPSD doesn't see it - I get Comm Lost.

 

My settings are /dev/ttyS0, Custom cable 940-0625A, modbus.

 

I also have a usb -> 2 serial port device which I've passed through to another vm.

 

The board is a Supermicro X10SL7-F

 

I have upgraded the UPS firmware, but I now think it doesn't support any of the apcupsd protocols? Is there any way of checking?

 

I guess the only way of getting this to work is to pass through the serial port to a windows vm, and run Powerchute.

 

root@Tower:/dev# dmesg | grep tty
00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
usb 3-4: FTDI USB Serial Device converter now attached to ttyUSB0
usb 3-9.2: pl2303 converter now attached to ttyUSB1
usb 3-9.4: pl2303 converter now attached to ttyUSB2
pl2303 ttyUSB2: pl2303 converter now disconnected from ttyUSB2
ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0

0

Share this post


Link to post
Share on other sites

I've just tried using USB and APCUPSD picks up the UPS. Any ideas whether the serial cable should also work? Is there likely to be a problem with the motherboard serial port?

 

cheers,

0

Share this post


Link to post
Share on other sites

I've just tried using USB and APCUPSD picks up the UPS. Any ideas whether the serial cable should also work? Is there likely to be a problem with the motherboard serial port?

 

cheers,

 

It is so unusual that anyone uses the serial port these day, that I am not surprised that you are having problems.

 

First thing to do is to check to make sure that it is turned on the BIOS.  And determine what interrupt it is using.  (That was always an issue with the Comm ports.  With so few interrupts in the early computers, getting the interrupts assigned to the required input/output cards without a conflict!)

 

Second thing is that I understand the the USB-to-Serial adapters don't work with every application.  So beware if you are trying to connect through one.

 

It has been a long time since I have used a serial port but I seem to recall that you had to set the baud rate manually (in many cases) to match the device you were going to connect it to.  I see that the one that ttyS0 is connecting at 115200 using irq 4.  Is that the baud rate of the UPS? 

 

If it works using USB, why are you worried about getting the serial port to work?

 

0

Share this post


Link to post
Share on other sites

Hi Frank, thanks for the reply.

 

The UPS is a 15m cable run from the server, and is also connected via a usb hub and an active usb cable, so plenty of things to go wrong! I also don't have that many USB sockets.

 

But it works so I'll leave it as USB.

 

I'll check out the serial baud rate - thanks for the pointer.

0

Share this post


Link to post
Share on other sites

I am using an APC Back UPS model that has a USB port and gets recognized by the UPS settings in unraid settings just fine. In UPS settings, I have chosen the UPS cable and UPS type both as USB. I am not sure if mine qualifies as a smart UPS or any other type. Should I continue using that and are my chosen settings correct, or do I need to move to this plugin. I am using unraid v6 stable.

 

0

Share this post


Link to post
Share on other sites

I am using an APC Back UPS model that has a USB port and gets recognized by the UPS settings in unraid settings just fine. In UPS settings, I have chosen the UPS cable and UPS type both as USB. I am not sure if mine qualifies as a smart UPS or any other type. Should I continue using that and are my chosen settings correct, or do I need to move to this plugin. I am using unraid v6 stable.

This plugin should be considered deprecated since this functionality is built-in now.
0

Share this post


Link to post
Share on other sites

One of the features that I've use APCUPSD with before, on a Windows system, was to share a UPS between computers, with one being the master and the secondary receiving the shutdown command from the primary.  Is this possible with the now built in UPS control?

0

Share this post


Link to post
Share on other sites

One of the features that I've use APCUPSD with before, on a Windows system, was to share a UPS between computers, with one being the master and the secondary receiving the shutdown command from the primary.  Is this possible with the now built in UPS control?

Many of us are doing this. Here is a good link

 

*edit* Just wanted to add that the plugin in this thread isn't needed anymore and shouldn't be used as I mentioned in the post just above yours.

0

Share this post


Link to post
Share on other sites

Thanks, I saw it was deprecated, but didn't know where else to ask

0

Share this post


Link to post
Share on other sites

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.