studioimaginaire / phue

A Python library for the Philips Hue system
Other
1.52k stars 267 forks source link

Executing Python script with token #132

Open testerbb opened 6 years ago

testerbb commented 6 years ago

Hi everybody

Is this right? On a webpage (ex. overview.php) i'm executing a python script which consists basicaly in these steps: Calling: "python MyPythonScript.py 3" (with arguments) Code is working perfectly

b = Bridge("192.168.x.x) b.connect() ... group=sys.argv[1] group=int(group)

On a second webpage, on the same server (ex index.php) the whole scripting doesn't work at all. Does every page have to be approved by the bridge? Is there a possibility to give to the python script a specific token to handle the request? How? I tried b = Bridge("192.168.x.x/MyToken) but it didn't succeed.

Any help? BR

testerbb commented 6 years ago

Is there any hints or help? I would be very happy to get a feedback on this issue

LudwigKnuepfer commented 6 years ago

Please have a look at the class's initialization function: https://github.com/studioimaginaire/phue/blob/d89a033c0d57355d83e7d7d88fb46152b0a7637e/phue.py#L598