MQTT mosquitto broker cant find zigbee2mqtt sensor

Hello,
I’ve been struggling for a while now to add the xiaomi sensor temp/humid/pressure (WSDCGQ11LM).
As far as I can see it is paired with the zigbee2mqtt addon and seem to be recognized with mosquitto but I cant find it in the states.
Help would be much appreciated!

z2m log:

zigbee2mqtt:info 8/23/2019, 9:27:17 AM MQTT publish: topic 'homeassistant/sensor/0x00158d00036b4d73/linkquality/config', payload '{"unit_of_measurement":"-","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/xiaomi_test","json_attributes_topic":"zigbee2mqtt/xiaomi_test","name":"xiaomi_test_linkquality","unique_id":"0x00158d00036b4d73_linkquality_zigbee2mqtt","device":{"identifiers":["zigbee2mqtt_0x00158d00036b4d73"],"name":"xiaomi_test","sw_version":"Zigbee2mqtt 1.5.1","model":"Aqara temperature, humidity and pressure sensor (WSDCGQ11LM)","manufacturer":"Xiaomi"},"availability_topic":"zigbee2mqtt/bridge/state"}'

mosquitto log:

[09:27:14] INFO: Setup mosquitto configuration
[09:27:15] INFO: No local user available
[09:27:15] INFO: Initialize Hass.io Add-on services
[09:27:15] INFO: Initialize Home Assistant discovery
[09:27:15] INFO: Start Mosquitto daemon
1566541635: Loading config file /share/mosquitto/acl.conf
1566541635: mosquitto version 1.6.3 starting
1566541635: Config loaded from /etc/mosquitto.conf.
1566541635: Loading plugin: /usr/share/mosquitto/auth-plug.so
1566541635: |-- *** auth-plug: startup
1566541635:  ├── Username/password checking enabled.
1566541635:  ├── TLS-PSK checking enabled.
1566541635:  └── Extended authentication not enabled.
1566541635: Opening ipv4 listen socket on port 1883.
1566541635: Opening ipv6 listen socket on port 1883.
1566541635: Opening websockets listen socket on port 1884.
1566541635: Opening ipv4 listen socket on port 8883.
1566541635: Opening ipv6 listen socket on port 8883.
1566541635: Opening websockets listen socket on port 8884.
1566541635: Warning: Mosquitto should not be run as root/administrator.
1566541635: New connection from 172.30.33.4 on port 1883.
[INFO] found USER on Home Assistant
1566541637: New client connected from 172.30.33.4 as mqttjs_e56dd359 (p2, c1, k60, u'valna').

Do you have discovery turned on in zigbee2mqtt AND home assistant?

Hi,

Yes, I’ve added the config below.

z2m config:

{
  "data_path": "/share/zigbee2mqtt",
  "devices": "devices.yaml",
  "groups": "groups.yaml",
  "homeassistant": true,
  "permit_join": false,
  "mqtt": {
    "base_topic": "zigbee2mqtt",
    "server": "mqtt://core-mosquitto:1883",
    "user": "name",
    "password": "pass"
  },
  "serial": {
    "port": "/dev/ttyUSB0"
  },
  "advanced": {
    "rtscts": false,
    "pan_id": 6754,
    "channel": 11,
    "network_key": [

configuration.yaml:

mqtt:
  broker: core-mosquitto
  discovery: true

That looks pretty right.

In home assistant go to the developer tools and choose states. Filter entities on 4d73, see what shows up.

If you are using lovelace, don’t forget to add the entities to a card :slight_smile:

What’s in your share\accesscontrollist file?

no entities:

noentity

OK definitely not in HA then.

hey,

user valna
topic readwrite #

Change it to this

user valna
topic #
user homeassistant
topic #

Then restart the broker.

chaged it, still can’t find it in the entities…

Im pretty sure this should be the IP of your HA
mqtt://192.168.x.x:1883
thats how mine is.