Hi all! I need to control Philips Hue Lamps from Vuo using phue python library, but have got an Error messages. What I'm doing wrong:
I'm trying to run Python script from the "Exequte Shell Command" node. Here's the Error message I've got:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/tmp/**vuo-app-shell-noLgar**", line 3, in <module>
b = Bridge('192.168.1.101')
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/phue.py", line 628, in __init__
self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/phue.py", line 751, in connect
self.register_app()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/phue.py", line 719, in register_app
'The link button has not been pressed in the last 30 seconds.')
phue.PhueRegistrationException: (101, 'The link button has not been pressed in the last 30 seconds.')
When I run the same script from Terminal - scripts work.
I think that problem occurs because the script is running from the Vuo shell. (vuo-app-shell-noLgar) Maybe not enough permissions? PS: before. each try I pressed "The link button".
Vuo composition attached.
Moderator note:
Adjusted formatting
Comments
Looks like that library
Looks like that library obtains an access token and stores it in a config file in the home folder. The
Execute Shell Command
node prevents accessing the home folder, to make it harder for nefarious scripts to mess with your private data.You could try copying the config file to the /tmp folder (which
Execute Shell Command
does have access to), then specify that as the config file location. In Terminal:Then modify the script like this:
Thanks a lot! Your solution
Thanks a lot! Your solution works!
As a non coder, I tried a
.
Applescript Test.vuo
Moderator note:
How to put a value from a
How to put a value from a node output to the python script?
You could using "append text"
You could using "append text" to build the script. See the example attached, that changes the IP value each time the phue_on is called.
Schermata 2022-05-14 alle 10.13.38.png
phue_mouse_click.vuo