WiFi switch recommendation

Hello everybody,
I am just about to enter the home automation world and I am planning to integrate a openhab server installed on a raspberry pi and some wifi switches in my house to control the lights (to begin with).
I would like to add on top of the current physical switches a wifi switch, so that I can still control the lights with the physical switches but also from my mobile.
Currently, some lamps are controlled by two or even three deviators. How could I add a wifi deviator, making sure the server recognizes the status of the lamp?

I came up with two logical solutions:

  1. Find a wifi switch with a current sensor that allows to sense wether the lamp is consuming energy;
  2. Find a wifi switch with a physical switch embedded that could be connected to the current electrical wiring of the house.

Do you have any hardware recommendation for this solutions? Is there a more logical solution

Thank you in advance for helping!

You can have a look at somthing like this

https://www.itead.cc/smart-home/sonoff-t1-us.html

And then just flash them with custom firmware

I use espurna on mine

I use sonoff as well. If you flash the firmware you can use GPIO 14 with an existing switch to control the light.

Thank you for answering!
@allen: I have noticed this solution before, but it does not allow me to use the existing deviators in the house, I can only have that device as a button to control the light

@H102: awesome idea, i just saw that TASMOTA on sonoff allows to use both a button and a switch on GPIO14! However, i would have to do a lot of rewiring in order to connect the existing deviators to the sonoff

@ everybody: is there any other solution, like with a sensor to measure power consumption and report to the server whether the light is on or off, regardless of which button triggered the on/off?

Thank you again.

In this case have a look at Shelly, those switches can run tasmota as well, however as I understand the description they can be wired in conjunction with your actual switches.
The main problem migth be that they are sold out atm.

I’m hoping to get some Shellys as well. I believe they released an update to their native firmware that supports MQTT natively so one doesn’t have to flash to Tasmota unless you want to. Support is only beta but the fact that they are adding this to their firmware shows this is a company that understands what we want instead of fighting against us.

Another option I could come up with is to use any sonoff with tasmota and then amazon dash buttons to control the sonoff. Is there any other option apart from the amazon dash buttons that you could think of?

Thanks for the brain-picking :slight_smile:

I have also found this product (I am sorry it is in Italian) which allows to monitor the consumption of energy. This could be an input for the server to understand whether the light is on or off, and it could be added as a third or fourth deviator in a normal 2 or 3 deviators setup. What do you think?

If you consider this a solution, I would pick a remote device that does not rely on the working Wi-Fi.
A sonoff RF for example can be switched by a RF remote, and this would work even if the WiFi is down.

Received two Shelly 1 yesterday and did firmware update straight away. Native MQTT support, even disabling Shelly cloud access. Hope to get them in place next week :wink:

2 Likes

Could you please explain a bit more what you mean with multiple deviators controling your lamps.
Wiring diagramm e.g. ?
I have several lamps in my corridors which are controlled by 2 switsches each. In that case my Shelly device will be placed at the switch which has direct connection to the lamp. Switching in Shelly can be configured to be an edge switch, something like a toggle. So lamp is controllable by openHAB an still the two physical switches.

Guys, thank you so much for the support.
@hmerk: here is a wiring diagram1 of the current state for reference: immagine

I was thinking to use another relay placed in parallel as if it were a third deviator like the ones in the diagram so it would simply work like this diagram2 [sorry, I am allowed to post only one picture, I will link this one]: http://www.elektro.it/impianto_appartamento/impianto_appartamento_img/impianti_civili_15.gif
This relay would be controlled by a simple sonoff POW with a current sensor.
By doing this I would achieve all the objectives:

  1. No new cabling in the wall or mess up the current wiring diagram;
  2. Everything would work offline witout wifi as well, I could simply use one of the other two physical deviators;
  3. The server would know when the light is on even if the light were to be turned on by a physical deviator thanks to the power consumption measured by the sonoff POW (the product I linked before)

Do you think it makes sense? Do you think that with a Shelly I could achieve the same result (with less effort!)?

Thank you again!

Just a quick answer from my phone. It looks basically like my wiring, so no need for additional effort, just one shelly needed. I will have a closer look and try to add the shelly wiring to your diagramm.

@hmerk: awesome! Thank you so much :slight_smile:

One further question, do you have a hot wire (L) near the nearest switch to the lamps? Cause this is mandatory for the shelly to work. In my case, I can place them behind a switch combination where „single“ switches are in place es well. So I have hot and switched wires (L) in my wall boxes.

I am not sure yet (house is WIP), I guess not in every box. However, they put large corrugated pipes (if that’s what they are called in English) so it sould be fine to fit another wire in there!

Ok now, I have my first Shelly-1 in place, controlled via openHAB and two physical switches.

Wiring:

In Shelly settings (original firmware) configure your switches to EDGE switch (last option),

Works as expected and state in openHAB reflects real lamp state, no matter if one of the switches was used or openHAB.

2 Likes

Amazing! I just ordered a pack of 4, can’t wait to check them out.
Thanks a lot for helping and for the detailed wiring diagram.

Glad if I could help.

Hi,

Would you be willing to share Shelly 1 items config as I’m having issues getting mine to work, I’ve configured a local mqtt broker and the basic testing works but I cant get the switch to be controlled by openhab.

This is my test items file

Switch MQTT_Test "Shelly 1" { mqtt="<[mqttbr1:shellies/shelly1-059665/relay/0:state:default], >[mqttbr1:shellies/shelly1-059665/relay/0/command:command:ON:1], >[mqttbr1:shellies/shelly1-059665/relay/0/command:command:OFF:0]" }

If I turn the siwtch On/Off via the switches app/web service I can see the following errors in the openhab.log file but not sure how to fix

2018-10-17 19:27:50.663 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'MQTT_Test'
2018-10-17 19:28:08.485 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn't post update for 'MQTT_Test'

Should add I’m very new to MQTT so this is possibly just a noob issue.

Cheers

Kevin