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

Do you know about the new Shelly Pro 4PM? It’s the first unit of the Shelly Pro Series?

It has Wifi & LAN and MQTT support.

They will start selling in 1st of october and they are accepting pre-orders.

1 Like

“Manufacturing facilities”. I would enjoy these at home too :slight_smile: . Especially as it has ethernet.

Hello I have this shelly pro 4pm but i try to use it with Home assistant !
Someone have the code for the mqtt command ?
Thanks

Mine still has not shipped.

for switch i try this :

 - platform: mqtt
   name: "Shelly 4Pro PM Relay 0"
   unique_id: "shelly4pmpro-84CCA87E46F8-switch-0"
   command_topic: "shelly4pmpro-84CCA87E46F8/rpc"
   payload_on: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 0, "on": true}}'
   payload_off: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 0, "on": false}}'
   state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:0"
   value_template: "{{ value_json.output }}"
   state_on: true
   state_off: false
   qos: 1   
 - platform: mqtt
   name: "Shelly 4Pro PM Relay 1"
   unique_id: "shelly4pmpro-84CCA87E46F8-switch-1"
   command_topic: "shelly4pmpro-84CCA87E46F8/rpc"
   payload_on: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 1, "on": true}}'
   payload_off: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 1, "on": false}}'
   state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:1"
   value_template: "{{ value_json.output }}"
   state_on: true
   state_off: false
   qos: 1   
 - platform: mqtt
   name: "Shelly 4Pro PM Relay 2"
   unique_id: "shelly4pmpro-84CCA87E46F8-switch-2"
   command_topic: "shelly4pmpro-84CCA87E46F8/rpc"
   payload_on: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 2, "on": true}}'
   payload_off: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 2, "on": false}}'
   state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:2"
   value_template: "{{ value_json.output }}"
   state_on: true
   state_off: false
   qos: 1   
 - platform: mqtt
   name: "Shelly 4Pro PM Relay 3"
   unique_id: "shelly4pmpro-84CCA87E46F8-switch-3"
   command_topic: "shelly4pmpro-84CCA87E46F8/rpc"
   payload_on: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 3, "on": true}}'
   payload_off: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 3, "on": false}}'
   state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:3"
   value_template: "{{ value_json.output }}"
   state_on: true
   state_off: false
   qos: 1      

for sensor :

   ############################################################
   ##                                                        ##
   ##                     Sensor Shelly Cabane               ##
   ##                                                        ##
   ############################################################
###### Voltage 1
  - platform: mqtt
    name: “Voltage cabane Sw1”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:0"
    unit_of_measurement: “V”
    value_template: "{{ value_json.voltage }}"
###### Voltage 2
  - platform: mqtt
    name: “Voltage cabane Sw2”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:1"
    unit_of_measurement: “V”
    value_template: "{{ value_json.voltage }}"
###### Voltage 3
  - platform: mqtt
    name: “Voltage cabane Sw3”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:2"
    unit_of_measurement: “V”
    value_template: "{{ value_json.voltage }}"
###### Voltage 4
  - platform: mqtt
    name: “Voltage cabane Sw4”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:3"
    unit_of_measurement: “V”
    value_template: "{{ value_json.voltage }}"
    
###### Power 1
  - platform: mqtt
    name: “Puissance cabane Sw1”
    unit_of_measurement: “W”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:0" 
    value_template: "{{ value_json.apower }}"
###### Power 2
  - platform: mqtt
    name: “Puissance cabane Sw2”
    unit_of_measurement: “W”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:1" 
    value_template: "{{ value_json.apower }}"
###### Power 3
  - platform: mqtt
    name: “Puissance cabane Sw3”
    unit_of_measurement: “W”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:2" 
    value_template: "{{ value_json.apower }}"
###### Power 4
  - platform: mqtt
    name: “Puissance cabane Sw4”
    unit_of_measurement: “W”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:3" 
    value_template: "{{ value_json.apower }}"

###### Energy 1
  - platform: mqtt
    name: “Consommation cabane Sw1”
    unit_of_measurement: “kWh”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:0" 
    value_template: "{{ value_json['aENERGY'].Total }}"
 
###### Energy 2
  - platform: mqtt
    name: “Consommation cabane Sw2”
    unit_of_measurement: “kWh”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:1" 
    value_template: "{{ value_json['aENERGY'].Total }}"
 
###### Energy 3
  - platform: mqtt
    name: “Consommation cabane Sw3”
    unit_of_measurement: “kWh”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:2" 
    value_template: "{{ value_json['aENERGY'].Total }}"
 
###### Energy 4
  - platform: mqtt
    name: “Consommation cabane Sw4”
    unit_of_measurement: “kWh”
    state_topic: "shelly4pmpro-84CCA87E46F8/status/switch:3" 
    value_template: "{{ value_json['aENERGY'].Total }}"
2 Likes

Now integrated with Home Assistant Core 2021.10.0 and working perfectly.

1 Like

Did you do anything specifically to get it discovered, I have tried almost anything and it is still not shown, I have other shelly products that are discovered nicely and I am running the latest 2021.10.6

There are still some bugs. If you activate the deactivated sensors, you quickly lose everything else…

Maybe do you know, how to also set up MQTT for input sensors.

I can control MQTT output 1 to 4, but I also need information on input, as I will use device as detached mode, so that I will just to check inputs independetly…

Thank you…

So… that I write correctly, I would like also saw the state of input 1, 2, 3, 4 as binary_sensor via mqtt protocol.

As I am aware this can be done as the same thing is working on Shelly 2.5, but via HA integration or Shelly4HASS, where Shelly Pro 4PM is yet not supported…

Anybody achieve this?

As of today this is working via auto discovery with the most up to date (non beta) Shelly firmware: 20210921-202058/0.8.1-g52de872 and HA core version: core-2021.11.4

This gives switch control and power readings, however the default disabled entities such as binary sensors to indicate input state and voltage sensors are not working.

If anyone has success in getting this working please let us know.

For inputs use binary_sensor:

  - platform: mqtt
    name: "Shelly Pro 4PM Input 1"
    state_topic: 'shellypro4pm-XXXX-kabinet/events/rpc'
    value_template: >- 
      {% if ('input:0') and ('long_push') in value %}   
        {{'ON'}}
      {% elif ('input:0') and ('single_push') in value %}   
        {{'ON'}}
      {% elif ('input:0') and ('btn_up') in value %}   
        {{'OFF'}}
      {% else %}
        {{ states('binary_sensor.shelly_pro_4pm_input_1') }}
      {% endif %}
  - platform: mqtt
    name: "Shelly Pro 4PM Input 2"
    state_topic: 'shellypro4pm-XXXX-kabinet/events/rpc'
    value_template: >- 
      {% if ('input:1') and ('long_push') in value %}   
        {{'ON'}}
      {% elif ('input:1') and ('single_push') in value %}   
        {{'ON'}}
      {% elif ('input:1') and ('btn_up') in value %}   
        {{'OFF'}}
      {% else %}
        {{ states('binary_sensor.shelly_pro_4pm_input_2') }}
      {% endif %}
  - platform: mqtt
    name: "Shelly Pro 4PM Input 3"
    state_topic: 'shellypro4pm-XXXX-kabinet/events/rpc'
    value_template: >- 
      {% if ('input:2') and ('long_push') in value %}   
        {{'ON'}}
      {% elif ('input:2') and ('single_push') in value %}   
        {{'ON'}}
      {% elif ('input:2') and ('btn_up') in value %}   
        {{'OFF'}}
      {% else %}
        {{ states('binary_sensor.shelly_pro_4pm_input_3') }}
      {% endif %}
  - platform: mqtt
    name: "Shelly Pro 4PM Input 4"
    state_topic: 'shellypro4pm-XXXX-kabinet/events/rpc'
    value_template: >- 
      {% if ('input:3') and ('long_push') in value %}   
        {{'ON'}}
      {% elif ('input:3') and ('single_push') in value %}   
        {{'ON'}}
      {% elif ('input:3') and ('btn_up') in value %}   
        {{'OFF'}}
      {% else %}
        {{ states('binary_sensor.shelly_pro_4pm_input_4') }}
      {% endif %}

And is tested and working…

Is Power Reading working through the Shelly integration or do you need to use MQTT?

Power reading is working as is the Energy reading, however the Energy reading resets to zero on each reset of the Shelly. Sorry it took a while to reply, I haven’t actually installed this yet (just bench tests so far) and I wanted to test a high current appliance. My multimeter (which I find pretty accurate) is giving 1669W rather than the Shelly’s 1738W so I think it is over recording by about 4%, but will certainly do for my purposes.

This thread has been very helpful for setting up my shell 1 plus (2nd gen shelly 1) devices. The mqtt commands and status topics are the same as the ones for the Shelly Pro 4PM

My device is working om MQTT. Only issue is: when I switch the light on, the button moves after 2-3 seconds to off state automatic.
Any suggestions??

image

#############################################

Switch 2 = Button 3; Ingang voorzijde

#############################################

  • platform: mqtt
    name: “Pro4-button-3”
    unique_id: “shellypro4pm-84cca87f11dc-switch-2”
    command_topic: “shelly-4pro/rpc”
    payload_on: ‘{“id”: 1, “src”:“homeassistant”, “method”: “Switch.Set”, “params”: {“id”: 2, “on”: true}}’
    payload_off: ‘{“id”: 1, “src”:“homeassistant”, “method”: “Switch.Set”, “params”: {“id”: 2, “on”: false}}’
    state_topic: “shellypro4pm-84cca87f11dc/status/switch:2”
    value_template: “{{ value_json.output }}”
    state_on: true
    state_off: false
    qos: 1

#############################################

Switch 3 = Button 4; Zijkant huis

#############################################

  • platform: mqtt
    name: “Pro4-button-4”
    unique_id: “shellypro4pm-84cca87f11dc-switch-3”
    command_topic: “shelly-4pro/rpc”
    payload_on: ‘{“id”: 1, “src”:“homeassistant”, “method”: “Switch.Set”, “params”: {“id”: 3, “on”: true}}’
    payload_off: ‘{“id”: 1, “src”:“homeassistant”, “method”: “Switch.Set”, “params”: {“id”: 3, “on”: false}}’
    state_topic: “shellypro4pm-84cca87f11dc/status/switch:3”
    value_template: “{{ value_json.output }}”
    state_on: true
    state_off: false
    qos: 1