Shelly and Hue

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

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?

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 :rofl:

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.

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.

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.

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

Wow @robertklep, have a cold one on that :beers:

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

This would then generate the following when pushed

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.

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

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

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

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.

It does :slight_smile: (it sends all three)

:roll_eyes: 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.

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

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!

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

[EDIT] And it’s up.

1 Like

Tested and working great, many thanks!!:grin: