Shellies Discovery Script

Hello again,

I installed mosquitto and had the same behaviour

I finally got it working, it was much more simple than I thought, I think this is basic for MQTT users, but for begginers like me it was not obvious. Maybe this should be written in your prerequierements :

Don’t use GUI MQTT configuration, configure MQTT in yaml file to put the discovery variable to true :

mqtt:
broker: 192.168.xxx.xx
port: 1883
username: xxxxx
password: xxxxx
discovery: true
discovery_prefix: homeassistant

This is what was missing for me for this to work :

discovery: true
discovery_prefix: homeassistant

Now I have another issue with the auto discover script. Even with the retain label on, sensors are getting unavailable in HA. I tried to create the sensor manually in the configuration.yaml and I don’t have this issue (left sensors auto discovered with your script, right manual with configuration.yaml) :

Here is my yaml :

platform: mqtt
name: "Humiditée Chambre"
state_topic: "shellies/shellyht-58FA2E/sensor/humidity"
unit_of_measurement: '%'
expire_after: 86400
force_update: true
json_attributes_topic: "shellies/shellyht-58FA2E/sensor/humidity"

Regards,

Do I understand correctly that the graph for the sensor is drawn but the state is unvailable? ShellyH&T connects to the network only from time to time and that is why most of the time is unavailable.

New version: 0.4.3

Changelog:

  • remove availability topic for Shelly H&T
1 Like

yes correct, Shelly HT comes only online every 4 or 5 hours or when the temperature exceeds the preset value.

New version: 0.4.4

Changelog:

  • fix unit conversion for energy sensors

New version: 0.5.0

Changelog:

  • add support for Shelly2.5 (experimental - there is no official information about Shelly2.5 on API documentation page)

New version: 0.5.1

Changelog:

  • once again fix unit conversion for energy sensors (with firmware 1.4.9 Shellies send energy in Watt-minutes)

New version: 0.5.2

Changelog:

  • fix energy and power sensors per channel for Shelly2.5 (firmware 1.4.9-hotfix3 required)

hi there
i am getting this:
1555708733: |-- url=http://127.0.0.1:8080/superuser
1555708733: |-- data=username=homeassistant&password=&topic=&acc=-1&clientid=
1555708733: |-- aclcheck(homeassistant, homeassistant/sensor/shellyswitch25-745583-power-0/config, 2) SUPERUSER=Y by http
1555708733: |-- Cached [8FAF1EE9FECD4A4AE9EAA481207B0D021749FE3E] for (client id not available,homeassistant,2)
1555708733: |-- mosquitto_auth_acl_check(…, client id not available, homeassistant, homeassistant/sensor/shellyswitch25-73C369-energy-0/config, MOSQ_ACL_WRITE)
1555708733: |-- url=http://127.0.0.1:8080/superuser
1555708733: |-- data=username=homeassistant&password=&topic=&acc=-1&clientid=
1555708733: |-- aclcheck(homeassistant, homeassistant/sensor/shellyswitch25-73C369-energy-0/config, 2) SUPERUSER=Y by http
1555708733: |-- Cached [B6770B6E81BFBF31613F1CA6C951D8C6E2039D39] for (client id not available,homeassistant,2)
1555708733: |-- mosquitto_auth_acl_check(…, client id not available, homeassistant, homeassistant/sensor/shellyswitch25-745583-energy-0/config, MOSQ_ACL_WRITE)
1555708733: |-- url=http://127.0.0.1:8080/superuser
1555708733: |-- data=username=homeassistant&password=&topic=&acc=-1&clientid=
1555708733: |-- aclcheck(homeassistant, homeassistant/sensor/shellyswitch25-745583-energy-0/config, 2) SUPERUSER=Y by http
1555708733: |-- Cached [A698EDED0429C0B4B3681C064AAEA5E257D8FE69] for (client id not available,homeassistant,2)
1555708733: |-- mosquitto_auth_acl_check(…, client id not available, homeassistant, homeassistant/sensor/shellyswitch25-73C369-temperature-0/config, MOSQ_ACL_WRITE)
1555708733: |-- url=http://127.0.0.1:8080/superuser
1555708733: |-- data=username=homeassistant&password=&topic=&acc=-1&clientid=
1555708733: |-- aclcheck(homeassistant, homeassistant/sensor/shellyswitch25-73C369-temperature-0/config, 2) SUPERUSER=Y by http
1555708733: |-- Cached [68ECFB06E0C96B4E1D08D4EC707E5C409815158E] for (client id not available,homeassistant,2)
1555708733: |-- mosquitto_auth_acl_check(…, client id not available, homeassistant, homeassistant/switch/shellyswitch25-73C369-relay-1/config, MOSQ_ACL_WRITE)Preformatted text

what i am doing wrong? can you help? thanks

I thint that you have incorrect MQTT configuration.

Hi
My setup is working with all my mqtt devices. Also works with shelly but not with your addon… but would like to use it. Can you help me.?

Sorry, I don’t use hass.io. Send me your MQTT Shellies discovery topics and I will check them.

New version: 0.6.0

Changelog:

  • add support for Shelly Sense
  • add support for Shelly Smoke
  • List item

hi there. here is my setup:

{
“logins”: [
{
“username”: “Mosquitto”,
“password”: “mosquitto”
}
],
“anonymous”: false,
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}

on shelly i have:

@mclaudiopt Use for example MQTT.fx and show me your MQTT retained topics.

Will there be support for Shelly 1PM?
Can i give you any logs or info from my Shelly 1PM so you can add it?

There is currently no informatoion about Shelly 1PM on the Shelly API website. If you send me information about the topics that it sends to the MQTT broker I will try to add it to the script.

New version: 0.7.0

Changelog:

  • add support for Shelly RGBW2
  • fix temperature sensor for Shelly2.5

Here are some:
https://privatebin.net/?6367bb3b0e6f6b2c#zN9NnQuquP44Vb8/vKX2M2HKt6pEBTB0rIY8apbL2Sg=

1 Like

Overtemperature is a binary sensor? 0 and 1 value?