Most traditional street lighting systems rely on simple astronomical timers or photocells. They are essentially "blind" and "dumb." When a light goes out or a relay fails, maintenance crews only find out through citizen complaints.
We can fix this without having to rip out all the electrical infrastructure. Or we can retrofit existing control cabinets with an edge computing gateway. You can connect traditional electrical contactors to modern cloud platforms (AWS, Alibaba Cloud) with MQTT and JSON using a 4G LTE I/O controller.
For this build, I'm using the Valtoris 8CH-IO-LTE. It's an industrial-grade gateway that packs 8 digital inputs, 8 analog inputs, and most importantly for our project, 8 Relay Outputs (DO) rated at 5A@AC250V.
- Powering the Node: Connect a stable 24V DC power supply to the
DC 9-24Vterminals. - Wiring the Contactor: We are not going to drive the street lights directly through the gateway. Instead, we wire the coil of an AC Contactor to the
DO1terminals (RandL). When DO1 closes, it triggers the contactor, which handles the heavy AC load of the street lights. - Antenna: Screw on the 50Ω SMA LTE antenna to ensure a stable cellular connection inside the metal control cabinet.
To make this edge device talk to the cloud, we need to configure its 4G module. Connect the gateway's 485-4G port to your PC using a USB-to-RS485 converter.
Open the configuration tool (baud rate: 115200, 8N1). Log in using the default key: 666666.
Configure the MQTT client by going to the Advanced Parameters:
- Type of Work: MQTT
- MQTT Version:
V3.1.1 - Client ID / User Name / Key: Enter your cloud provider's credentials.
- Topic:.../user/test (To receive ON/OFF commands from cloud) Subscribe
- Publish Topic:
.../user/1(Used to push sensor data and relay status to the cloud)
Normally, dealing with Modbus RTU requires writing complex parsing scripts on your cloud server. One of the neatest features of this specific gateway is its built-in JSON parser. It can automatically poll Modbus registers and wrap the raw HEX data into a clean JSON format before transmitting it over LTE.
In the JSON To Modbus RTU Settings:
- Set the data transmit interval to
1000ms. - Add a JSON node corresponding to the Modbus register of the light sensor or power meter.
- Assign a JSON Keyword (e.g., "Streetlight_Voltage").
Instead of receiving obscure hex codes like 01 03 02 00 B9 D4, your cloud server will directly receive structured data.
Once the configuration is saved and the device is rebooted, the 4G LINK LED will turn solid blue.
If we check our cloud provider's Log Service (in this case, Alibaba Cloud IoT), we can see the gateway successfully publishing the JSON payloads:
[
{"1": 1, "2": 2, "10": 10, "15": 15},
{"Light_Status": 1, "System_Temp": 35}
]To turn on the street lights remotely, we simply publish a message with the payload TEST (or your defined hex trigger) to the Subscribe Topic. The gateway receives it, closes DO1, the AC contactor snaps shut, and the street lights illuminate.
We have successfully retrofitted a legacy lighting cabinet with real-time remote control and telemetry by adding a single 4G I/O controller. This architecture scales well to hundreds of cabinets across a city, without writing a single line of embedded C code.




Comments