APCUPSD Plugin discussion

Posted on
Wed Sep 16, 2015 8:09 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: APCUPSD Plugin discussion

DomoPat asked wrote:
...I saw your post about changing "#!/bin/sh" but I could not find the events file you are mentioning...
On OS-X the default directory for acupsd files is /etc/apcupsd

On my system I created one generic file with links for each event name:
    changeme
    commfailure
    commok
    doreboot
    doshutdown
    emergency
    endselftest
    failing
    killpower
    loadlimit
    mainsback
    offbattery
    onbattery
    powerout
    remotedown
    runlimit
    startselftest
    timeout
That is much easier to maintain. Of course, if you want something different for some specific event, you will need to wrap it if if... ...fi, or create a unique file for that event.

DomoPat wrote:
. 2- I searched extensively all around internet on how to have the Mac restart after it has been shutdown by the UPS. Evidently it will not restart because it was turned off 'clean' so it looks like the only solution is to instruct the Mac to do a 'shutdown -hu' in the power down sequence. In the Acuspsd documentation it is not clear (for me !) where to include these instructions, and it could be related to my first point on where these scripts are located.
I think the file you want is /usr/libexec/upsshutdown

Posted on
Sun Oct 25, 2015 10:24 am
automaton offline
Posts: 88
Joined: May 23, 2008

Re: APCUPSD Plugin discussion

APCUPSD was disabled when I installed El Capitan (looks like the startup item was removed) , and the latest APCUPSD installer warns that it is not compatible and may damage the system. Has anyone had any successful experience installing APCUPSD on El Capitan?

Posted on
Mon Nov 02, 2015 11:04 am
jeffgtx offline
Posts: 43
Joined: Aug 19, 2007

Re: APCUPSD Plugin discussion

Hi. is there any way to decrease the update frequency under a minute. we get a lot of 10-20 second outages and i need to have a action group to turn some things off when the owed s restored, but i am not sure the device state will change from online to onbatt in that span of time if it only updates every minute?

if there is an alternate way to use it as a trigger, that's be great.

Thanks,
Jeff

Posted on
Fri Jun 17, 2016 1:41 pm
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: APCUPSD Plugin discussion

There is a new version out that support El capitan
Released 7.june 2016 Works great.
But i get errors with the plugin

apcupsd Plugin started. Polling apcupsd server(s) every 5.0 minutes with a timeout of 8 seconds
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 1 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 2 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 3 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 4 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 5 of 5
apcupsd Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 191, in runConcurrentThread
File "plugin.py", line 297, in readApcupsd
<type 'exceptions.TypeError'>: not enough arguments for format string

apcupsd Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Maybe it needs a update?

regards
Asconasny

Posted on
Fri Jun 17, 2016 5:12 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

Getting the same issue after upgrade, with this debug log:

Code: Select all
  apcupsd                         runConcurrentThread called
  apcupsd                         Plugin started. Polling apcupsd server(s) every 2.0 minutes with a timeout of 20 seconds
  apcupsd                         runConcurrentThread: Got device Server - Rack UPS 1 from Indigo
  apcupsd                         readApcupsd called
  apcupsd                         readApcupsd: Received device:address :
batteryLevel : None
buttonGroupCount : 0
configured : True
description : APC UPS 1500vac
deviceTypeId : apcupsdServer
displayStateId : linev
displayStateImageSel : None
displayStateValRaw : 247.6
displayStateValUi : 247.6
enabled : True
energyAccumBaseTime : None
energyAccumTimeDelta : None
energyAccumTotal : None
energyCurLevel : None
errorState :
folderId : 1862834123
globalProps : MetaProps : (dict)
     com.berkinet.apcupsd : (dict)
          apcupsdAddress : 192.168.1.77 (string)
          apcupsdAddressType : specify (string)
          apcupsdDevceStateDisplay : linev (string)
          apcupsdPort : 3551 (string)
          apcupsdStateAPC : true (bool)
          apcupsdStateBATTDATE : true (bool)
          apcupsdStateBATTV : true (bool)
          apcupsdStateBCHARGE : true (bool)
          apcupsdStateCABLE : true (bool)
          apcupsdStateCUMONBATT : true (bool)
          apcupsdStateDATE : true (bool)
          apcupsdStateDRIVER : true (bool)
          apcupsdStateDSHUTD : true (bool)
          apcupsdStateDWAKE : true (bool)
          apcupsdStateEXTBATTS : true (bool)
          apcupsdStateFIRMWARE : true (bool)
          apcupsdStateHITRANS : true (bool)
          apcupsdStateHOSTNAME : true (bool)
          apcupsdStateHUMIDITY : true (bool)
          apcupsdStateITEMP : true (bool)
          apcupsdStateLASTXFER : true (bool)
          apcupsdStateLINEFAIL : true (bool)
          apcupsdStateLINEFREQ : true (bool)
          apcupsdStateLINEV : true (bool)
          apcupsdStateLOADPCT : true (bool)
          apcupsdStateLOTRANS : true (bool)
          apcupsdStateMANDATE : true (bool)
          apcupsdStateMAXLINEV : true (bool)
          apcupsdStateMAXTIME : true (bool)
          apcupsdStateMBATTCHG : true (bool)
          apcupsdStateMINLINEV : true (bool)
          apcupsdStateMINTIMEL : true (bool)
          apcupsdStateMODEL : true (bool)
          apcupsdStateNOMBATTV : true (bool)
          apcupsdStateNOMINV : true (bool)
          apcupsdStateNOMOUTV : true (bool)
          apcupsdStateNOMPOWER : true (bool)
          apcupsdStateNUMXFERS : true (bool)
          apcupsdStateOUTPUTV : true (bool)
          apcupsdStateRETPCT : true (bool)
          apcupsdStateSELFTEST : true (bool)
          apcupsdStateSENSE : true (bool)
          apcupsdStateSERIALNO : true (bool)
          apcupsdStateSTARTTIME : true (bool)
          apcupsdStateSTATFLAG : true (bool)
          apcupsdStateSTESTI : true (bool)
          apcupsdStateTIMELEFT : true (bool)
          apcupsdStateTONBATT : true (bool)
          apcupsdStateUPSMODE : true (bool)
          apcupsdStateUPSNAME : true (bool)
          apcupsdStateVERSION : true (bool)
          apcupsdStateXOFFBATT : true (bool)
          apcupsdStateXONBATT : true (bool)
          apcupsdstatealarmdel : true (bool)
id : 407948593
lastChanged : 2015-09-30 23:28:53
model : apcupsd UPS
name : Server - Rack UPS 1
ownerProps : com.berkinet.apcupsd : (dict)
     apcupsdAddress : 192.168.1.77 (string)
     apcupsdAddressType : specify (string)
     apcupsdDevceStateDisplay : linev (string)
     apcupsdPort : 3551 (string)
     apcupsdStateAPC : true (bool)
     apcupsdStateBATTDATE : true (bool)
     apcupsdStateBATTV : true (bool)
     apcupsdStateBCHARGE : true (bool)
     apcupsdStateCABLE : true (bool)
     apcupsdStateCUMONBATT : true (bool)
     apcupsdStateDATE : true (bool)
     apcupsdStateDRIVER : true (bool)
     apcupsdStateDSHUTD : true (bool)
     apcupsdStateDWAKE : true (bool)
     apcupsdStateEXTBATTS : true (bool)
     apcupsdStateFIRMWARE : true (bool)
     apcupsdStateHITRANS : true (bool)
     apcupsdStateHOSTNAME : true (bool)
     apcupsdStateHUMIDITY : true (bool)
     apcupsdStateITEMP : true (bool)
     apcupsdStateLASTXFER : true (bool)
     apcupsdStateLINEFAIL : true (bool)
     apcupsdStateLINEFREQ : true (bool)
     apcupsdStateLINEV : true (bool)
     apcupsdStateLOADPCT : true (bool)
     apcupsdStateLOTRANS : true (bool)
     apcupsdStateMANDATE : true (bool)
     apcupsdStateMAXLINEV : true (bool)
     apcupsdStateMAXTIME : true (bool)
     apcupsdStateMBATTCHG : true (bool)
     apcupsdStateMINLINEV : true (bool)
     apcupsdStateMINTIMEL : true (bool)
     apcupsdStateMODEL : true (bool)
     apcupsdStateNOMBATTV : true (bool)
     apcupsdStateNOMINV : true (bool)
     apcupsdStateNOMOUTV : true (bool)
     apcupsdStateNOMPOWER : true (bool)
     apcupsdStateNUMXFERS : true (bool)
     apcupsdStateOUTPUTV : true (bool)
     apcupsdStateRETPCT : true (bool)
     apcupsdStateSELFTEST : true (bool)
     apcupsdStateSENSE : true (bool)
     apcupsdStateSERIALNO : true (bool)
     apcupsdStateSTARTTIME : true (bool)
     apcupsdStateSTATFLAG : true (bool)
     apcupsdStateSTESTI : true (bool)
     apcupsdStateTIMELEFT : true (bool)
     apcupsdStateTONBATT : true (bool)
     apcupsdStateUPSMODE : true (bool)
     apcupsdStateUPSNAME : true (bool)
     apcupsdStateVERSION : true (bool)
     apcupsdStateXOFFBATT : true (bool)
     apcupsdStateXONBATT : true (bool)
     apcupsdstatealarmdel : true (bool)
pluginId : com.berkinet.apcupsd
pluginProps : com.berkinet.apcupsd : (dict)
     apcupsdAddress : 192.168.1.77 (string)
     apcupsdAddressType : specify (string)
     apcupsdDevceStateDisplay : linev (string)
     apcupsdPort : 3551 (string)
     apcupsdStateAPC : true (bool)
     apcupsdStateBATTDATE : true (bool)
     apcupsdStateBATTV : true (bool)
     apcupsdStateBCHARGE : true (bool)
     apcupsdStateCABLE : true (bool)
     apcupsdStateCUMONBATT : true (bool)
     apcupsdStateDATE : true (bool)
     apcupsdStateDRIVER : true (bool)
     apcupsdStateDSHUTD : true (bool)
     apcupsdStateDWAKE : true (bool)
     apcupsdStateEXTBATTS : true (bool)
     apcupsdStateFIRMWARE : true (bool)
     apcupsdStateHITRANS : true (bool)
     apcupsdStateHOSTNAME : true (bool)
     apcupsdStateHUMIDITY : true (bool)
     apcupsdStateITEMP : true (bool)
     apcupsdStateLASTXFER : true (bool)
     apcupsdStateLINEFAIL : true (bool)
     apcupsdStateLINEFREQ : true (bool)
     apcupsdStateLINEV : true (bool)
     apcupsdStateLOADPCT : true (bool)
     apcupsdStateLOTRANS : true (bool)
     apcupsdStateMANDATE : true (bool)
     apcupsdStateMAXLINEV : true (bool)
     apcupsdStateMAXTIME : true (bool)
     apcupsdStateMBATTCHG : true (bool)
     apcupsdStateMINLINEV : true (bool)
     apcupsdStateMINTIMEL : true (bool)
     apcupsdStateMODEL : true (bool)
     apcupsdStateNOMBATTV : true (bool)
     apcupsdStateNOMINV : true (bool)
     apcupsdStateNOMOUTV : true (bool)
     apcupsdStateNOMPOWER : true (bool)
     apcupsdStateNUMXFERS : true (bool)
     apcupsdStateOUTPUTV : true (bool)
     apcupsdStateRETPCT : true (bool)
     apcupsdStateSELFTEST : true (bool)
     apcupsdStateSENSE : true (bool)
     apcupsdStateSERIALNO : true (bool)
     apcupsdStateSTARTTIME : true (bool)
     apcupsdStateSTATFLAG : true (bool)
     apcupsdStateSTESTI : true (bool)
     apcupsdStateTIMELEFT : true (bool)
     apcupsdStateTONBATT : true (bool)
     apcupsdStateUPSMODE : true (bool)
     apcupsdStateUPSNAME : true (bool)
     apcupsdStateVERSION : true (bool)
     apcupsdStateXOFFBATT : true (bool)
     apcupsdStateXONBATT : true (bool)
     apcupsdstatealarmdel : true (bool)
protocol : Plugin
remoteDisplay : True
states : States : (dict)
     apc : 001,043,1044 (string)
     battdate : 2008-04-26 (string)
     battv : 27.7 (string)
     bcharge : 100.0 (string)
     cable : USB (string)
     cumonbatt : 0 (string)
     date : 2015-09-30 (string)
     driver : USB (string)
     dshutd : 90 (string)
     dwake : -1 (string)
     extbatts : n/a (string)
     firmware : 617.3.I (string)
     hitrans : 253.0 (string)
     hostname : accent.durosity.net (string)
     humidity : n/a (string)
     itemp : 18.0 (string)
     lastxfer : Automatic (string)
     linefail : n/a (string)
     linefreq : 50.2 (string)
     linev : 247.6 (string)
     loadpct : 11.7 (string)
     lotrans : 208.0 (string)
     mandate : 2008-04-26 (string)
     maxlinev : n/a (string)
     maxtime : 0 (string)
     mbattchg : 5 (string)
     minlinev : n/a (string)
     mintimel : 3 (string)
     model : Smart-UPS (string)
     nombattv : 24.0 (string)
     nominv : n/a (string)
     nomoutv : 230 (string)
     nompower : n/a (string)
     numxfers : 0 (string)
     outputv : 247.6 (string)
     retpct : 0.0 (string)
     selftest : NO (string)
     sense : High (string)
     serialno : AS0817332616 (string)
     starttime : 2015-09-28 (string)
     statflag : 0x05000008 (string)
     status : ONLINE (string)
     stesti : 14 (string)
     timeleft : 95.0 (string)
     tonbatt : 0 (string)
     upsmode : Stand (string)
     upsname : accent.durosity.net (string)
     version : 3.14.13 (string)
     xoffbatt : N/A (string)
     xonbatt : 2015-09-26 (string)
subModel :
supportsAllLightsOnOff : False
supportsAllOff : False
supportsStatusRequest : False
version : 0
  apcupsd                         readApcupsd: starting read. Retries=0
  apcupsd Error                   readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 1 of 5
  apcupsd                         readApcupsd: starting read. Retries=1
  apcupsd Error                   readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 2 of 5
  apcupsd                         readApcupsd: starting read. Retries=2
  apcupsd Error                   readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 3 of 5
  apcupsd                         readApcupsd: starting read. Retries=3
  apcupsd Error                   readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 4 of 5
  apcupsd                         readApcupsd: starting read. Retries=4
  apcupsd Error                   readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 5 of 5
  apcupsd Error                   Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 191, in runConcurrentThread
  File "plugin.py", line 297, in readApcupsd
<type 'exceptions.TypeError'>: not enough arguments for format string

  apcupsd Error                   plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


As with last time if you’d like to test it on a live system you’re more than welcome to connect to mine using team-viewer. I also *finally* have a replacement network card available for my 2nd UPS if you’d ever like to test with that like we originally planned about 3 years ago! :shock:

Computer says no.

Posted on
Fri Jun 24, 2016 6:21 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: APCUPSD Plugin discussion

for the situation that the ups shuts down the mac gracefully and the power comes back and the mac does not restart:

run a script every 30 minutes that sets a power on event in one hour from now, eg it is 7 am in the morning the script would issue a command
echo yourpasswordhere | sudo -S pmset repeat wakeorpoweron MTWRFSU 08:00:00
and at 7:30
echo yourpasswordhere | sudo -S pmset repeat wakeorpoweron MTWRFSU 08:30:00

this would guarantee that your mac wakes up while you are not home , but only if the power comes back within the hour, otherwise it would wait 24 hours, but at least It would wake up.


Karl

you could put this into an action and run it every 30 minutes::
Code: Select all
import datetime, time, subprocess
nextTimeString = datetime.datetime.fromtimestamp(time.time() +3600).strftime("%H:%M:%S")
cmd= "echo YOURPASSWORDHERE  | sudo -S /usr/bin/pmset repeat wakeorpoweron MTWRFSU "+ nextTimeString
#indigo.server.log(cmd)
ret= subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()
#indigo.server.log(str(ret))
ret= subprocess.Popen("pmset -g sched", stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True).communicate()
indigo.server.log((ret[0] +"  " +ret[1]).replace("\n",""))


Posted on
Thu Jun 30, 2016 12:48 am
yassi offline
Posts: 468
Joined: Sep 06, 2015
Location: Germany

Re: APCUPSD Plugin discussion

I have the same errors, using the latest plugin and the latest apcupsd package.
Attachments
APC Plugin 1.jpg
APC Plugin 1.jpg (92.88 KiB) Viewed 7600 times

Posted on
Sat Jul 09, 2016 7:21 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

Thanks for the plugin. Upon initial installation, I got this error:
Code: Select all
Traceback (most recent call last):
  File "plugin.py", line 194, in runConcurrentThread
AttributeError: 'Plugin' object has no attribute 'logLevel'

So I defined self.logLevel in __init__ to equal zero.

Then I got the format error that's been reported:
Code: Select all
Traceback (most recent call last):
  File "plugin.py", line 192, in runConcurrentThread
  File "plugin.py", line 298, in readApcupsd
TypeError: not enough arguments for format string

So I modified line 298 (for me it's 298 because of the line I added to __init__):
Code: Select all
From this:
            self.log.logError("%s: Failed to get status for UPS %s after %s tries. Will retry in %s minutes" % (funcName, apcupsdRetries, self.apcupsdFrequency), self.logName)


to this:
            self.log.logError("%s: Failed to get status for UPS after %s tries. Will retry in %s minutes" % (funcName, apcupsdRetries, self.apcupsdFrequency), self.logName)

Which cleared that up. Still getting the same error as others (#32512 - Failed to get status).

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Jul 09, 2016 9:47 am
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

DaveL17 wrote:
So I modified line 298 (for me it's 298 because of the line I added to __init__):
Code: Select all
From this:
            self.log.logError("%s: Failed to get status for UPS %s after %s tries. Will retry in %s minutes" % (funcName, apcupsdRetries, self.apcupsdFrequency), self.logName)


to this:
            self.log.logError("%s: Failed to get status for UPS after %s tries. Will retry in %s minutes" % (funcName, apcupsdRetries, self.apcupsdFrequency), self.logName)

Which cleared that up. Still getting the same error as others (#32512 - Failed to get status).

I haven't had any issue with the configured plugin so I haven't had the failures you are seeing.

Looking at the line of code you replaced it would appear that the developer expected to pass the name of the affected device into the Indigo log. With that possibility in mind, I changed the code to the following:

Code: Select all
            self.log.logError("%s: Failed to get status for UPS %s after %s tries. Will retry in %s minutes" % (funcName, dev.name, apcupsdRetries, self.apcupsdFrequency), self.logName)
so now the four substitutions have a matching number of values supplied. Without having the original issue I cannot easily test this new line of code so YMMV.

/Marty

Posted on
Sat Jul 09, 2016 10:01 am
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

@Marty - I only have the one UPS, so I pretty much know its name. :wink:

Yours is a better fix for those that have more than one.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Aug 24, 2016 5:07 pm
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

Re: APCUPSD Plugin discussion

Hi,
I'm seeing these errors on the latest version:
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 1 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 2 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 3 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 4 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 5 of 5


I have recently upgraded to Mavericks and upgraded the apcupsd plugin so not sure if I've slipped up somewhere. Help !?

Posted on
Wed Aug 24, 2016 7:48 pm
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

petematheson wrote:
Hi,
I'm seeing these errors on the latest version:
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 1 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 2 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 3 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 4 of 5
apcupsd Error readApcupsd: Connection to apcaccess failed with error code:32512. Attempt 5 of 5

I have recently upgraded to Mavericks and upgraded the apcupsd plugin so not sure if I've slipped up somewhere. Help !?

Edit: As I suspected, the latest version of the apcupsd package (3.14.14) does changed the installation path for its binary, regardless of your system's implementation of SIP. This is a good thing actually… it just bites this plugin in the rear because it uses a fixed path. So anyone that has upgraded the package will see this plugin error and no Indigo device state updates will happen for your UPS devices until it's addressed!

I'm going to take a guess that the reason you and others are seeing this error is that the apcupsd package (not the Indigo plugin of the same name) either didn't get installed properly, or during an OS X upgrade some/all of the binaries for that package got moved out of their expected locations (VERY easy to have happen with OS X versions that use SIP to protect the /sbin, etc. folders).

Would you please try the following command in a Terminal session:
Code: Select all
ls -la /sbin/apc*
I suspect that you won't see any/all of the following output (the sizes and dates don't have to match):
Code: Select all
$ ls -la /sbin/apc*
-rwxr-xr-x  1 root  wheel   42336 Feb  2  2015 /sbin/apcaccess
-rwx------  1 root  wheel  433712 Feb  2  2015 /sbin/apctest
-rwx------  1 root  wheel  390352 Feb  2  2015 /sbin/apcupsd
-rwxr-xr-x  1 root  wheel      77 Feb  2  2015 /sbin/apcupsd-start
-rwxr-xr-x  1 root  wheel    1174 Feb  2  2015 /sbin/apcupsd-uninstall
If you see apcaccess listed on your system's output, try issuing a command the apcupsd plugin does like the following:
Code: Select all
/sbin/apcaccess status <IP-from-Indigo-UPS-device> <port-from-Indigo-UPS-device>
You should see something that has output similar to this (I truncated my output to keep it simple):
Code: Select all
$ /sbin/apcaccess status 127.0.0.1 3551
APC      : 001,038,0987
DATE     : 2016-08-24 21:34:41 -0400 
HOSTNAME : office-Mac-3.local
VERSION  : 3.14.13 (02 February 2015) darwin
UPSNAME  : office
CABLE    : USB Cable
. . .
If I'm right that OS X upgrades are moving the binaries, and/or that later versions of the apcupsd package installs them somewhere besides in the /sbin path then the plugin will need to be changed to match both the new and old paths. Please let me know what OS X version and apcupsd package version you have installed and I'll look into it.

/Marty

Posted on
Wed Aug 24, 2016 8:29 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

The output is as you expected:
Code: Select all
iMac:~ username$ ls -la /sbin/apc*
ls: /sbin/apc*: No such file or directory
iMac:~ username$

OS X Version: 10.11.6
apcupsd package version: 3.14.14

Thanks for the help!
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Wed Aug 24, 2016 8:48 pm
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

DaveL17 wrote:
The output is as you expected:
Code: Select all
iMac:~ username$ ls -la /sbin/apc*
ls: /sbin/apc*: No such file or directory
iMac:~ username$

OS X Version: 10.11.6
apcupsd package version: 3.14.14

Thank you, Dave for the data. It is as I expected… now to get a fix into the plugin. Since I'm not the maintainer, and I couldn't find a matching repository on GitHub there's not much I can do other than to show what needs to be changed.

Only do this if you have apcupsd package version 3.14.14 (or higher) and the apcupsd plugin version 0.4.2 (or lower) installed.

Using a "Python editor" (not TextEdit), search for and change the three (3) occurrences
Code: Select all
in /Library/Application Support/Perceptive Automation/Indigo 6/Plugins/apcupsd.indigoPlugin/Contents/Server Plugin/plugin.py
or /Library/Application Support/Perceptive Automation/Indigo 5/Plugins/apcupsd.indigoPlugin/Contents/Server Plugin/plugin.py

of the string

/sbin/apcaccess
with
Code: Select all
/usr/local/sbin/apcaccess
You will then need to Reload the apcupsd plugin to have the new code take effect.


Edit: reminding to reload the plugin!

/Marty

Posted on
Thu Aug 25, 2016 2:04 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

Just FYI I just tried these steps but got the same error. Deleted the UPS device from Indigo and re-created and that resolved the issue. Sooooo nice to have the plugin back up and running, thanks Marty & Dave!

Computer says no.

Page 4 of 10 1, 2, 3, 4, 5, 6, 7 ... 10

Who is online

Users browsing this forum: No registered users and 6 guests

cron