Looking to redesign some light switches

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
dbemowsk
Normal user
Posts: 46
Joined: 06 Aug 2017, 22:27

Looking to redesign some light switches

#1 Post by dbemowsk » 30 Apr 2023, 04:54

So my automation setup is kind of a mix of things which are all run through an old Vera Plus home controller. I have light switches that I built that run off of the MySensors framework:
https://forum.mysensors.org/topic/4317/ ... 2822740637

I am wondering if I can convert these to use ESP Easy run from maybe a NodeMCU board or other ESP8266 or similar board. Currently the MySensors framework that I use on these runs an NRF24L01 radio network to communicate with the Vera controller, and some of the switches that are quite a ways away from the main controller in my basement can be a bit flaky at times and I am wondering if running them off of WiFi would be better.

My lights and ceiling fans around the house I currently run from Sonoff Basic modules with ESP Easy flashed to them, and those seem to work well. That was why I thought about converting them.

Any guidance people can give would be great.

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Looking to redesign some light switches

#2 Post by Ath » 12 May 2023, 22:12

ESPEasy is quite good at supporting switches like those, it just is a matter of having enough GPIO pins available to connect all those switches. It could be helpful to use an ESP32 board, as that has more available GPIO pins for connecting those, or when using an ESP8266 board (prices on Aliexpress aren't that different, and ESP32 family is the future) you might want/need to add an extension board like a MCP23017 or PCF8574 for connecting all those switches. From there on it should be rather easy to use these states to enable/control lights etc.
/Ton (PayPal.me)

dbemowsk
Normal user
Posts: 46
Joined: 06 Aug 2017, 22:27

Re: Looking to redesign some light switches

#3 Post by dbemowsk » 13 May 2023, 07:58

Thanks for the response. The current way I am using the switches I have is that when I push a button on the switch, that communicates down to my Vera Home Controller in the basement, and then the Vera sends the command to the light/fan to turn on or off. I do find it pretty amazing that that whole process for turning a light on is near instantaneous. For what it has to do to turn on the light I pretty much see no delay unless I turn a device on and then immediately off, or vice versa, then sometimes there ca be a significant delay. The issue with controlling things this way is that if my Vera box has an issue, those switches will not work. SO.... Is there a way if I built these, for the switch to communicate directly with the light/fan to operate it without the Vera controller. Also, if the Vera did loose connection for a period of time, and the lights were operated, How can I have the vera controller get the current state of the devices?

User avatar
Ath
Normal user
Posts: 3483
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Looking to redesign some light switches

#4 Post by Ath » 13 May 2023, 10:31

Well, that sounds roughly like my setup, and mode of operation; I want my, non-tech, mother in law to be able to operate the lights when she would take care of our house :lol: Suggesting that each button should be able to operate without the main home controller available ;)

Usually, to achieve this is by operating the button and device (pump, fan, light-source) from the same ESP (in my case), and there can of course be multiple button/output device per ESP, and logically connect those to a home controller using MQTT.
Couldn't determine from my google searches if the Vera controller supports MQTT, so that may be a challenge 8-)

My setup uses Domoticz as the home controller, (when I'd have to start from scratch I'd go for Home Assistant), and ESPEasy has, besides both a HTTP and MQTT controller to connect to Domoticz, also a Domoticz MQTT Helper, that documents the preferred way of setting up a 2-way connection between the controller and a button (with its output device).
A similar setup can be achieved with a Home Assistant (or other MQTT-based) home controller and the Home Assistant/OpenHAB MQTT controller in ESPEasy. (Though that's not (yet) documented in the same detail.) That ESPEasy - HA controller has the most features in handling MQTT and commands.
The essence of that setup is to let ESPEasy control the state of the button to the output, and let it also send/receive the button state to/from HA.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests