Shelly Plus 1 MQTT not working

I’ve just installed a bunch of shelly plus 1’s. Configured MQTT but cant see them in home assistant.

image

this is after restarting the MQTT broker.
Ensuitelight is a Tasmota device

They don’t do ‘home assistant auto-discovery’, you have to manually define them in .yaml

1 Like

Manual definition is pretty straightforward. Here’s my Shelly 1PM switch (under switches:):

- platform: mqtt
  name: "Immersion switch relay"
  unique_id: 31ba14ba-0c7a-4e2b-9621-92856965edfa
  command_topic: "shellies/shelly1pm-xxxxxx/relay/0/command"
  payload_on: "on"
  payload_off: "off"
  state_topic: "shellies/shelly1pm-xxxxxx/relay/0"
  state_on: "on"
  state_off: "off"

and some of its sensors (under sensors:):

- platform: mqtt
  name: "Immersion switch relay state"
  unique_id: 25f826cc-08aa-4018-9004-456614dd23a8
  state_topic: "shellies/shelly1pm-xxxxxx/relay/0"

- platform: mqtt
  name: "Immersion switch switch input"
  unique_id: 4d973a01-6229-4e16-b276-17e191f0c522
  state_topic: "shellies/shelly1pm-xxxxxx/input/0"

- platform: mqtt
  name: "Immersion switch temperature"
  unique_id: 4ca71dd5-645d-48e5-a387-a655cc7dd42e
  state_topic: "shellies/shelly1pm-xxxxxx/temperature"
  unit_of_measurement: "°C"
  device_class: temperature

- platform: mqtt
  name: "Immersion switch power"
  unique_id: 44f6d6de-be45-4697-8ff9-882fae91c6a1
  state_topic: "shellies/shelly1pm-xxxxxx/relay/0/power"
  unit_of_measurement: "W"
  device_class: power

Thanks. I didn’t know they aren’t auto discovered.

I found a HAAS integration that works pretty well for shelly auto discovery, but doesn’t support the new shelly plus devices (yet)

Did you ever get this fixed? I just installed one and although I set it up as suggested I cant see it in the mqtt broker.
My shelly 1’s show up fine when I listen in mqtt broker but the shellyplus1 just doesnt show there its all configured correctly and says its connected to mqtt but as I say I cant see it.

Yes.
The Shelly for HAAS HACS integration version 0.3.1 beta 2 includes discovery for the plus 1 devices

1 Like

Can I ask you why you would use a MQTT broker instead of the official integration (which I believe uses CoAP/CoIOT)?
I’m asking because I am about to install many Shelly 1 Plus myself and looking for the best solutions.

I am just installing my first PLUS Shelly device (1PM Plus) and found that CoAP / CoIoT not part of the software any longer!!
It seems that Shelly has discontinued support, which is being replaced by Sockets (Websockets) and/or MQTT.
As I have set-up everything with unidirectional CoAP I am currently not sure how to integrate these new PLUS Devices using HomeAssistant - ShellyForHass .

hello, shelly plus use Gen 2 Device API.

https://shelly-api-docs.shelly.cloud/gen2/

This is an example of how I have it configured, I have used shellies/hall as a topic :

- platform: mqtt
  unique_id: switch.hall
  name: Hall
  icon: mdi:lightbulb-outline
  state_topic: shellies/hall/status/switch:0
  state_on: true
  state_off: false
  value_template: "{{ value_json.output }}"
  command_topic: shellies/hall/rpc
  payload_on: '{"id":20, "src": "shellies/hall/homeassistant", "method": "Switch.Set", "params":{"id":0,"on":true}}'
  payload_off: '{"id":20, "src": "shellies/hall/homeassistant", "method": "Switch.Set", "params":{"id":0,"on":false}}'
  qos: 1
  optimistic: false

On the other hand I have configured a sensor through api-rest:

- platform: rest
  name: "hall_rssi"
  resource: http://192.X.X.X/rpc/Wifi.GetStatus
  device_class: signal_strength
  value_template: "{{value_json.rssi}}"
  unit_of_measurement: dBm
1 Like

I’m having issues with my plus 1 which is coming up but its unavailable in hass, but working via the app etc.

I’m using the latest version of Shelly for HAAS HACS integration & the beta firmware (lastest) for my plus 1.

1 Like