Is there an action to reload a plugin?

Posted on
Mon Aug 13, 2018 4:42 pm
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Is there an action to reload a plugin?

I am using the Security Camera plugin to shrink the jpegs from my HiDef 1080 cameras to something that Prism will load. Despite it's lack of support it mostly works very well. However, we've been having issues with our WIFI router that causes it to drop clients for 5 to 10 minutes every once in a while, and when it drops a camera, the plugin makes it unavailable, even if it comes back on line a few minutes later... the only way to get the camera back when this happens is to reload the plugin; an irritation, but doable if I'm home, but if I'm away, I'm stuck till I get back. I'd like to set up an action group that I could fire off from anywhere that would do a reload on the plugin manually (or maybe just do it on a daily schedule...

Posted on
Mon Aug 13, 2018 5:16 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Is there an action to reload a plugin?

Code: Select all
RFXId = "nl.rjdekok.indigoplugin.RFXCOM"
RFXPlugin = indigo.server.getPlugin(RFXId)
if RFXPlugin.isEnabled():
   RFXPlugin.restart(waitUntilDone=True)


here is what i use to restart the RFX plugin at midnight in an action

Posted on
Sun Aug 19, 2018 11:06 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: Is there an action to reload a plugin?

So where did the "nl.rjdekok.indigoplugin." part of the RFXCOM ID come in? When I run Utilities on the plugin list I get
    utilities starting print plugin names, id, mem cpu daughter processes . . . takes a little time, using lsof, ps -ef, ps aux
    utilities
    PID CPU-total Mem-% -Virt -Real version pluginName ------------------------ .. + sub processes and non std open files
    862 48:00.82 0.1 2614 41 2.0.4 .Action Collection
    863 18:29.66 0.0 2607 23 2.0.10 .INSTEON Commands
    864 51:47.52 0.1 2628 38 2.0.111 .Z-Wave
    openFile: /dev/cu.SLAB_USBtoUART
    865 647:53.88 0.1 2610 47 1.0.2 Adapters
    866 149:31.69 0.1 2614 46 0.3.03 GhostXML
    867 16:58.67 0.0 2608 24 1.1.5 indigo-pushover
    868 351:16.46 0.1 2627 61 4.18.46 INDIGOplotD
    92946 0:00.00 0.1 2627 61 SubProcess: (sh)
    92950 0:00.00 0.1 2627 61 SubProcess: (sh)
    92954 0:00.00 0.1 2627 61 SubProcess: (sh)
    92956 0:00.00 0.1 2627 61 SubProcess: (sh)
    92958 0:00.00 0.1 2627 61 SubProcess: (sh)
    92960 0:00.00 0.1 2627 61 SubProcess: (sh)
    92962 0:00.00 0.1 2627 61 SubProcess: (sh)
    92964 0:00.00 0.1 2627 61 SubProcess: (sh)
    92966 0:00.00 0.1 2627 61 SubProcess: (sh)
    92970 0:00.00 0.1 2627 61 SubProcess: (sh)
    92972 0:00.00 0.1 2627 61 SubProcess: (sh)
    92975 0:00.00 0.1 2627 61 SubProcess: (sh)
    92978 0:00.00 0.1 2627 61 SubProcess: (sh)
    92979 0:00.00 0.1 2627 61 SubProcess: (sh)
    92983 0:00.00 0.1 2627 61 SubProcess: (sh)
    92985 0:00.00 0.1 2627 61 SubProcess: (sh)
    92987 0:00.00 0.1 2627 61 SubProcess: (sh)
    92989 0:00.00 0.1 2627 61 SubProcess: (sh)
    92992 0:00.00 0.1 2627 61 SubProcess: (sh)
    92995 0:00.00 0.1 2627 61 SubProcess: (sh)
    92997 0:00.00 0.1 2627 61 SubProcess: (sh)
    92999 0:00.00 0.1 2627 61 SubProcess: (sh)
    93001 0:00.00 0.1 2627 61 SubProcess: (sh)
    93004 0:00.00 0.1 2627 61 SubProcess: (sh)
    93005 0:00.00 0.1 2627 61 SubProcess: (sh)
    93007 0:00.00 0.1 2627 61 SubProcess: (sh)
    93009 0:00.00 0.1 2627 61 SubProcess: (sh)
    93011 0:00.00 0.1 2627 61 SubProcess: (sh)
    93012 0:00.00 0.1 2627 61 SubProcess: (sh)
    93014 0:00.00 0.1 2627 61 SubProcess: (sh)
    93016 0:00.00 0.1 2627 61 SubProcess: (sh)
    93018 0:00.00 0.1 2627 61 SubProcess: (sh)
    openFile: /Users/jeff/indigo/INDIGOplotD/matplot/matplot.log
    869 25:05.81 0.1 2637 57 0.6.04 matplotlib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libz.1.2.8.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/_imaging.so
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libjpeg.9.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libopenjp2.2.1.0.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libtiff.5.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/liblzma.5.dylib
    873 19:09.05 0.0 2608 24 2.0.2 Timers and Pesters
    874 23:09.22 0.1 2611 28 7.1.31 uniFiAP
    877 670:36.59 0.1 2613 47 2.0.4 Virtual Devices
    878 202:11.39 0.1 2618 50 2.1.3 WeatherSnoop
    884 19:28.22 0.1 2608 26 noVer. zwavelockmanager.indigoplugin
    885 19:49.20 0.0 2607 24 noVer. zwavescenecontroller.indigoplugin
    886 19:41.51 0.0 2607 24 1.0.4 ZwaveWatcher
    978 117:23.92 0.1 2617 43 noVer. _background_
    openFile: /Library/Python/2.7/site-packages/PIL/_imaging.so
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libjpeg.9.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libopenjp2.2.1.0.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libz.1.2.8.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libtiff.5.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/liblzma.5.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/_imagingft.so
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libfreetype.6.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libpng16.16.dylib
    25928 404:17.64 0.2 2653 95 7.91.225 piBeacon
    75365 48:46.64 0.1 2609 27 2.0.3 RFXCOM
    openFile: /dev/cu.usbserial-A4VBOKLJ7
    92419 11:15.81 0.2 2752 101 1.6.2 SecurityCamera
    openFile: /Library/Python/2.7/site-packages/PIL/_imagingft.so
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libz.1.2.8.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/_imaging.so
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libjpeg.9.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libopenjp2.2.1.0.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libtiff.5.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/liblzma.5.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libfreetype.6.dylib
    openFile: /Library/Python/2.7/site-packages/PIL/.dylibs/libpng16.16.dylib
    openFile: /Library/Fonts
    openFile: ds9.terra:55100->mycamera.terra:http (ESTABLISHED)
    openFile: ds9.terra:56770->ubuntu-nvr.terra:7080 (ESTABLISHED)
    93748 0:00.45 0.1 2603 28 1.18.17 utilities
    93873 0:00.01 0.1 2603 28 SubProcess: /bin/sh -c export LANG=en_US.utf-8 &&/bin/ps -ef

with the pid changing every time the plugin runs, and "SecurityCamera" not working in the ID line

Posted on
Sun Aug 19, 2018 11:53 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Is there an action to reload a plugin?

thats not the name of the plugin but the plugin ID

you can find that at
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/  ===>  nl.rjdekok.indigoplugin.RFXCOM.indiPref

and it is in
Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/RFXCOM.indigoPlugin/Contents/Info.plist:

   <key>CFBundleIdentifier</key>
   <string>nl.rjdekok.indigoplugin.RFXCOM</string>


Karl

if you post logfile output, put the text into [ code ] [/ code ] then it is nicely aligned

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests

cron