Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95385

MQTT Discovery not working

$
0
0

@simonhills wrote:

I’m in the process of remodelling my kitchen and whilst doing so, I’ve decided to add smart light; Ikea Trafri. As my server (UnRAID with HA in Docker is a long way away, I’m using a Raspberry Pi 3b+ running zigbee2MQTT and a cc2531 flahed accordingly. Mosquitto is running on my UnRAID and working properly. I use it to report my tablet battery level (WallPanel) to HA and Node-Red and toggle a Sonoff Smartplug accordingly. I manually added the tablet MQTT sensor and it works well.

I have successfully added one bulb to my Pi and can see it in the config file and I’ve renamed it test_bulb. Node-Red can see it, but Home Assistant won’t discover it. I don’t want to have to add every bulb separately, so I really want to get this working.

Here are the relevant bits of my HA config:

mqtt:
  broker: 192.168.1.105
  port: 1883
  client_id: HomeAssistant
  discovery: true
  discovery_prefix: zigbee2mqtt/
  birth_message:
    topic: 'hass/status'
    payload: 'online'
  will_message:
    topic: 'hass/status'
    payload: 'offline'


sensor:


  - platform: mqtt
    state_topic: "/HA/sensor/battery"
    name: "WallPanel Battery Level"
    unit_of_measurement: "%"
    device_class: battery
    value_template: '{{ value_json.value }}'

Note: as my discovery prefix i’ve tried zigbee2mqtt, /zigbeer2mqtt, /zigbee2mqtt/ and zigbeer2mqtt/

Node red posts this JSON upon bulb rediscovery:

{"type":"device_removed","message":"left_network","meta":{"friendly_name":"0x680ae2fffe3696b2"}}

This is under the topic zigbee2mqtt/bridge/log . It’s worth noting my battery posts with an extra / at the start /HA/sensor/battery .

I am bamboozled as to why discovery does not work. Can you help me? Thanks

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>