Home assistant cannot see my devices

Hello,
I tried to find solution here, but with no success, so sorry for newbie question. I’ve installed Hass.io to my RPi 3, zigbee2mqtt bridge, Mosquitto broker, configured all things and:

  • zigbee2mqtt - works fine, it see my devices and is connected to MQ broker.
zigbee2mqtt:info  2019-11-28T20:43:42: Connected to MQTT server
zigbee2mqtt:info  2019-11-28T21:11:00: MQTT publish: topic 'zigbee2mqtt/0x00158d0003f3c13c', payload '{"battery":100,"voltage":3075,"illuminance":0,"linkquality":39,"occupancy":false}'
  • Mosquitto broker seems to work fine too. When I start listening to some of my device’s topic in developer tools - mqtt menu I get messages from zigbee2mqtt:
Message 1 received on zigbee2mqtt/0x00158d0003f3c13c at 10:15 PM:

{
    "battery": 100,
    "voltage": 3075,
    "illuminance": 0,
    "linkquality": 15,
    "occupancy": true
}

But I must miss something or I’m doing something wrong, but in integration menu for Mosquitto broker I have only message “This integration has no devices.” and I cannot see any of my devices.
I was looking for topics with this message, but I cannot found solution. Can somebody please help me?

Thanks for anwers

P.

Here is log from Mosquitto:

[21:52:51] INFO: Setup mosquitto configuration
[21:52:51] WARNING: SSL not enabled - No valid certs found!
[21:52:51] INFO: Found local users inside config
[21:52:52] INFO: Initialize Hass.io Add-on services
[21:52:52] INFO: Initialize Home Assistant discovery
[21:52:52] INFO: Start Mosquitto daemon
1574974372: mosquitto version 1.6.3 starting
1574974372: Config loaded from /etc/mosquitto.conf.
1574974372: Loading plugin: /usr/share/mosquitto/auth-plug.so
1574974372:  ├── Username/password checking enabled.
1574974372: |-- *** auth-plug: startup
1574974372:  ├── TLS-PSK checking enabled.
1574974372:  └── Extended authentication not enabled.
1574974372: Opening ipv4 listen socket on port 1883.
1574974372: Opening ipv6 listen socket on port 1883.
1574974372: Opening websockets listen socket on port 1884.
1574974372: Warning: Mosquitto should not be run as root/administrator.
1574974372: New connection from 172.30.33.1 on port 1883.
[INFO] found mqttus on local database
1574974373: New client connected from 172.30.33.1 as mqttjs_6a3eb271 (p2, c1, k60, u'mqttus').
1574974373: New connection from 172.30.32.1 on port 1883.
1574974375: Socket error on client <unknown>, disconnecting.
1574974375: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1574974376: New client connected from 172.30.32.1 as auto-FD4653BA-BD8A-7A02-5C54-B77823ED4858 (p2, c1, k60, u'homeassistant').

Did you check on Developer Tools -> States if your entities are there?

No, they are not. There are only:

  • binary_sensor. updater
  • person.xxx
  • sun.sun
  • weather.xxx

Have you turned on mqtt discovery in home assistant?

Have you turned on mqtt discovery in zigbee2mqtt?

Yes, of course, it is obvious from log

Yes sorry it is obvious that you have turned on discovery in HA. It is not obvious what you have done in zigbee2mqtt. See here https://www.zigbee2mqtt.io/information/configuration.html, you need

homeassistant: true

in you zigbee2mqtt configuration.yaml

1 Like

I have this option set to true. I think it is default after plugin instalation in Hass.io. By my noob opinion the problem is between Home assistant and Mosquitto. Home assistant cannot read mosquitto entities for some reason. Has anybody some idea why? Or how to detect what HA cas see in mosquitto?

Just for the record, here is my zigbee2mqtt configuration:

{
  "data_path": "/share/zigbee2mqtt",
  "devices": "devices.yaml",
  "groups": "groups.yaml",
  "homeassistant": true,
  "permit_join": true,
  "mqtt": {
    "broker": "core-mosquitto",
    "discovery": true,
    "discovery_prefix": "homeassistant",
    "base_topic": "zigbee2mqtt",
    "server": "mqtt://core-mosquitto:1883",
    "user": "mqttus",
    "password": "xxx"
  },
  "serial": {
    "port": "/dev/ttyACM0"
  },
  "advanced": {
    "pan_id": 6754,
    "channel": 11,
    "network_key": [
      1,
      3,
      5,
      7,
      9,
      11,
      13,
      15,
      0,
      2,
      4,
      6,
      8,
      10,
      12,
      13
    ],
    "availability_blacklist": []
  },
  "ban": [],
  "whitelist": [],
  "queue": {},
  "socat": {
    "enabled": false,
    "master": "pty,raw,echo=0,link=/dev/ttyZ2M,mode=777",
    "slave": "tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5",
    "restartdelay": 1,
    "initialdelay": 1,
    "options": "-d -d",
    "log": false
  }
}

Your homeassistant log file should tell you something about the communication with your mqtt server.

Do you have any other mqtt devices?

No, I have no other mqtt devices. Can you tell me please, where is the HA log?
And is it necessary to define ACL in Mosquitto? I didn’t do it yet…

The HA log you find under developer tools -> logs.

The nice thing about mqtt : it is easy to debug.

Just install mqtt.fx , mqtt explorer or mqtt lens (or another mqtt client, on linux you can use mosquitto_sub), connect to your mqtt server, and in HA under developer tools -> mqtt : publish something. If you don’t see it in your mqtt client, there is no connection between HA and your mqtt server.

1 Like

Was there ever an answer for this? Im having the same issue. I can use Developer Tools to debug and listen to my topics just fine. I can use MQTT Explorer to debug topics as well. But Mqtt Integrations only show ‘This integration has no devices’.

I have tried connecting HA to the broker both ways: via configuration.yaml as well as auto discovery of MQTT.

This post seemed to have my exact issues.

Thanks

Are you using discovery?

What are your devices?

Where are your logs?

When I add MQTT to configuration.yaml yes I use discovery.

mqtt:
  broker: 192.168.1.111
  discovery: true
  discovery_prefix: homeassistant
  keepalive: 60
  username: "MQTT_USER"
  password: "MQTT_PASS"
  port: 1883

But when I allow HA to setup the mqtt integration automatically I removed all references of mqtt from my config.yaml.

I using a D1-Mini to connect to mqtt. And thats working successfully.

Here are the logs from MQTT:

1585351915: Client auto-B8F58B98-8B81-C30D-AE5A-5D05406ABB93 disconnected.
1585351927: New connection from ....... on port 1883.
1585351927: New client connected from ...... as auto-5BC445EC-9E78-513F-C7E2-38DDD4EFDDE1 (p2, c1, k60, u'homeassistant').
1585352228: Saving in-memory database to /data/mosquitto.db.
1585352290: Client auto-5BC445EC-9E78-513F-C7E2-38DDD4EFDDE1 disconnected.
1585352301: New connection from ....... on port 1883.
[INFO] found homeassistant on local database
1585352301: New client connected from ....... as auto-CEF09817-1522-5CB2-C1B1-D49333509452 (p2, c1, k60, u'homeassistant').
1585352510: Client mqtt-explorer-eb803b60 disconnected.
1585352526: New connection from 192.168.1.165 on port 1883.
1585352526: Socket error on client <unknown>, disconnecting.
1585352534: New connection from 192.168.1.165 on port 1883.
[WARN] Not found homeassistant on local database
1585352534: Socket error on client <unknown>, disconnecting.
1585352563: New connection from 192.168.1.165 on port 1883.
[INFO] found mqtt on Home Assistant
1585352563: New client connected from 192.168.1.165 as mqtt-explorer-eb803b60 (p2, c1, k60, u'mqtt').
1585353245: Client auto-CEF09817-1522-5CB2-C1B1-D49333509452 disconnected.
1585353255: New connection from ...... on port 1883.
[INFO] found homeassistant on local database
1585353255: New client connected from ...... as auto-2C6F5A97-AE90-03FA-8775-F65BE7A50E0E (p2, c1, k60, u'homeassistant').
1585353546: Client auto-2C6F5A97-AE90-03FA-8775-F65BE7A50E0E disconnected.
1585353558: New connection from ...... on port 1883.
[INFO] found homeassistant on local database
1585353558: New client connected from ....... as auto-C29811E8-7575-44A3-E17D-6760735691A6 (p2, c1, k60, u'homeassistant').
1585354101: Client mqtt-explorer-eb803b60 has exceeded timeout, disconnecting.
1585354204: Saving in-memory database to /data/mosquitto.db.
1585356201: Saving in-memory database to /data/mosquitto.db.
1585356877: Client auto-C29811E8-7575-44A3-E17D-6760735691A6 disconnected.
1585356888: New connection from 192.168.1.111 on port 1883.
[INFO] found mqtt on Home Assistant
1585356888: New client connected from 192.168.1.111 as auto-CD7AF809-AAE0-0A42-56E3-94554E2E8835 (p2, c1, k60, u'mqtt').
1585357825: Client auto-CD7AF809-AAE0-0A42-56E3-94554E2E8835 disconnected.
1585357835: New connection from 192.168.1.111 on port 1883.
[INFO] found mqtt on Home Assistant
1585357835: New client connected from 192.168.1.111 as auto-5389F1E0-0C49-CFF3-AB5E-96FD2571A59A (p2, c1, k60, u'mqtt').

So it is all working now?

No, it does not work. The log shows a connection from HA but in the Device Integrations my only response is “This integration has no devices”.

I guess I misunderstood

What firmware are you running on the wemos?

LOL - Oh sorry I meant my D1 is sending mqtt messages and I can successfully see mqtt is receiving the messages.

And Im using HassOS 3.12

What firmware are you running on the wemos?

Sorry, I actually loaded my own custom script via Arduino. Using it to monitor some exterior analog switches.