New Shelly Pro 4PM - wifi & LAN & MQTT - First of Shelly Pro Series

And my automation on Home Assistant startup:

# Shellies Announce
- id: '010'
  alias: Shellies Announce
  trigger:
    - platform: homeassistant
      event: start
    - platform: time_pattern
      hours: "/12"  # Modifying this if you are using Shelly Motion can drain your device's battery quickly.
  action:
    service: mqtt.publish
    data:
      topic: shellies/command
      payload: announce
  mode: single

# Shellies Discovery
- id: '011'
  alias: Shellies Discovery
  max: 999
  trigger:
    platform: mqtt
    topic: shellies/announce
  action:
    service: python_script.shellies_discovery
    data:
      id: '{{ trigger.payload_json.id }}'
      mac: '{{ trigger.payload_json.mac }}'
      fw_ver: '{{ trigger.payload_json.fw_ver }}'
      model: '{{ trigger.payload_json.model }}'
      mode: '{{ trigger.payload_json.mode | default }}'
      host: '{{ trigger.payload_json.ip }}'
  mode: queued

- id: '014'
  alias: Shellies Announce Gen2
  trigger:
    - platform: homeassistant
      event: start
  variables:
    device_info_payload:  "{{ {'id': 1, 'src':'shellies_discovery', 'method':'Shelly.GetConfig'} | to_json }}"
  action:
    - service: mqtt.publish
      data:
        topic: "shellypro4pm-kabinet/rpc"  # shellypro4pm-aabbccddeeff is a device ID
        payload: "{{ device_info_payload }}"

- id: '015'
  alias: "Shellies Discovery Gen2"
  mode: queued
  max: 999
  trigger:
  - platform: mqtt
    topic: shellies_discovery/rpc
  action:
  - service: python_script.shellies_discovery_gen2
    data:
      id: "{{ trigger.payload_json.src }}"
      device_config: "{{ trigger.payload_json.result }}"

- id: '016'
  alias: "Shellies Status Gen2"
  trigger:
  - platform: time_pattern
    minutes: "/15"
  - platform: homeassistant
    event: start
  action:
  - service: mqtt.publish
    data:
      topic: shellypro4pm-kabinet/rpc
      payload: "{{ {'id': 1, 'src':'shellypro4pm-kabinet/status', 'method':'Shelly.GetStatus'} | to_json }}"  # shellypro4pm-aabbccddeeff is a device ID

Have you tried looking at mqtt messages with some client like mosquitto-sub?

I tried to look with MQTT-Explorer… but if I’m honest don’t know what I’m doing :smiley:

I can paste what I get…

Great thread all - prompted me to buy one for research.

Has anyone any experience of feeding the sensor inputs (S1-4 / N) on the bottom of the Pro PMs with ultra-low voltage (5-12v)? Thinking along the lines of separating the sensors to run as ULV wall switches in a new build with the 240v relays being having relatively separate logic to run mains power.

Yours,

S.

Just one remark for the 4PM: all 4 lines must be on the same phase L. So it is not possible to connect multiple phases L1, L2, L3 to it.