Momentary switches with standard wall switch material and ESP8266 and MQTT

Hi,
I am looking for a way to control my smart lights (Philips hue) in my new house with standard wall switches (momentary type) without having to mount other switching material that looks different than all other stuff in home. This simply would not get a high WAF and thus would not end up being usable.

Features the wall switches should have are:

  • turn on / off
  • dimming (optional but should be possible with short long / long press / double press)

There are a few options I know about and the cons:

Zwave wall switches: I did not find any with my type of wall switch cover (Busch Jaeger Balance SI) if this does exist this would be my preference because there is no need for any modding involved. Doe anyone know if there is a module that exist which you can use with busch jaeger covers?

Option 2 would be to go DIY: Using either a sonoff (which does not fit in a dutch wall switch box) OR a D1 mini, Hilink 220 to 5V power-supply and a double momentary switch.
With this option I could run Tasmota on the ESP and connect the momentary switches to control the lights using MQTT and HA.

Question to the community. Would you go DIY or are there other ways to do this? Any help is appreciated

1 Like

There are plenty of zwave switch modules that fit in a standard wall box and use your existing switches.

e.g.

Aeotec. There’s a dimmer module too.

Fibarro there’s dimmer module and higher current (relay) version too.

Both can use toggle or momentary switches. You do require a neutral wire at the module though.

1 Like

Thanks tom. that might also work. They are quite expensive. Would i also be able to use these just to send a switch command 2 gang to HA to switch my HUE lights on and even dimming them?

Philips Hue is Zigbee based - why are you looking for zwave switches?

Hello,
This is a CE approved switch you can built into the wall. The standard API is open and it can be controlled via a REST API call. You can also flash it with Tasmoto opensource MQTT software. Inside there is an esp8266.
You can connect an existing bulb and an existing wall switch to it.

All this for just 9 euros.

https://shelly.cloud/shelly1-open-source/

2 Likes

Hi,

Maybe you can use a wemos mini D1 https://www.google.com/search?q=wemos+d1+mini+pro&ie=utf-8&oe=utf-8&client=firefox-b, with firmware that uses MQTT, like this one:

https://www.letscontrolit.com/

Using this firmware, you can make a mesh about other wemos devices with this firmware, and maybe send the status of each one.

I have a friend that used this with Philips hue bulbs!

I will search if he has somthing here in forum!

I missed that. No, zwave would be unsuitable for these lights. They would only be able to switch them on and off at the power source. A bit like cracking a walnut with a sledgehammer.

@heldopsokken

I found the cheap solution of my friend.

Here you have it:

https://community.home-assistant.io/t/mqtt-button-using-esp8266/45/39?u=garvarma

1 Like

I have a dutch wall switch with 4 buttons from the brand Peha (quite common in the Netherlands).
I fitted a 230v AC-DC 5v buck converter a wemos D1 mini with a custom made shield in the Dutch switch box.
I have printed a custom plate which where the Peha frame can fit back on, it furthermore has 4 momentary switches a RGB light and a temp sensor (black thing on the left).
Each button triggers and automation in HA.
The RGB light flashes when a friend goes online through the Steam component (each friends his own color, yes I have 3 friends on stream, haha)
The temperature sensor is useless for measuring the room as the buck and wemos generate a lot of heat.
The wall plate is designed for my own 3D printer with 0.8mm nozzle, so would probably not be good for any other… However, you can get an idea what I did and try (trial and error) yourself if you have your own 3D printer Find a link here to the OnShape part which you can copy and alter.

I used my own code as I like programming myself.
You can find it here.

I am actually a little proud about the result, but never made time to share it through the share project section.

Let me know if you want to know more.

5 Likes

Hi,
I’m impressed! Thanks for sharing.
This is indeed what I had in mind for the DIY route.
I am however a bit concerned with regards to safety because of the buck converter generating heat. What is the average temperature in the box? Regardless you could also use the temp sensor with a relay for additional safety if the temp inside the switchbox is getting too high.

I do really like your end result since it fits in the regular wall switches and thus would get a big WAF.

I saw that there is a shield on the wemos. Is this a custom one? Could you share your circuit?

1 Like

Hi Tom, The zwave switch would only be sending messages to HA for each different type of button press. HA would than handle Hue lights via the Hue bridge.

@garvarma: Thanks a lot for sharing!
I am familiar with espeasy. This is one of the more popular firmwares available. In fact I am using it for some of my sensors reporting their data via MQTT to HA.

@docbobo: Zwave is not a hard requirement.

I am aware that Hue uses zigbee, but this is not relevant for me.
Only hard requirement is that I need to be able to switch and scene my hue lights with the switches and that I do not like the switches to look different than my other wall switches at home. I prefer to have HA orchestrate my automations based on the keypresses.

@rhannink: I recently read about the shelly. Does the shelly support using momentary switches?
I will need to investigate a bit more but since this has a CE approval it could be a good solution.

Thanks tom.
Did not know the Aeotec module. Could be interesting.
I am familiar with the fibaro modules but always found these a bit expensive for the purpose.

1 Like

The shelly is designed to work with mains voltage, could you use them with momentary switches as well?
If this is possible and by changing the firmware to have different keypresses (short/long/double) detected and send a different mqtt message to HA. If this is true I will use these in my home.

The temperature that the DS18B20 sensor is reading was yesterday 30 degrees and my living room something like 24-25.
I am not sure a relay would also fit inside the box together with the rest and if it switches off, than the WAF factor will definitely be very low.
I am now running for probably a half a year and it is fine. No troubles even with the heatwave a month ago.

The shield is a custom one.
I didn’t write down the circuit. It is just buttons a RGB led and a DS18B20.

What is your exact situation? do you have 1 wall socket or 2?
I made another Peha switch plate for 2 which is much easier and cleaner.
It is the same buck converter, a wemos, a double SSR.
These components fit behind the regular double PEHA switch.
The wemos reads a state change of the switches and flips the SSR and pushes the MQTT message.
If HASS pushes a MQTT switch then the SSR also switched.
It has a very high WAF as it also works if HASS is down or in my case the DHCP from Ziggo. (still need to put a router between it).

The shelly switches have the existing wall switch connected to the GPIO of the ESP8266. So a momentary switch should also be possible. When you flash the Shelly with Tasmota firmware for example, you can tell via the webgui what kind of switches are connected via which GPIO pins.

I have ordered a shelly 1 and 2. Will need to wait until the new batch is produced as they are out of stock at the moment.