toddaustin07 / edgebridge

Forwarding Bridge Server for SmartThings Edge drivers
Apache License 2.0
39 stars 19 forks source link

Using PUT commands #8

Closed CHeil402 closed 1 year ago

CHeil402 commented 1 year ago

Is there any chance of adding support for PUT requests? I'm trying to use the web requestor and this bridge to bring control of my Govee lights back into SmartThings. I was using this Groovy handler before they nixed the IDE:

https://github.com/uncdubdiver/smartthings-govee-led-lights/blob/main/govee-device-handler.groovy

Govee's API requires using PUT commands to send JSON to control devices. Your web requestor seems to support PUT requests, but sadly since there's no LAN control, I need the bridge which doesn't seem to support forwarding PUT commands. Thanks!

toddaustin07 commented 1 year ago

Yes, I could add support for PUT requests. Allow me a few days to get it done and tested, and I'll get back to you.

CHeil402 commented 1 year ago

Sorry, but any update on this? I'm not a Python expert but it seems like you should be able to just add a line to your try block in line 171 and use the requests put method, right? Thanks

toddaustin07 commented 1 year ago

Hey - Sorry, this one got by me. I'll focus on it this week.

toddaustin07 commented 1 year ago

Quick update - I've made the code changes (I did some refactoring as well) and am testing now. Should have it posted by Friday.

toddaustin07 commented 1 year ago

I have posted the update into a folder called TestVersion. Please install and test your app and confirm it is working for you.

Note - I uploaded the Python file; if you need something else like a Windows or Pi executable let me know.

CHeil402 commented 1 year ago

Thanks so much. If you can easily make a Windows executable it would be greatly appreciated, if not I can install Python on the server I'm using.

toddaustin07 commented 1 year ago

Done - it's now in the Test Folder.

Let me know how you make out.

CHeil402 commented 1 year ago

Thanks! I can confirm that the test version is working with sending PUT commands to the Govee API. One more work around successful for the restrictions that SmartThings keeps adding.