MQTT & Shelly - How to (please)

Hi.

I’d be most grateful for any advice on how I can have my emonhub (emonSD on a Pi-v3) read a Shelly (Pro4PM, in this specific case).

I’ve configured the Shell’s mqtt as follows:
MQTT PREFIX: emon/shellypro4pm-1-cu2
Server: [IP of emonCMS]
Client ID: shellypro4pm-1-cu2
Username / Password: default emonHUB information.

The Inputs being picked up are:
“online”
“events_rpc”

Using MQTT Explorer, I can see 2 topics (online & events_rpc), and messages being sent.

And here’s the message from “events_rpc”:

{"src":"shellypro4pm-30c6f7842608","dst":"emon/shellypro4pm-1-cu2/events","method":"NotifyStatus","params":{"ts":1679399400.86,"switch:3":{"id":3,"aenergy":{"by_minute":[0.000,0.000,0.000],"minute_ts":1679399399,"total":0.000}}}}

I’m out of my depth here, so any “mqtt/emonhub/shelly-4-dummies” pointers would be welcome.

Thanks in advance

Roland

As the mqtt topic format of the shelly is not compatible with the emonhub, you will have to use some intermediate “translator”.

I am using Node Red. It reads from the Shelly and publishes a new, simplified mqtt topic for emonhub.

1 Like

Thanks for the pointers.

Oh dear. It seems another “4-dummies” is needed.

Thanks again, though.

If you search this forum for “Node Red mqtt shelly” you will find examples for that part, although for older Shelly devices.
For Node Red you need another computer to run as the software. The Pi running the emoncms software is not designed for this task.