I read the documentation of the new integration with mqtt but I can’t figure out what topic to use in the switch or sensors.Completely different from the old shelly models. Can anyone help me with this?
Run MQTT Explorer to see topics yourself
I have started mqtt explorer but the arguments are completely different from the old shellys and I cannot interpret them.
{“src”:“shellypro4pm-xxxxxxxxxx”,“dst”:“shellypro4pm-xxxxxxxxx/events”,“method”:“NotifyStatus”,“params”:{“ts”:1629930616.75,“switch:0”:{“id”:0,“apower”:11.98}}}
{“src”:“shellypro4pm-xxxxxxxxxx”,“dst”:“shellypro4pm-xxxxxxxxxx/events”,“method”:“NotifyStatus”,“params”:{“ts”:1629930616.11,“switch:0”:{“id”:0,“output”:true,“source”:“switch”,“voltage”:240.05}}}
when one channel is on
{“src”:“shellypro4pm-xxxxxxxxxxxx”,“dst”:“shellypro4pm-xxxxxxxx/events”,“method”:“NotifyStatus”,“params”:{“ts”:1629930646.46,“switch:0”:{“id”:0,“apower”:0,“output”:false,“source”:“switch”,“voltage”:0}}}
{“src”:“shellypro4pm-xxxxxxxxx”,“dst”:“shellypro4pm-xxxxxxxxxxx/events”,“method”:“NotifyStatus”,“params”:{“ts”:1629930660.80,“switch:2”:{“id”:2,“aenergy”:{“by_minute”:[0.000,0.000,0.000],“minute_ts”:1629930659,“total”:0.000}}}}
when the same channel is off
I found that if you select “Generic status update over MQTT” on your EM Pro, you then can use something like this:
name: "Household Apparent Power"
unique_id: "household_floor_apparent_power"
unit_of_measurement: "VA"
icon: mdi:lightning-bolt-circle
state_topic: "shellies/shellyem3pro-metter/status/em:0"
value_template: "{{ value_json.a_aprt_power }}"
Hope it helps.