# Shelly and Hue

**URL:** <https://community.homey.app/t/shelly-and-hue/84969>\
**Category:** Questions & Help\
**Tags:** homey-pro, hue\
**Created:** [July 21, 2023, 5:18am UTC](https://community.homey.app/t/shelly-and-hue/84969 "2023-07-21T05:18:14Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 21, 2023, 5:18am UTC](https://community.homey.app/t/shelly-and-hue/84969/1 "2023-07-21T05:18:14Z")

</div>

Hi all,

I have been searching the forum but cannot find what i am looking for so thought i would post and pray.

I am a new homey user and my first project is lighting. I have shelly 1pm and 2.5pm behind all switches, and hue bulbs in the fixtures. I want to use either detached mode or mqtt to control the lights but cannot find a guide on how to set this up.

I have tried detached mode but i could not get it working so if anyone can point me in the right direction that would be great. My current attempt was simply changing in shelly cloud the button type to detached and setting up a basic flow to turn on hue when the input changes, but this didnt work.

I reference mqtt also as i fear shelly detached mode will have a delay whilst i hear using mqtt would be more instantaneous.

Any help will be much appreciated. I am keen to learn so if you can even point me in the direction of the correct reading material i am happy to take it from there.

Thanks  
Michael

---

<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:** [July 21, 2023, 5:24am UTC](https://community.homey.app/t/shelly-and-hue/84969/2 "2023-07-21T05:24:20Z")

</div>

> [@Mike\_D](#):
>
> but this didnt work.

It would be useful to know what _exactly_ didn’t work: didn’t the detached mode work? Didn’t the flow work? Didn’t the Hue bulbs work?

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 21, 2023, 6:04am UTC](https://community.homey.app/t/shelly-and-hue/84969/3 "2023-07-21T06:04:16Z")

</div>

![Screenshot_20230721_075934_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/8/f8aa1039ed54a101d424224df5d2f8db1f73ee0f.jpeg)

Hi sorry i should have been more clear. Hue works as when i run the flow manually the bulbs act accordingly. I think my issue is setting up shelly in detached mode (i simply did this in the shelly app but unsure if additional setup is needed) and what exact trigger card is needed on the homey side. Screen shot of the flow i was using is attached.

My issue is that i am pretty new to homey and am using primarily the android app and am unsure how to debug such an issue.

Can i just add i am an avid forum reader so have read many of your posts / replies Rob - you replying to my posts has me feeling a little like i have bumped into a celebrity 🤣

---

<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:** [July 21, 2023, 8:25am UTC](https://community.homey.app/t/shelly-and-hue/84969/4 "2023-07-21T08:25:45Z")

</div>

It should be enough to set detached mode in the Shelly app, and I would assume that the trigger is the correct one (provided that the physical switch is connected to input 1, not 2).

Possibly you need to check other Shelly configuration settings, as sometimes they’re not correct and can cause large delays between switching and Homey triggering. See [this](https://community.homey.app/t/app-pro-cloud-shelly/765#troubleshooting-your-setup-11).

---

<div class="post-metadata">

**Author:** ![To\_Lou](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/to_lou/32/79159_2.png) [@To\_Lou](https://community.homey.app/u/To_Lou)\
**Post date:** [July 21, 2023, 8:38am UTC](https://community.homey.app/t/shelly-and-hue/84969/5 "2023-07-21T08:38:59Z")

</div>

Are you trying to switch on/off and also hue? Is it a double switch?

I think maybe the Shelly needs to be set with the External input active. Possibly without having detached mode set.

In detached mode the Input 1 is e.g. used for sensor to determine if door is closed or not.

You may have to choose from either switching manually or sending hue signal through the Input 1.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [July 21, 2023, 10:08am UTC](https://community.homey.app/t/shelly-and-hue/84969/6 "2023-07-21T10:08:22Z")

</div>

Do you see the status of the input change under the webinterface when flipping the switch?

If not, it’s something in the relay / input configuration of your Shelly. If so, it’s something in the network configuration of your Shelly, your network or the network stack of Homey.

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 21, 2023, 10:37am UTC](https://community.homey.app/t/shelly-and-hue/84969/7 "2023-07-21T10:37:40Z")

</div>

Really appreciate all the responses, they gave me a lot of options to explore which i will look into later today. Thanks all!

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [July 21, 2023, 11:00am UTC](https://community.homey.app/t/shelly-and-hue/84969/8 "2023-07-21T11:00:03Z")

</div>

> [@Mike\_D](#):
>
> feeling a little like i have bumped into a celebrity 🤣

Wow @robertklep, have a cold one on that 🍻

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 23, 2023, 2:57pm UTC](https://community.homey.app/t/shelly-and-hue/84969/9 "2023-07-23T14:57:37Z")

</div>

So, the guidance provided was extremely helpful and i have actually got it kind of half working, but only in a specific situation. Below is how the setup to have this working.

1. Shelly is in detached mode, with button type switch  

2. My switch is a momentary switch so when i press it i get this  

3. And here is my flow, any input change turns on 3 hue bulbs. And this all works. So i press the button and the hue bulbs turn on  

Now this is great, but the problem is in turning the lights off. I was exploring changing the light switch type to a button as per below

 ![Screenshot_20230723_163228_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/b/dbdb496361d969a11346db56239dd7351656fedb.jpeg)

This would then generate the following when pushed

 ![Screenshot_20230723_163321_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/b/5bcb4d7e4b2a74539d5b234c32bb11a32b79be99.jpeg)

I was thinking to use this shelly setup with a flow such as this, so that i can do a single press for on and a long press for off. However the below flow is not working, when i press the button nothing happens with hue despitw as per above shelly is sending a message.

 ![Screenshot_20230722_081824_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/c/4c8f4282eda776ceaa3e6dfb2733571182af6424.jpeg)

I also created a flow to test if the single push was being picked up by homey. The flow was as per below

 ![Screenshot_20230722_081832_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/0/705e7d12782af1993adaaea202a58eb3c0e69c7e.jpeg)

As you can imagine i did not get a push notification.

So this is where i got to - i can get it half working but cannot get the whole single long or double push to work. Any ideas anyone might have would be much appreciated.

Thanks  
Michael

---

<div class="post-metadata">

**Author:** ![To\_Lou](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/to_lou/32/79159_2.png) [@To\_Lou](https://community.homey.app/u/To_Lou)\
**Post date:** [July 23, 2023, 3:06pm UTC](https://community.homey.app/t/shelly-and-hue/84969/10 "2023-07-23T15:06:27Z")

</div>

What if you would Enable ‘External switch’ and use it as toggle switch.  
Then the shelly should report ON or OFF to Homey?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [July 23, 2023, 3:07pm UTC](https://community.homey.app/t/shelly-and-hue/84969/11 "2023-07-23T15:07:26Z")

</div>

> [@Mike\_D](#):
>
> Now this is great, but the problem is in turning the lights off. I was exploring changing the light switch type to a button as per below

What kind of switch do you have attached. For the action events to work properly in button mode you would need a momentary switch attached. According to the log it’s only sending btn\_up and btn\_down events and not a single push event.

I never implemented the btn\_down and btn\_up action events as a specific action event as it’s usually doubled by the input or relay. But it seems you found yourself a use case where you can solely rely on btn\_down and btn\_up events. I might consider adding them but I’d like to know if you are using a momentary switch or a regular toggle switch for this.

And for next time, please use the Shelly app support topic on this forum. I might not see separate threads.

---

<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:** [July 23, 2023, 3:08pm UTC](https://community.homey.app/t/shelly-and-hue/84969/12 "2023-07-23T15:08:23Z")

</div>

> [@Phuturist](#):
>
> According to the log it’s only sending btn\_up and btn\_down events and not a single push event.

It does 🙂 (it sends all three)

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [July 23, 2023, 3:16pm UTC](https://community.homey.app/t/shelly-and-hue/84969/13 "2023-07-23T15:16:00Z")

</div>

> [@robertklep](#):
>
> It does 🙂 (it sends all three)

🙄 Right, got square eyes from watch Formula 1 I guess.

I’d have to investigate this, perhaps there is something wrong with the triggering of action events on multichannel Plus/Pro devices. Got another user that reported a similar issue with a Pro 4PM.

Will get back on this.

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 23, 2023, 3:31pm UTC](https://community.homey.app/t/shelly-and-hue/84969/14 "2023-07-23T15:31:51Z")

</div>

> [@Phuturist](#):
>
> What kind of switch do you have attached.

I have a momentary switch. Single push toggles the light between on and off.

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 23, 2023, 3:38pm UTC](https://community.homey.app/t/shelly-and-hue/84969/15 "2023-07-23T15:38:39Z")

</div>

> [@Phuturist](#):
>
> And for next time, please use the Shelly app support topic on this forum. I might not see separate threads.

And yes sorry, will do next time. To be honest when i oroginally posted i didnt expect the developer to respond haha, i thought another user would just point out my silly errors. But here we are, next time i will post in the right place!

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [July 23, 2023, 5:13pm UTC](https://community.homey.app/t/shelly-and-hue/84969/16 "2023-07-23T17:13:36Z")

</div>

> [@Mike\_D](#):
>
> I have a momentary switch. Single push toggles the light between on and off.

It’s a bug. A fix should be up in an hour or so.

[EDIT] And it’s up.

---

<div class="post-metadata">

**Author:** ![Mike\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike_d/32/67788_2.png) [@Mike\_D](https://community.homey.app/u/Mike_D)\
**Post date:** [July 23, 2023, 7:37pm UTC](https://community.homey.app/t/shelly-and-hue/84969/17 "2023-07-23T19:37:57Z")

</div>

Tested and working great, many thanks!!😁
