indigo utilities discussion

Posted on
Wed Feb 28, 2018 11:09 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

posted v 1.14.12

== Now checks for new version# once a day
== new menu item to check for version # of installed plugins vs store version #.
This can only be run ONCE PER DAY and between each individual query for a plugin version info is a 1.5 SEC WAIT.
That should not pose any significant load on the store.

Karl

Posted on
Sun Jul 08, 2018 9:45 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

posted v 1.15.12

added option to populate variables with temp sensor info and fan speeds of the MAC host.

Karl

Posted on
Sun Jul 08, 2018 10:55 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: indigo utilities discussion

Cool, thx Karl - I'll check out the new version...

_______
Norm

Posted on
Thu Aug 16, 2018 2:51 pm
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: indigo utilities discussion

I'm getting this error in my log. My guess is it's not happy with the fancy accented letter e in the cynical cache plugin?

Code: Select all
Aug 16, 2018, 3:36:44 PM
   utilities                       --------------------------------------------------------------
   utilities                        print plugin name  error in  Line '278' ;  error='[Errno 2] No such file or directory: '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Cynical CacheM-LM^A.indigoPlugin/Contents/Info.plist''
   utilities                       --------------------------------------------------------------


This is happening every 5 minutes or so

Posted on
Thu Aug 16, 2018 2:54 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

Unicode bug. Thought this was behind me. :(


Sent from my iPhone using Tapatalk

Posted on
Thu Aug 16, 2018 4:59 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

need some help here:

Code: Select all
import subprocess
ret = subprocess.Popen("/bin/ps -ef | grep 'MacOS/IndigoPluginHost' | grep -v grep | grep Cynic",shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()[0]
indigo.server.log(ret.decode('utf-8'))


tried decode, encode, unicode, nothing .. always getting:
CacheM-LM^A.indigoPlugin

??

Karl

[EDIT]
when I simply do it in terminal:
Code: Select all
 ps -ef | grep Cynical
  502      ....... ........   -fCynical Caché.indigoPlugin

I get the e/

Posted on
Thu Aug 16, 2018 9:10 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

indigo utilities discussion

using "ls" instead of "ps" returns a different type of string. With ls everything works fine "Caché" is decoded properly

there seems to be a difference in the output format of ps and ls ...

in an indigo action script:
Code: Select all
import subprocess
ret = subprocess.Popen(u"ls -l '/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/'| grep Cynic",shell=True,stdout=subprocess.PIPE).communicate()[0].strip("\n")
indigo.server.log(ret[-25:])

ret = subprocess.Popen("/bin/ps -ef | grep 'MacOS/IndigoPluginHost' | grep -v grep | grep Cynic",shell=True,stdout=subprocess.PIPE).communicate()[0]
indigo.server.log(ret[-30:])
returns:
Code: Select all
   Script                          ical Caché.indigoPlugin
   Script                          ical CacheM-LM^A.indigoPlugin
have no clue how to solve this one..

Posted on
Fri Aug 17, 2018 7:25 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

Code: Select all
ret = subprocess.Popen("export LANG=en_US.utf-8 && /bin/ps -ef  | grep Cyn",shell=True,stdout=subprocess.PIPE).communicate()[0].decode("utf-8")

does the trick. When opening a regular shell (ie terminal) it is set to utf-8
when opening a terminal shell in a plugin it is set to ASCII, then e/ has problems.

BUT "ls" does not seem to care while "ps" does .. strange..

Karl

the
.decode("utf-8")
at the end seems to be needed if you plugin starts with
# -*- coding: utf-8 -*-

Posted on
Fri Aug 17, 2018 9:28 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

posted v 1.18.14 on GitHub/kw123 and plugin store

-fixed e/ bug in plugin name
-and added variable:
"CPU_usage_short_plugname" eg CPU_usage_fingscan would be an example
with current CPU usage
The unit is now cpu usage in secs / 100 seconds (was 5 minutes)
eg a value of 10 means that the plugin used 10 seconds CPU time in the last 100 seconds

Karl

Posted on
Fri Aug 17, 2018 8:34 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

released v1.18.15 on github/kw123 and indigo store

* option to populate CPU_usage_pluginname for ALL plugin. set in config
will create a set of variables that are updated every 100 seconds like this:
Screen Shot 2018-08-17 at 21.27.07.png
Screen Shot 2018-08-17 at 21.27.07.png (72.34 KiB) Viewed 7189 times



Karl

Posted on
Fri Aug 17, 2018 9:10 pm
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: indigo utilities discussion

Thanks for the quick fix. Now I'm getting this error message though:

Code: Select all
Started plugin "utilities 1.18.15"
   utilities                       initialized
   utilities                       Utilities plugin initialized, ==> select  action from plugin menu
   utilities                       --------------------------------------------------------------
   utilities                       checkPluginCPU error in  Line '797' ;  error=''utf8' codec can't decode byte 0xcc in position 52171: invalid continuation byte'
   utilities                       --------------------------------------------------------------

Posted on
Fri Aug 17, 2018 9:20 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

could you do:
open terminal
Code: Select all
locale

export LANG=en_US.utf-8 &&/bin/ps -ef | grep MacOS/IndigoPluginHost

and check for any e/ characters.
for me with Cynical Caché it works

my output looks like:
Code: Select all
locale

LANG="en_US.utf-8"
LC_COLLATE="en_US.utf-8"
LC_CTYPE="en_US.utf-8"
LC_MESSAGES="en_US.utf-8"
LC_MONETARY="en_US.utf-8"
LC_NUMERIC="en_US.utf-8"
LC_TIME="en_US.utf-8"
LC_ALL=


export LANG=en_US.utf-8 &&/bin/ps -ef | grep IndigoP
  502   526   505   0 Tue11AM ??         4:18.46 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -f.Action Collection.indigoPlugin
....
  502 31529   505   0 Tue04PM ??       255:05.95 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fpiBeacon.indigoPlugin
  502 43874   505   0 Thu05PM ??         1:21.27 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fCynical Caché.indigoPlugin
  502 91885   505   0  1:06AM ??         2:04.58 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fRFXCOM.indigoPlugin
  502 16245 35817   0 10:23PM ttys020    0:00.00 grep IndigoP

Posted on
Sat Aug 18, 2018 10:37 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

there is another issue with the Case/ plugin.. the pref file is different from the plugin name

Cynical Caché.indigoPlugin vs org.cynic.indigo.gcnet.indiPref

the plugin can handle it, but the variable names will just show .indigo.gcnet

Anyway I have a version that will just skip the lines if it encounters a read error .
- first tries to read with locale.... if that fails read just us-ascii.
- then when going through the lines it will skip the ones it can not find w/o error message

So for the time being all but the "é" ... vive la France

Karl

mine works fine.. I have
LANG="en_US.utf-8"

I guesss that needs to be adapted to the local language / code of OSx


and renaming the plugin would make all of this go away .. you could do that yourself

Posted on
Sat Aug 18, 2018 12:50 pm
rapamatic offline
Posts: 276
Joined: Aug 03, 2015
Location: Glencoe, IL

Re: indigo utilities discussion

kw123 wrote:
could you do:
open terminal
Code: Select all
locale

export LANG=en_US.utf-8 &&/bin/ps -ef | grep MacOS/IndigoPluginHost

and check for any e/ characters.


Here's what I get from mine:

Code: Select all
 MacPro:~ ray$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
MacPro:~ ray$ export LANG=en_US.utf-8 &&/bin/ps -ef | grep MacOS/IndigoPluginHost
  503   711   664   0 31Jul18 ??        24:29.17 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -f.Action Collection.indigoPlugin
  503   712   664   0 31Jul18 ??        60:44.09 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -f.Z-Wave.indigoPlugin
  503   713   664   0 31Jul18 ??       106:21.36 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fAlexa-Hue Bridge.indigoPlugin
  503   714   664   0 31Jul18 ??        27:52.44 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fapcupsd.indigoPlugin
  503   716   664   0 31Jul18 ??        67:58.36 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fCynical Behaviors.indigoPlugin
  503   718   664   0 31Jul18 ??        24:41.36 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fCynical Weather.indigoPlugin
  503   719   664   0 31Jul18 ??        23:02.92 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fDomoPad Mobile Client Plugin.indigoPlugin
  503   721   664   0 31Jul18 ??        77:10.56 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fEPS Device Extensions.indigoPlugin
  503   722   664   0 31Jul18 ??       238:54.28 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fEPS HomeKit Bridge.indigoPlugin
  503   723   664   0 31Jul18 ??        49:49.35 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fHarmonyHub.indigoPlugin
  503   724   664   0 31Jul18 ??        33:56.10 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fiFindFriendsMini.indigoPlugin
  503   725   664   0 31Jul18 ??        62:18.30 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fLIFXBridge.indigoPlugin
  503   729   664   0 31Jul18 ??        23:44.08 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fnodeMatrix.indigoPlugin
  503   730   664   0 31Jul18 ??        57:44.64 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fPlex Media Server Manager.indigoPlugin
  503   731   664   0 31Jul18 ??        21:46.73 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fPushover.indigoPlugin
  503   732   664   0 31Jul18 ??        62:12.15 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fsecondsSinceLastChange.indigoPlugin
  503   734   664   0 31Jul18 ??       109:25.51 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fSQL Logger.indigoPlugin
  503   735   664   0 31Jul18 ??       277:40.03 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fTimed Devices.indigoPlugin
  503   736   664   0 31Jul18 ??        23:38.78 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fTimers and Pesters.indigoPlugin
  503   738   664   0 31Jul18 ??        22:25.17 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fVirtual Devices.indigoPlugin
  503   739   664   0 31Jul18 ??        21:55.69 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fWatchdog.IndigoPlugin
  503 40606   664   0  5Aug18 ??        15:40.32 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fCynical Cache?M^A.indigoPlugin
  503 45777   664   0  6Aug18 ??        15:34.44 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -e_background_
  503 46546   664   0  2Aug18 ??        58:33.35 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fAutomatic OBD-II.indigoPlugin
  503 48390   664   0 Thu12PM ??        14:26.33 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fEcobee.indigoPlugin
  503 77776   664   0  2:00AM ??        13:46.87 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fSonos.indigoPlugin
  503 87642   664   0  1:46PM ??         0:01.83 /Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -p1176 -fLutron RadioRA 2.indigoPlugin
  503 87915 87790   0  1:48PM ttys009    0:00.00 grep MacOS/IndigoPluginHost
MacPro:~ ray$


The only one that looks funky is cynical cache....

Posted on
Sat Aug 18, 2018 1:41 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: indigo utilities discussion

can you try with:
Code: Select all
export LANG=en_US:UTF-8 &&/bin/ps -ef | grep MacOS/IndigoPluginHost

that is the only difference I can see

Karl

and here the plugin that adds the option to set your own language and char code settings ...
https://www.indigodomo.com/pluginstore/75/

Who is online

Users browsing this forum: No registered users and 1 guest