APCUPSD Plugin discussion

Posted on
Thu Oct 13, 2016 10:53 am
DaveL17 offline
User avatar
Posts: 3400
Joined: Aug 20, 2013

Re: APCUPSD Plugin discussion

It's within the plugin package. Right click on the plugin file and select View Package Contents.


Sent from my iPhone using Tapatalk

Posted on
Tue Nov 22, 2016 1:16 pm
yassi offline
Posts: 342
Joined: Sep 06, 2015
Location: Germany

Re: APCUPSD Plugin discussion

I have this plugin working for a while but it seems so I didn't configured the apcupsd part in a good way, because last Sunday I had a power outage and I didn't get any message from Indigo.
The UPS was able to keep the MacMini alive (about 4 minutes power outage), but no message.

It seems so, I forgot to install and configure the two files: apccmdex and apcupsAction.

Where can I found them, they are not in the plugin package.

Thx!
Yassi

Posted on
Tue Dec 06, 2016 8:01 am
mortenkols offline
Posts: 182
Joined: Oct 29, 2014
Location: Norway

Re: APCUPSD Plugin discussion

I have a Socomec Netys PE 850 kVA UPS. I dont have so much knowledge about UPS. Can i use this plugin with my UPS?
I have tried to install the plugin, but i can't get communication with the UPS.

Here a link to the UPS:

http://www.socomec.com/range-ups-single ... #technical

Posted on
Tue Dec 06, 2016 9:57 am
durosity offline
User avatar
Posts: 3071
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

Doubtful, the APCupsD software is designed only for APC UPSes. You could try this one though if macOS recognises it?

viewtopic.php?f=33&t=9559

Computer says no.

Posted on
Tue Dec 06, 2016 11:07 am
mortenkols offline
Posts: 182
Joined: Oct 29, 2014
Location: Norway

Re: APCUPSD Plugin discussion

I have tried this plugin, But the macOS dosent recognise the ups. Any suggestion ?

Posted on
Tue Dec 06, 2016 1:01 pm
durosity offline
User avatar
Posts: 3071
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

You didn't install the APCUPSD software before testing with macOS did you? It disables the kext macOS uses to identify the UPS (because it'd interfere with the apcupsd connection)

Computer says no.

Posted on
Tue Dec 06, 2016 2:27 pm
mortenkols offline
Posts: 182
Joined: Oct 29, 2014
Location: Norway

Re: APCUPSD Plugin discussion

I tried first the battery monitor ups plugin. i didn't get that to work, so then i tried APCUPSD plugin. Installed the APCUPSD software and then the plugin, but the OS X can't find the ups.

Is there any trick i must do on OS X to find my UPS?

Posted on
Wed Dec 07, 2016 10:31 am
durosity offline
User avatar
Posts: 3071
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

The only way to get that to work would be to modify APCUPSD to be able to read your USP. Unless your UPS uses the same protocols as APC (which is pretty dang unlikey) i doubt you'll be able to get it to work using this system.

Have you had a search of interwebs to see if there's any scripts around for reading that model? If so you could possibly modify one to parse the information into Indigo variables?

Computer says no.

Posted on
Wed Dec 07, 2016 1:21 pm
mortenkols offline
Posts: 182
Joined: Oct 29, 2014
Location: Norway

Re: APCUPSD Plugin discussion

I have searched but i can't find anything about it.

Im just interested in when the ups goes on battery. There is a option to run a script (First delay script), is it possible to make a script to update a variable when it is on battery?
Attachments
Skjermbilde 2016-12-07 kl. 20.16.52.png
Skjermbilde 2016-12-07 kl. 20.16.52.png (139.73 KiB) Viewed 1033 times

Posted on
Wed Dec 07, 2016 3:44 pm
durosity offline
User avatar
Posts: 3071
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

I don't see why not.. i'm curious as to what kind of script the UPS is expecting to run. Might be worth looking at the shutdown.sh one it references for shutdown to see what it does.. perhaps a duplication and modification of that could work?

Computer says no.

Posted on
Thu Dec 08, 2016 9:47 am
mortenkols offline
Posts: 182
Joined: Oct 29, 2014
Location: Norway

Re: APCUPSD Plugin discussion

This is the shutdown.sh script. it turns off my mac mini if the battery on the ups is low.

Code: Select all
#!/bin/bash

shutdown -hu now

----------------

i have tried to make a script to update a variable, but I failed. what is wrong? :D

Code: Select all
UPS = indigo.variables[206759487] # "UPS"

indigo.variable.updateValue(UPS, "true")

Posted on
Thu Dec 08, 2016 12:33 pm
berkinet offline
User avatar
Posts: 2851
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: APCUPSD Plugin discussion

berkinet wrote:
mortenkols wrote:
This is the shutdown.sh script. it turns off my mac mini if the battery on the ups is low.
#!/bin/bash shutdown -hu now
----------------
i have tried to make a script to update a variable, but I failed. what is wrong? :D
UPS = indigo.variables[206759487] # "UPS"indigo.variable.updateValue(UPS, "true")

The problem appears to be using Indigo internal (plugin) Python programming syntax in a bash shell script. You want Indigo to change the value of an internal variable. But, the shell script is executed by the bash shell, which is a completely separate process. The only (simple) way to have the script interact with Indigo would be through the Indigo RESTful API.

An example of such a URL to set the value of Indigo variable powerFail to true would look like:
http://127.0.0.1:8176/variables/powerFail?_method=put&value=false

You can test that by simply pasting the URL into a browser window.

To execute that from a shell script you would need a means to simulate a browser. The solution is curl which is provided in the standard OS X release. Something like this:
Code: Select all
curl --user username:password --digest  -X PUT -d value=true http://127.0.0.1:8176/variables/powerFail
Just change "username" and "password" to whatever you have set for Indigo, put that into your shell script and you should get the result you want.

Posted on
Fri Dec 09, 2016 1:17 pm
mortenkols offline
Posts: 182
Joined: Oct 29, 2014
Location: Norway

Re: APCUPSD Plugin discussion

thank you so much. have tested it and it worked !!=)

Posted on
Sun Dec 18, 2016 6:36 am
yassi offline
Posts: 342
Joined: Sep 06, 2015
Location: Germany

Re: APCUPSD Plugin discussion

Hi guys,

after moving my Indigo 6 to another MacMini with ElCapitan and reinstalling a fresh copy of the apcupsd package (3.14.14), I have the issues stated on their web page:

Mac OS X 10.11 “El Capitan” support
Installer is now compliant with SIP (aka “rootless”) requirements. apcupsd executables are installed into /usr/local/sbin instead of /sbin. Config files and scripts remain in /etc.
NB: There continues to be a known issue with USB UPSes under OS X where the OS power management service occasionally does not relinquish control of the UPS, leaving apcupsd unable to communicate with it. The workaround is to unplug and replug the USB cable after booting the Mac.


Even after several reboots, unplugging the cable and selecting another USB port, the UPS isn't recognized (even in AppleProfiler not).
Have the mention, that the package was working with my old MacMini with 10.6.8
So, can't use the plugin till the UPS isn't recognized.
Checked the config file (under /etc/apcupsd), it's correct, for USB.

Does one can help?
If not, how can I remove the apcupsd package, where is the uninstaller? Can vague remember, there must be a shell script to uninstall it.

Thanks in advance,
Yassi

Posted on
Sun Dec 18, 2016 7:27 am
durosity offline
User avatar
Posts: 3071
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: APCUPSD Plugin discussion

I recall there was a bug where after a restart you had to unplug the UPS and replug it back in.. might be worth giving that a try? (Just for reference I've got an APC 1500va smart ups connected to my Mac Pro 2008 running El Capitan and it sees it fine, so it definitely does work on 10.11)


Sent from my iPad using Tapatalk

Computer says no.

Page 6 of 8 1 ... 3, 4, 5, 6, 7, 8

Who is online

Users browsing this forum: No registered users and 1 guest