Hi.
I've been wanting to integrate my Stream Deck and Hubitat for a while now. It's been burning cycles in my brain like a minimized program running in the background, taking up cycles for a long time.
Finally, I was able to get it done today.
I was searching the net and found ripnet's GitHub repo for a custom plugin to the Stream Deck. I set it up, and after getting it added to the Stream Deck app, the toggle and set switch functions weren't working as the documentation indicated.
No offense to ripnet, but the documentation was sparse and it wasn't clear as to how to make the actions in the custom plug to work.
You can look at his GH repo and download the latest release if you want to add it to your Stream Deck. There is a post here in the Hubitat Community pointing to it as well.
I added an issue in his repo with suggested edits for the readme. I forked his repo and updated the readme as well. You can find that here.
Now that I was committed, I searched in the Hubitat Community and found this post where @christian.busch and @aaiyar figured out how to use the Maker API to turn a device on an off.
I took that information, re-swizzled it, and was able to create two multistep buttons (on & off) for 2 sets of LED curtain lights that I use when doing video calls.
Requirements:
- Maker API needs to be installed
- Maker API app ID
- Maker API Access Token
- ID of the device you want to turn on or off.
With these ingredients, you can combine them all to create the URL that will need to be added to the Stream Deck button you want via the System > Website feature in the Stream Deck App.
Here are the URLs that I created for my specific setup. Be sure to modify the API ID, Device ID and Access Token for your setup.
Stream Deck App > System > Website > URL - Turn On outlet to control lights:
http://192.168.x.x/apps/api/[maker API ID]/devices/[device id]/[command]?access_token=[access_token]
Example System > Website URL to turn on an outlet to control lights:
http://192.168.20.93/apps/api/[maker API id]/devices/[device id]/[command]?access_token=[access token]
- Note: you can run an API call to your specific device ID to get the commands. For my setup, it was simply on and off.
I've pasted the same URLs as above, but this time the [command] place holder is replaced with the actual command that I pulled when I polled the specific device API:
turn on:
http://192.168.x.x/apps/api/[maker API ID]/devices/[device id]/on?access_token=[access_token]
turn off:
http://192.168.x.x/apps/api/[maker API ID]/devices/[device id]/off?access_token=[access_token]
Copy and paste these URLs into your Website Button in the URL field and you should be good to go.
I'm late for a round of golf, so I don't have screenshots or videos. If anyone would like me to share those, I can do it later this evening (2021/09/18) or tomorrow (2021/09/20).
Reply to this post and I'll take care of it.
Really hope this helps others get their SD & HE integrations working.
, & ,
--Shawn