APCUPSD Plugin discussion

Posted on
Wed Feb 08, 2017 4:17 am
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: APCUPSD Plugin discussion

I seem to be running 0.4.6??update: I've downgraded to the version you mentioned but I'm still seeing the same error messages in my event log.
Attachments
IMG_3436.PNG
IMG_3436.PNG (353.78 KiB) Viewed 8010 times

Posted on
Fri Feb 10, 2017 11:57 pm
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

I sometimes forget that nothing on the Internet is private…

I have figured out why @Dewster35 is having the trouble: they managed to find my unannounced (and incomplete!) repository for this plugin that hasn't had everything pushed to it yet. Sorry for the trouble, @Dewster35! :oops:

I should be finishing that up this weekend and I will make an announcement about it as soon as it is really ready.

/Marty

Posted on
Sat Feb 11, 2017 9:30 am
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: APCUPSD Plugin discussion

Marty,
I just messaged you PM.

I really do think this is a problem for us. While we are very happy the third party developer community is so active, having a single area to find the most up to date plugin, or better yet plugins updating themselves automatically and also giving a mechanism to pay some of these developers for their hard work would be a great improvement!

I am pretty sure I just googled the plugin name and downloaded that version.

Posted on
Sat Feb 11, 2017 10:42 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

Dewster35 wrote:
...a single area to find the most up to date plugin, or better yet plugins updating themselves automatically...

With Github, it's a bit tricky IMO. Developers often save interim changes to Github, and sometimes work with others exchanging code segments while developing. I suspect that some develop code directly on Github. Matt and Jay have suggested--and I agree with their proposal--that the best way to share plugins via Github is through Releases.

With my plugins (which truthfully haven't been on Github that long) only releases are official updates. Downloading directly from the most current repo comes with a near certainty that you'll get something unfinished and containing bugs.

Not a dig, just an observation. :D

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

[My Plugins] - [My Forums]

Posted on
Sat Feb 11, 2017 12:14 pm
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: APCUPSD Plugin discussion

DaveL17 wrote:
Downloading directly from the most current repo comes with a near certainty that you'll get something unfinished and containing bugs.


QFT (Quoted for Truth). Releases and Pre-releases are meant for other people. Random commits are not.

The updater I use (originally written by another Indigo developer) does GitHub updates semi-automatically. I don't think there's a way to actually do them automatically, as Indigo puts up a confirmation dialog.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Feb 11, 2017 12:52 pm
Dewster35 offline
Posts: 1030
Joined: Jul 06, 2010
Location: Petoskey, MI

Re: APCUPSD Plugin discussion

Not sure if the above is directed at me or not. Random non-developer-type people don't know what you're talking about. We're just trying to get stuff to work and when the solution isn't obvious many turn to google for answers.

Posted on
Sat Feb 11, 2017 12:56 pm
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

FlyingDiver wrote:
The updater I use (originally written by another Indigo developer) does GitHub updates semi-automatically. I don't think there's a way to actually do them automatically, as Indigo puts up a confirmation dialog.

I think we've gone off-topic here for this thread, but the conversation is important. Perhaps some of these replies can be moved to the Plugins and GitHub thread.

One thing I want to add is that there needs to be a way for update notifications, etc. to take into account the version of Indigo that the customer is running. Right now that requires that we clearly state what version a release will work with, but no way to stop someone from being told about a plugin release that they cannot use. Without 'Is this plugin version compatible with my Indigo version?' "smarts" in the update checker(s), this requires brain cycles to decide. That's why automatic plugin updating isn't a good thing in my world (I'm running Indigo 5).

/Marty

Posted on
Tue Feb 21, 2017 7:28 pm
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

For anyone subscribed to this thread that might otherwise miss it, here is an important (soft) announcement!

/Marty

Posted on
Tue Apr 04, 2017 8:07 am
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

MartyS wrote:
For anyone subscribed to this thread that might otherwise miss it, here is an important (soft) announcement!

It's now an official announcement!

/Marty

Posted on
Thu Jun 21, 2018 9:19 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: APCUPSD Plugin discussion

I am wondering if there might be a way to use the Mac Apps plugin to shut down the APCUPSD process on the Mac (it's a daemon, right?) under certain circumstances?

Here's my issue:

Most of the time, for the health of the computer, I would like the APCUPSD to work normally and perform a controlled shutdown of the Mac in the event of a prolonged power outage. Unfortunately, the one major downside to this is that, on power resumption, the Mac will not reboot, even if that checkbox is marked in system settings, since it doesn't perceive this to be a dirty shutdown.

This is fine if I'm at home, or even in town. But it presents a real problem if out of town. Essentially all the functions of the home automation are shutdown until someone physically restarts the Mac.

So I am considering some Indigo logic where, after a few minutes on battery, Indigo checks whether the house is in "vacation" mode. If so, it stops the APCUPSD daemon. Of course, I won't be able to watch the charge trickle down on my UPS, but I will have a Mac that will hopefully wake on power resumption.

I started to create a a new Mac Apps device for the process, but I have no idea what goes in this config box for the APCUPSD process.

Screen Shot 2018-06-21 at 11.08.24 PM.png
Screen Shot 2018-06-21 at 11.08.24 PM.png (34.43 KiB) Viewed 6957 times


Any assistance would be greatly appreciated. Presumably, after I successfully create the device, I can then use it to quit the process under the conditions I described above, and perhaps restart it after the power comes back on and stays on.

Posted on
Mon Oct 29, 2018 6:46 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

Can someone confirm that that the apcupsd process will run successfully under Mojave? Since upgrading the OS, I haven't been able to get it to connect to the UPS.

Cheers,
Dave

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

[My Plugins] - [My Forums]

Posted on
Mon Oct 29, 2018 7:18 pm
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

lanbrown wrote:
I don't use this, but the plugin does use USB for connectivity. After people have upgraded to Mojave, they did have to re-select the USB interface for Z-wave. Could the same be required here as well? Just a thought.

It's a good thought, but I think that would require uninstalling and reinstalling the daemon. I don't know of a way to reconnect it manually.

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

[My Plugins] - [My Forums]

Posted on
Mon Oct 29, 2018 9:49 pm
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

Dave, I don't have a Mojave system to test with yet. But never fear, it's probably something simple.

Depending on what Mac OS version you were using before your upgrade, it's possible that the APCUPSD software used by this plugin was installed in your /sbin path, not /usr/local/sbin where is must be if system-wide SIP is enabled. If that's the case, downloading the latest version from http://apcupsd.org and reinstalling should fix that right up. Mojave has even further tightened up SIP's control of various paths and files, so you may be running into that (a re-installation of even the same version of the APCUPSD software may address that).

If it's something else then unless someone has some more Mojave-specific ideas then some output may be helpful. Using Terminal, please issue these commands and reply with the output:
Code: Select all
which apcaccess
ls -la /sbin/apc*
ls -la /usr/local/sbin/apc*
apcaccess
ps auxw | grep -i apc

Hopefully something will reveal itself that has an easy fix.

updated to fix /sbin path reference

/Marty

Posted on
Tue Oct 30, 2018 4:05 am
DaveL17 offline
User avatar
Posts: 6751
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: APCUPSD Plugin discussion

Hey Marty, thanks. I think you're onto something... I think this may be an easy fix after all.

Code: Select all
Last login: Tue Oct 30 04:50:09 on ttys000
iMac:~ username$ which apcaccess
iMac:~ username$ ls -la /sbin/apc*
ls: /sbin/apc*: No such file or directory
iMac:~ username$ ls -la /usr/local/sbin/apc*
-rwxr-xr-x  1 root  wheel   46640 May 31  2016 /usr/local/sbin/apcaccess
-rwx------  1 root  wheel  438064 May 31  2016 /usr/local/sbin/apctest
-rwx------  1 root  wheel  394720 May 31  2016 /usr/local/sbin/apcupsd
-rwxr-xr-x  1 root  wheel      87 May 31  2016 /usr/local/sbin/apcupsd-start
-rwxr-xr-x  1 root  wheel    1234 May 31  2016 /usr/local/sbin/apcupsd-uninstall
iMac:~ username$ apcaccess
-bash: apcaccess: command not found  # <----
iMac:~ username$ ps auxw | grep -i apc
username        467   0.0  0.3  4357528  28748   ??  S     7:34PM   0:28.49 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fapcupsd.indigoPlugin
username        361   0.0  0.1   691696  11768   ??  S     7:33PM   0:08.23 /Applications/apcagent.app/Contents/MacOS/apcagent
username       4441   0.0  0.0  4268020    792 s000  S+    4:55AM   0:00.00 grep -i apc
iMac:~ username$

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

[My Plugins] - [My Forums]

Posted on
Tue Oct 30, 2018 7:47 am
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: APCUPSD Plugin discussion

For some reason, apcaccess cannot be executed and that's very likely the same reason that the apcupsd daemon isn't loaded (it wasn't listed in the `ps` output, just the monitoring agent). Why /usr/local/sbin wouldn't be found in your PATH for executables I have no idea—unless it's a new Mojave "thing."

You could try this command:
Code: Select all
/usr/local/sbin/apcaccess
to see what happens.

Before spending too much effort on this, please reinstall the OS X kit from http://apcupsd.org and see if by any chance that makes it work. It's a quick download and install.

/Marty

Who is online

Users browsing this forum: No registered users and 6 guests