Page 2 of 3

Re: Dynamic Control Plugin

PostPosted: Mon Sep 18, 2017 6:58 pm
by Vig
When I try to create a device I get the error messages on the picture. Also, when trying to disable it doesn't seem to gracefully go down. Any idea?

Error process (pid 620) failed to quit after polite request -- forcing it to quit now
Stopped plugin "Dynamic Control 1.1.0"

Indigo Cocoa client authenticated (172.16.32.151)
Error (client) timeout waiting for plugin response from com.bertmartin.DynamicButton for request CalcDeviceFunc
Error (client) timeout waiting for plugin response from com.bertmartin.DynamicButton for request UiGetValues2
Error (client) timeout waiting for plugin response from com.bertmartin.DynamicButton for request CallPluginFunc
Error (client) runDialogForDevice() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Error (client) received unexpected packet response CalcDeviceFunc (waiting for CallPluginFunc)

Re: Dynamic Control Plugin

PostPosted: Mon Sep 18, 2017 9:13 pm
by bkmar1192
Hmmmm.... haven't experienced that one before. Have you opened the configuration on the plugin itself (from the plugin's menu) and then saved it?

I'll take look at the code too and see if I can trace it.


Sent from my iPhone using Tapatalk

Re: Dynamic Control Plugin

PostPosted: Mon Sep 18, 2017 10:38 pm
by Vig
I don't see that option:

Re: Dynamic Control Plugin

PostPosted: Tue Sep 19, 2017 8:44 am
by bkmar1192
Sorry, that is correct - I was thinking of one if my other plugins. I'll take another look tonight.


Sent from my iPhone using Tapatalk

Re: Dynamic Control Plugin

PostPosted: Thu Sep 21, 2017 9:55 pm
by bkmar1192
OK - the following post has some possible information. a couple things to try is to uninstall and reinstall Pillow. they also suggest installing pillow from within python. The three commands that are used are:

from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw

So they should all be fine...

https://stackoverflow.com/questions/886 ... -named-pil

** Maybe someone on the board that knows Python a bit better than I can help :D


Sevilsivle wrote:
I followed all the instructions and installed Pillow.
This seems to have been successful, when I repeat the command I get:
Requirement already satisfied: Pillow in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requirement already satisfied: olefile in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from Pillow)

However when I start the PlugIn I get the following error message in the Event Log:

Starting plugin "Dynamic Control 1.1.0" (pid 27455)
Dynamic Control Error Error in plugin execution InitializeMain:

Traceback (most recent call last):
File "plugin.py", line 13, in <module>
ImportError: No module named PIL

Stopping plugin "Dynamic Control 1.1.0" (pid 27455)


What is wrong here?

regards
Tim

Re: Dynamic Control Plugin

PostPosted: Fri Sep 22, 2017 11:21 pm
by Vig
Tried all kinds of uninstalls/installs, same error.. :?
Calling Image/ImageFont/ImageDraw from python/Indigo works though:

# /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7/IndigoPluginHost.app/Contents/MacOS/IndigoPluginHost -i
Python 2.7.10 (default, Feb 7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
Connected to Indigo Server v7.0.3, api v2.0 (localhost:1176)
>>> from PIL import Image
>>> from PIL import ImageFont
>>> from PIL import ImageDraw
>>>

I searched the forum for the errors I get and found couple threads with exact same messages but on different plugins, here is one of them mentioning the API call timeout:
viewtopic.php?f=212&t=18058&hilit=UiGetValues2&start=15#p135778

I will see if I can find another Mac to run the plugin as a test just in case if python is somehow broken. on my Indigo Server.

Re: Dynamic Control Plugin

PostPosted: Sat Sep 23, 2017 10:49 am
by bkmar1192
What is odd is that there is really nothing much in my code that is running at that point and the device parameters file is pretty simple.

Couple of other things to try:

1. Check to see if the following directory exists. If it does not then manually create it. Maybe it is having a hard time setting up the directory.
/Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/plugins/DynamicButton/. This is the default it uses for saving images.

2. Delete the preferences file - in case it got corrupted during install.
a. Disable the plugin
b. In the directory: /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins delete (or rename) the com.bertmartin.DynamicButton.indiPref file.

3. Total shot in the dark
a. Create a new device
b. Select "Dynamic Control" in type
c. Before selecting the "Model" uncheck the check box "Enable Indigo Communication"
d. Select the model.

Vig wrote:
When I try to create a device I get the error messages on the picture. Also, when trying to disable it doesn't seem to gracefully go down. Any idea?

Error process (pid 620) failed to quit after polite request -- forcing it to quit now
Stopped plugin "Dynamic Control 1.1.0"

Indigo Cocoa client authenticated (172.16.32.151)
Error (client) timeout waiting for plugin response from com.bertmartin.DynamicButton for request CalcDeviceFunc
Error (client) timeout waiting for plugin response from com.bertmartin.DynamicButton for request UiGetValues2
Error (client) timeout waiting for plugin response from com.bertmartin.DynamicButton for request CallPluginFunc
Error (client) runDialogForDevice() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Error (client) received unexpected packet response CalcDeviceFunc (waiting for CallPluginFunc)

Re: Dynamic Control Plugin

PostPosted: Sat Sep 23, 2017 7:32 pm
by Vig
bkmar1192 wrote:
1. Check to see if the following directory exists. If it does not then manually create it. Maybe it is having a hard time setting up the directory.
/Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/plugins/DynamicButton/. This is the default it uses for saving images.
2. Delete the preferences file - in case it got corrupted during install.
a. Disable the plugin
b. In the directory: /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins delete (or rename) the com.bertmartin.DynamicButton.indiPref file.


Neither /Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/plugins/DynamicButton directory nor /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.bertmartin.DynamicButton.indiPref file exist. I created the directory manually, then disabled and removed the plugin and reinstalled it but getting the exact same errors.

Also, when I merely try to disable the plugin it's timing out:

Disabling plugin "Dynamic Control 1.1.0"
Stopping plugin "Dynamic Control 1.1.0" (pid 77552)
Error process (pid 77552) failed to quit after polite request -- forcing it to quit now
Stopped plugin "Dynamic Control 1.1.0"

Not sure if it's even the plugin issue, probably the way API calls are handled in Indigo or some security issues in the OS preventing files/directories to be created (I am on the latest macOS 10.12.6)

Re: Dynamic Control Plugin

PostPosted: Sat Dec 16, 2017 5:31 pm
by tornado
Please see the PDF instructions in the download for details on installation and use.


I don't see the PDF in the download on GitHub. Was it removed?

Thanks

Re: Dynamic Control Plugin

PostPosted: Sat Dec 16, 2017 5:55 pm
by tornado
I tried File:///Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/plugins/DynamicButton/heat1.png (which worked)


Use File://[path] and not http://[path]


This doesn't seem to work for me (file://) and I'm not sure why:

Code: Select all
   Error (client)                  control page image URL invalid: File:///Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/plugins/DynamicButton/testDynamicControl.png


my directory:
Code: Select all
tornado@MacMini DynamicButton $ pwd
/Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/plugins/DynamicButton
tornado@MacMini DynamicButton $ ls
**testDynamicControl.png new_device.png           testDynamicControl.png

Re: Dynamic Control Plugin

PostPosted: Sat Dec 16, 2017 6:11 pm
by Different Computers
isn't it "file" not "File"?

FYI you can drag and drop the target file to get the correct path, but as I recall you still have to put the right prefix in front of it.

Re: Dynamic Control Plugin

PostPosted: Sat Dec 16, 2017 7:05 pm
by tornado
Different Computers wrote:
isn't it "file" not "File"?

FYI you can drag and drop the target file to get the correct path, but as I recall you still have to put the right prefix in front of it.


I've tried all permutations of File, file etc. I believe I have the path correct (if you compare the pwd output and what I have in my file:// area

thanks

Re: Dynamic Control Plugin

PostPosted: Sat Dec 16, 2017 7:36 pm
by DaveL17
Try replacing the spaces with '%20':

Code: Select all
File:///Library/Application%20Support/Perceptive%20Automation/Indigo%207/IndigoWebServer/plugins/DynamicButton/testDynamicControl.png

URLs can't have spaces in them even though paths to files and folders can. With spaces, Indigo should still display the image on the control page even though it's (rightly) complaining about the URL construction.

Replace the spaces with %20; you'll get the image and no complaints from Indigo.

Re: Dynamic Control Plugin

PostPosted: Mon Dec 18, 2017 5:13 pm
by tornado
Thanks that worked. And for the record it did require me to use file:/// not File:///

Thanks!

Re: Dynamic Control Plugin

PostPosted: Mon Dec 18, 2017 5:17 pm
by DaveL17
Glad that worked for you. Sorry I didn’t spot the File vs file bit.


Sent from my iPhone using Tapatalk