# Toggle Hue labs scenes via HomeyScript

**URL:** <https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223>\
**Category:** Questions & Help\
**Tags:** homeyscript\
**Created:** [February 18, 2021, 1:05pm UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223 "2021-02-18T13:05:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Meijer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_meijer/32/22648_2.png) [@Kevin\_Meijer](https://community.homey.app/u/Kevin_Meijer)\
**Post date:** [February 18, 2021, 1:05pm UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223/1 "2021-02-18T13:05:56Z")

</div>

I happily make use of the Hue Labs scenes. Only somewhat annoying is that you have to open the app, select the bridge, go to hue labs and then toggle the scene on or off. That could be easier I assume.

Scenes in Hue Labs are not available in Homey. Only with some tinkering it would be possible to toggle them with the Hue API. With the addition of Homey Script in the webapp I was curious to try of this is possible. Only I do lack the javascript knowledge and experience to get this working. Therefore I wanted to ask if someone on the community has this experience and can help me with this script.

**What I have done**

I made a ‘local user’ on my bridge. With the CLIP API debugger I can approach my bridge as documented by Hue. [https://developers.meethue.com/develop/get-started-2/](https://developers.meethue.com/develop/get-started-2/)

The blogpost below explains how Hue labs scenes can be approaches and toggled via html. [https://aarongodfrey.dev/home%20automation/automating-hue-labs-formulas/](https://aarongodfrey.dev/home%20automation/automating-hue-labs-formulas/)

So I have found out which sensor ID’s on my bridge are matched with y hue labs scenes. Only the sctipt provided in the blogpost names a PUT action to toggle it on and off. I am not able (with my minimal knowledge of javascript and google skills) to get this working in Homeyscript.

Are there more users with the wish to use hue labs scenes in Homey and is there someone that can help me with the script? Much appreciated!

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [February 18, 2021, 1:13pm UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223/2 "2021-02-18T13:13:35Z")

</div>

Have you tried using the built-in Logic “Make a web request” flow card? Seems to me that should be a bit easier to get going than writing a custom Homeyscript script.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/3/533371cfc944287cb821e606c0b1175aca618728.jpeg)

---

<div class="post-metadata">

**Author:** ![Kevin\_Meijer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_meijer/32/22648_2.png) [@Kevin\_Meijer](https://community.homey.app/u/Kevin_Meijer)\
**Post date:** [February 18, 2021, 1:37pm UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223/3 "2021-02-18T13:37:13Z")

</div>

Thanks @robertklep this did the trick! Did not know of this flowcard and made my life way easier.

---

<div class="post-metadata">

**Author:** ![Kongedam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kongedam/32/35807_2.png) [@Kongedam](https://community.homey.app/u/Kongedam)\
**Post date:** [March 6, 2021, 1:11pm UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223/4 "2021-03-06T13:11:28Z")

</div>

@Kevin_Meijer  
Could you maybe make a step by step guide on how to execute Hue Labs?  
It would be awesome to execute tv mimicking

Thanks

---

<div class="post-metadata">

**Author:** ![Kevin\_Meijer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_meijer/32/22648_2.png) [@Kevin\_Meijer](https://community.homey.app/u/Kevin_Meijer)\
**Post date:** [March 8, 2021, 8:20am UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223/5 "2021-03-08T08:20:27Z")

</div>

Good idea. When I find the time this week I will give it a try.

---

<div class="post-metadata">

**Author:** ![Kevin\_Meijer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kevin_meijer/32/22648_2.png) [@Kevin\_Meijer](https://community.homey.app/u/Kevin_Meijer)\
**Post date:** [March 8, 2021, 9:15am UTC](https://community.homey.app/t/toggle-hue-labs-scenes-via-homeyscript/43223/6 "2021-03-08T09:15:57Z")

</div>

I posted the tutorial here: [[HOW TO] trigger Hue Labs formula' in Homey](https://community.homey.app/t/how-to-trigger-hue-labs-formula-in-homey/44274)
