Post about your Basic project here

Moderator: Mmiscool

User avatar
By budman1758
#62905 OK. Here is what I would like to accomplish. I live in an RV and have all 12v lighting most of which are on the ceiling. They all have a switch on them but the main problem is my beautiful wife is a bit on the short side and can't reach them without a bit of help. So i'm going to do a bit of wireless wizardry and make life easier for her.

The idea is an ESP-01 in each light to control a relay to turn on and off. These will be controlled by 2 separate switch panels that I'm gonna build. Each switch panel will have 8 to 10 momentary push buttons and an LED for each. The switch panels will most likely operate with a NodeMcu as the brain so to speak. I believe it will have enough GPIO for each of the buttons and LEDs. (20 mebbe?)

Here is how I would like it to operate. Press a button on the switch panel and the corresponding light goes on. Also the LED next to the button lights up also on BOTH switch panels. I will also have a manual switch on the light itself. I would like the LEDs on the switch panels to light and go out also.

The relay I'm using in each light is like one these.

All this relay needs is a momentary contact to toggle on or off. It even remembers on or off after power loss. I think that it will take both GPIO's on the ESP-01 to make this work. One to toggle the relay and the other to sense the output of the relay. I'm thinking this is what can be used to update the switch panel LEDs.

I am fairly sure I have the hardware side of this figured out but the software side is pretty hazy.

How hard would the coding for something like this be? Can basic be used for this? I have beer n pizza $$ for anybody to help me with the code on this. :D :D
User avatar
By trackerj
#62917 Why so many ESP unit's all over the place?

I would like better to have a centralised Switching point near the Fuses box ( some RV have even bigger space in the electrical box, can go near there and you have easy access to all circuits).

For "remote switch" you can use:

- another ESP8266 small board with a GPIO Expansion port and can make it portable around, for a smart WIFI switch solution. Even can be integrated with Domotica for a even "smarter" solution :)

Better wiring options and also easier to install /debug.

A quick solution can be build with:

- WIFI 8x MAINS Relays board for Home Automation


MPRSx8 Board can be powered up from MAINS or 12V, In the second case, just remove the MAINS integrated PSU and use the 12Vcc input connector:


- 16 GPIO lines extension board

Domoticz integration example:
You do not have the required permissions to view the files attached to this post.
User avatar
By Electroguard
#62921 Your bistable electrical switch solution is neat budman1758, but I'm not convinced that it's the best solution for your situation... because it does not use a mechanical relay, and requires connecting many thing together - flip-flop, esp module + resistors, 3.3v psu module, load diode (in case of fluorescent lights).

It may be as cost-effective but much easier to use a single-unit low-voltage wifi relay solution such as this...

You might find it a suitable solution straight out of the box, even if just as a temporary stop-gap until you reflash it with Esp_Basic at a later date to tailor it to do whatever you want.

Note that you could parallel wire the onboard button to provide simple extended local button operation in addition to the remote wifi control, likewise with the onboard leds.