Maker command to turn on\off Hue Custom Scenes

Howdy,

I recently migrated my home automation backbone from a stable, but stale ISY994i Insteon/Zwave hub to Hubitat. The process was painless. Now I want to grow my system, but I am stuck on a growing pain for hue lights. Specifically,

  1. Is it possible to issue an API Put via Hubitat’s Maker to turn a on a group of lights using a custom scene?
  2. Can I use a Zigbee “recall scene” as the basis of my Hubitat Put?

I am currently testing API commands in the Hue Clip debugger. I am pinning my hopes and dreams that Zigbee’s “recall” command will work. I worry that my research indicates that a Zigbee recall command changes state, but does not actually turn the light on. Also, Hue documentation indicates that it is not possible cannot “chain commands. I am not certain what the above indicates, but I don’t like the sound of it. :blush:

I researched the available Habitat documentation and I am aware there is\are App(s) available in Github that are well regarded that perform this task. However, I would like to understand how APIs function and this is my first foray into the API world.

Cheers,

Craig

I'm not sure what you want the role of MakerAPI to be here. It's mostly intended for viewing the state of Hubitat devices and controlling them from elsewhere, often when native integrations are lacking or you want an easy(-ish) way to DIY it without needing a custom app. It sounds like you just want to send an HTTP PUT to the Hue Bridge from Hubitat. You can do GET and POST with Rule Machine--there are HTTP actions you can choose from--but I'm not sure POST is one of them. There is a community virtual HTTP switch driver by @ogiewon that you could use to send a POST when the switch gets turned on, though, and it sounds like you're familiar enough with the Hue API to know what to put for the URI and whatnot as needed.

That being said, that's quite a bit of work to activate a Hue scene. I did this for a bit myself before, for this and other reasons, writing CoCoHue to bring in devices for scenes (among other additions over the stock integration). Perhaps that is one of the things you saw. You would not have seen it in the Hubitat docs, however. That contains documentation for native apps and other hub features (Hubitat does indeed have their own Bridge integration); this is a third-party, open-source community app (of which there are many).

Are you talking about something at the Zigbee level here? If so, RM cannot directly send those commands (only what is exposed via the device driver). Hubitat's Groups and Scenes app can do Zigbee group messaging (outbound), but the "scenes" part of that aren't on-device Zigbee scenes like you'd get with Hue scenes via the Hue Bridge. You could do this with a custom app, but I'm not aware of anyone who has. This is one reason I kept using the Hue Bridge after an experiment with a "second" Hubitat hub dedicated to bulbs.

...or are you talking about scene recall commands sent to a Hue Bridge? (From Hubitat's perspective, these are LAN messages.) If so, it is true you can send only one command to the Bridge at a time. There is a rate limit for how fast you can send multiple ones in a row. A few at a time shouldn't be a big problem--their maximum recommendations are 10/second for lights and 1/second for groups. If you have multiple bulbs to manipulate, groups (rooms or zones in the Hue app) are the best choice, if possible--that way, you can do it in one command. If all the bulbs need different states, then a scene would be a good choice if the states are pre-determined--also one commands. Still, a few bulbs at a time shouldn't be a big problem. Different commands in succession to the same bulbs shouldn't be a problem, either, but you can combine parameters that make sense into the same command (e.g., ["on": true, "bri": 50000] is fine--no need to turn it on and then set the brightness).

Your spot on. I want to send an HTTP put from Hubitat to the Hue API, and also that Maker was designed for HTPP Get. I went with the API approach, inspired by Jason-Lane’s Flic button solution. I was hoping\believing Maker could also process an HTTP Put. In any event the Hue API would not accept an HTTP Post as a substitute (I tried). I now believe the API approach is not easily workable.

The desired end state is to turn on a complex hue scene via a Hubitat dashboard without delay or popcorn. Everything beyond that is just a search for a solution.

Back to the drawing board.

Btw, a lot of the documentation I read was about CoCoHue. I will give that a go next…

Thanks for getting back to me

Cheers,

Craig

The Maker API allows you to control or get the status of Hubitat devices. Not send commands to other APIs. That can only be done by a hubitat driver/app that is written to interact with that API, like CocoHue.

Yeah, I kind of learned that the hard way..

I installed CoCoHue. It was up installed, and running in 10 minutes: far less time than it took to write the original question I posted.

Wish I knew than, what I know now...

Anyway, the APP works perfect. Suits my needs exactly.

Wow, and thanks,

Craig

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.