Date: 2025-06-23
Status: MQTT-based Shelly Gateway → Server bridge is operational
The current protocol stack consists of:
The gateway starts a local Aedes MQTT broker. The Shelly Pro 3EM publishes JSON messages to this broker.
Example payload:
{
"src": "shellypro3em-a0dd6c9f4d5c",
"dst": "shellypro3em-a0dd6c9f4d5c/events",
"method": "NotifyStatus",
"params": {
"ts": 1750612659.62,
"em:0": {
"voltage": 234.2,
"current": 2.09,
"act_power": 100.9
}
}
}
The gateway flattens this structure and stores it as the most recent buffer.
The gateway connects to mqtts://nippari.com:60012
using TLS (no certificate check).
Once connected, the gateway:
ping
messages every 5 seconds to topic up/<gwmac>/<shprefix>
pong
from the server, enters state 3ping
from server, responds with pong
+ current buffer contentsAll nested objects in params["em:0"]
are flattened using prefix notation:
{
"src": "...",
"dst": "...",
"method": "NotifyStatus",
"ts": 1750612659.62,
"em:0_voltage": 234.2,
"em:0_current": 2.09,
...
}
This ensures the buffer is easy to parse and index.
down/<gwmac>
, Gateway replies to up/<gwmac>/<shprefix>