So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By robiv8
#84188 Hello, everyone,

I would like to build 2 small LED lamps which can be switched on at the push of a button.

Let's call the LEDs Knubbel
So Knubbel 1 has 2 buttons one to trigger the LED of Knubbel 2 and one to switch off the own LED. Knubbel 2 has the same.
Background is that I press the One button and on the Second knob the LED lights up, this lights up until you turn it off again. The other way around the same should be possible.
As each knubbel can trigger the other.

I have some ESP8266 lying around that I don't use. These I would take gladly for it. Power via USB is available. The 2 knobs are separated by about 3-5 meters and cannot be connected by cable. So via WiFi or BT would be the best.

I hope one understands what I mean.
Now I need some help how and where I can start.

Is there perhaps somewhere something similar at code where I can misuse.

Thank you

Translated with
User avatar
By QuickFix
#84199 Some reading that might get you going:
  • MQTT ("Message Queuing Telemetry Transport")
  • ITTT ("If This Then That")
  • Tasmota ("Theo-Arends-Sonoff-MQTT-OTA")
User avatar
By btidey
#84200 You could also just do it by using the ESP8266WebServer library on each one with a server.on routine that responds to a URL to control the LED from a URL request. Then use the ESP8266HTTPClient library to send the control URL request to the other device whenever the remote button is pushed.

This assumes you have a local router AP that both devices can connect to for standard communication. If not then you would need to run AP on one of the devices.