Dear guys,
I am new here and start with a topic which annoys me since a few days.
I have a homeassistant server running, version is 2021.12.10. Many things work, some don’t work, but from time to time I find solutions. But not this time.
My mosquitto broker is well running and I can receive and publish messages manually.
I have also already some MQTT sensors connected. These are a BME280 sensor and two Shelly Plug S.
These devices are manually integrated without using the auto discovery by the MQTT integration. I added them by writing all necessary information into the configuration.yaml:
sensor:
- platform: mqtt
state_topic: /homeassistant/sensors/arbeitszimmer/drucker/temperature
name: "Temperatur"
unit_of_measurement: " °C"
unique_id: sensor.3D_BME280_temperature
- platform: mqtt
state_topic: shellies/Shelly_PlugS_AZ-DD28AE/relay/0/energy
name: Shelly_PlugS_AZ Energie
device_class: energy
unit_of_measurement: 'kWh'
value_template: '{{"{:.2f}".format(value | float / 60000 ) }}'
icon: mdi:lightning-bolt
These are two examples. This worked fine for me so far, but as I read there is auto discovery of new MQTT devices possible.
As I have many Shelly Plugs and Shelly Button 1 which I want to implement in my house, a smart war of discovery would be nice.
So I tried it, but I were not able to make it running.
This is how my configuration of the integration looks like:
(see first 3 screenshots at the end)
As I said, the configuration works so far. I can communicate with the broker using the listening and publishing fields.
Yesterday I set up a Shelly Button 1which was instantly detected by the Shelly integration, but not by the MQTT integration. The shelly itself has this MQTT configuration:
(see fourth screenshot at the end)
I already tried to change from “core-mosquitto” to 192.168.1.180 inside the config of MQTT integration, but that made no difference.
So I searched in this community and found some hints, that this Shellies discovery script is needed:
https://community.home-assistant.io/t/shellies-discovery-script/94048
So I set that one up. But it also changed anything. My integration symbol in homeassistant allways looks like that:
(see last screenshot at the end)
No numbers of found devices or entities are shown. All other integrations, which use auto discovery work without any problems.
I am starting to get frustrated. Maybe anyone can help me?
Regards