Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


phrozenpenguin

868 posts

Ultimate Geek
+1 received by user: 90


#315253 26-Jun-2024 00:34
Send private message

First - yes we will be getting an electrician to install this if testing works out.

 

I am testing to see if I can setup the following - also open to other ideas. I want to have a button/switch that can be used in Home Assistant, and an indication of state i.e. on/off. I need to be able to change the state from Home Assistant or the physical button, and want the state indication (at the switch) to reflect that.

 

I've got a Shelly i4 hooked up to a PDL600 momentary switch - and this is connected to Home Assistant and can be used as required. The indication is the bit I am trying to work through. The momentary switch has an LED built in, with separate leads and wiring instructions - model PDL681MT10PB.

 

I was hoping to use the LED within the switch, but thinking things through now it seems that might not easily be possible? I am thinking I could use another Shelly (Plus 1?) in order to wire the LED up and be able to control that separately in Home Assistant - but would code it so the LED indicates state (which can be changed from Home Assistant or physical switch) automatically.

 

Keen for any input before I do further testing - have I missed something basic, or is there a better way of doing this!?


Create new topic
Ge0rge
2114 posts

Uber Geek
+1 received by user: 2060

Trusted
Lifetime subscriber

  #3253303 26-Jun-2024 05:22
Send private message

If I understand correctly, you have a load that you want to control from eithier HA or a physical switch, and an LED that will indicate if the load is on or not?

I would argue that the i4 probably isn't the ideal tool for this. I'd start by connecting the load through a Shelly 1, connecting the push-button to the switch inputs of the same Shelly 1, and the LED in parallel with the load. Either the button or the Shelly can turn the load on or off, you will get physical indication that the load is on via the LED regardless of which method is used to turn the load on, and the load will also always work, even if HA packs a sad for whatever reason.

Edit to add: After re-reading your post a couple more times, I have realised you might not be trying to switch a load directly at the push-button location. If that is the case, then you could still use the Shelly 1 - the output of the push button goes to the switch inputs of the Shelly, the LED goes to the contacts of Shelly. When you press the button, the Shelly closes the contacts which do nothing more than turn the light on, and a signal is sent to HA to do whatever it is that you would have had the i4 do as well. If you activate the virtual button in HA, have the Shelly close it's contacts thus turning the LED on.

The downside of this is that if HA packs a sad, pressing the physical button will turn on the LED, but nothing else will happen - using the i4 would net the same result though.

You could overcome this by decoupling the input from the contacts in the Shelly 1. A press on the button would send a signal to HA to do whatever it is you have programmed it to do, and included in that would be sending a signal back to the Shelly 1 to close it's contacts, thus turning the LED on and giving you indication that the automation/script had run. If HA has packed a sad, pressing the button does nothing, but you now get indication (or lack thereof) to show this.

If you're wanting to use all four inputs of the i4 to do different things, with four different push buttons, and have indication for all of them, I'd suggest you will need four Shelly 1s to achieve it. Seems a bit overkill, and I'd be asking myself if I really needed that indication.

Probably need to know what you want to happen when you press the button (other than the indicator LED come on), and how far away from the button this is physically happening to be able to help more.



phrozenpenguin

868 posts

Ultimate Geek
+1 received by user: 90


  #3253325 26-Jun-2024 08:20
Send private message

Thanks @Ge0rge - for pointing out how I was overcomplicating things! Your edit is correct, I do not need to switch any load with the Shelly; it is entirely to control a Home Assistant button (which in turn controls other things). Decoupling the Shelly contacts sounds like what I need to do, so thanks for the detail.

 

I don't need all four inputs of the i4 in this situation, so that can just be removed.

 

Thanks again for the detailed and logical advice.


eluSiveNZ
192 posts

Master Geek
+1 received by user: 42


  #3253342 26-Jun-2024 09:51
Send private message

I agree that de-coupling is the best way to go. You will also gain single,double,triple and long press options for the switch as well.

 

 




openmedia
3449 posts

Uber Geek
+1 received by user: 878

Trusted

  #3253502 26-Jun-2024 14:52
Send private message

@phrozenpenguin I'll be interesting to hear how your setup progresses. I'm about to try out the same momentary switch with some Shelly Dimmers.





Generally known online as OpenMedia, now working for Red Hat APAC as a Technology Evangelist and Portfolio Architect. Still playing with MythTV and digital media on the side.


phrozenpenguin

868 posts

Ultimate Geek
+1 received by user: 90


  #3253672 26-Jun-2024 23:00
Send private message

The setup works exactly as described above. I wired things up and then set the Shelly to be uncoupled (relay and switch) and the switch to be a button. I've got two independent controls in home assistant - one for led (via relay) and one for detect push of switch. I am only using single press at the moment.I set some basic automations so the led responds to the switch and the status I want in HA, and set the switch to control status I want in HA. So far with initial testing it looks good.

 

The Shelly has an option for "power on status" and I'm not sure if there is a way to "get" the status from HA, or if I even need that (for behaviour in a power cut)!


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.