Logo! switching with momentary and regular switch

Thread Starter

TheEmperor

Joined May 1, 2023
2
Hello all,

I'm trying to get something working but I don't seem to be figuring it out.
I'm using a Logo! PLC for my home lights and other devices and I want to add some more smarts into it.
I have a shelly switch that I've added with home assistant and I want to do the following:

Right now I have my lights set up with a logo diagram so that you press the switch once, the lights go on, and you press the switch again, and they go out. Now I've added this shelly in there and although it's working, just not as I want it to. Right now I've set up the shelly so that I can give the same type of short pulse to switch on/off the lights but I want these to somehow work as a switch on/off (hold type) as right now I have always to say: turn on living room lights to give the pulse, even when the lights are on (using voice assistant with home assistant) to have the shelly give the off pulse.
So what I'm trying to do is have it somehow switch on the lights with the switches in my home or switch them on when the shelly is turned on (and stays on for as long as the lights need to be on) and when I turn off the shelly contact or push a switch I want the lights to turn off

I hope I explained this correctly as I'm not native English so might not makes that much sense what I'm saying

thank you
 

panic mode

Joined Oct 10, 2011
2,749
Logo is a tiny PLC. it will do what you tell it to do. If you tell it to pulse output, it will do just that. if you tell it to turn it on/of and maintain the state, it will do that too.
 

Thread Starter

TheEmperor

Joined May 1, 2023
2
Logo is a tiny PLC. it will do what you tell it to do. If you tell it to pulse output, it will do just that. if you tell it to turn it on/of and maintain the state, it will do that too.
Hey thanks for the reply!

You're right about that but I need to find a way to "wire" it in that way. I have 2 inputs, one for my momentary switch and another one for the shelly. The momentary switch also uses a latching relay so that it holds and keeps the output on until I press the switch again. I need to find a way where I can add a normal switch that will maintain its state while simultaneously using the switch that gives pulses to turn it on and off. If I turn it on with a normal switch that maintains on and then press the momentary switch nothing happens because that other switch is still on and keeps the output on. I need to find a way that I can somehow override each other lets say
 

Ya’akov

Joined Jan 27, 2019
9,152
I find it very hard too follow what you want to do so this may or may not be helpful.

I think you need to use the Shelly’s switch input as an input to HA, not to directly operate the Shelly. Since HA can watch the with it can make the Shelly do whatever you want based on the switch action. By the way, there are Shelly devices with more than one input.
 

panic mode

Joined Oct 10, 2011
2,749
The momentary switch also uses a latching relay so that it holds and keeps the output on until I press the switch again. I need to find a way where I can add a normal switch that will maintain its state while simultaneously using the switch that gives pulses to turn it on and off. If I turn it on with a normal switch that maintains on and then press the momentary switch nothing happens because that other switch is still on and keeps the output on. I need to find a way that I can somehow override each other lets say
i am also unclear on what you mean...

if i understand correctly, you want to use two switches:
One is momentary switch ("button") and will be wired to Shelly to toggle output of Shelly.
The other switch is maintained switch used to override Shelly (force light on, regardless of Shelly state).

is that correct?
 

bidrohini

Joined Jul 29, 2022
190
You will need to add the Shelly switch as an input to the Logo! PLC diagram so that it can detect when the switch is turned on or off.When the switch is turned on, the program should turn on the lights, and when the switch is turned off, the program should turn off the lights. Modify the settings on your Shelly switch to behave like an on/off switch instead of a pulse switch. This will allow you to turn the lights on or off with a single press of the switch.You have to configure your voice assistant (e.g. Alexa or Google Assistant) to work with the new setup so that you can control the lights with your voice.
 

Ya’akov

Joined Jan 27, 2019
9,152
What is a Shelley switch and why is it necessary?
Shelly is a company that produces home automation WiFi connected relays. Some are intended to convert conventional switches to smart switches, some are focused on monitoring power consumption—they have a very extensive product line even beyond these things.

They are very open and based on Espressif hardware offering the opportunity to flash custom firmware but even the stock firmware is excellent using their own quite good mobile app or very easily integrated via MQTT or their own well documented API (over HTTP). I consider them one of the best in the HA space, and use their products extensively.

The TS is using the Shelly device to provide glue between HA (Home Assistant, an open source home automation suite—pretty much the best thing going) and the PLC. HA is used to talk to the Shelly while the Shelly's relay output is connected to the PLC. This allows HA's native voice assistant to have inputs to the PLC by commanding the Shelly.
 
Top