Connecting Boards Over Ethernet to Control LED Lamps

I'm attempting to make two long distances lamps for my girlfriend and me. The basic concept is a pushbutton connected to an Arduino is pressed and activates one lamp. I then need for the other lamp which will be hundreds of miles away to also then light up. This is my first time attempting a project such as this, so I'm definitely very inexperienced. The concept in my mind sounds simple but may not be in theory. Both lamps need to be able to communicate back and forth to one another in order to light. When one is pressed and the lamp activates, I need a way to send a signal over the internet that one lamp has been turned on. When one lamp has been turned on the other receives this signal and also turns on. Both lamps need to be able to send and receive the signal. So if one of us turns on the lamp the other can too and likewise with turning it off. Either lamp could turn off the other. I'm not sure exactly how the signal can be sent or received is my biggest problem.

Quantum entanglement makes this project easy peasy.

You could easily do this using the MQTT protocol on a pair of Wemos D1 mini's (compatible with the Arduino IDE), and a public MQTT Broker.

SteveMann:
You could easily do this using the MQTT protocol on a pair of Wemos D1 mini's (compatible with the Arduino IDE), and a public MQTT Broker.

This is a cunning plan, because it avoids the hassle of needing a static IP or dynamic dns service. It also avoids the need to poke a hole in your router's firewall.

Listen to @SteveMann the MQTT approach will be the best solution here…

SteveMann:
You could easily do this using the MQTT protocol on a pair of Wemos D1 mini's (compatible with the Arduino IDE), and a public MQTT Broker.

@StevenMann can it be done using an ethernet module such as the ENC28J60 instead of a Wemos D1 mini's. Also, how does one set up an MQTT broker, I've heard of them, but never understood how to use one.

The ENC28J60 takes care of ethernet, but you need a microprocessor as well. The Wemos Steve suggested gives you both (well wifi instead of ethernet) for cheap.

Check Adafruit iot for MQTT tutorials and a broker you can use.

rmorrill9956:
@StevenMann can it be done using an ethernet module such as the ENC28J60 instead of a Wemos D1 mini's. Also, how does one set up an MQTT broker, I've heard of them, but never understood how to use one.

Whatever you want to connect to the internet will work.
You wont be setting up the MQTT broker yourself... (but you can using a RaspberryPi or a PC..etc)
You would be using a public (or private) cloud based MQTT broker/server (service)..
Example: