Hi everyone!
I am blocked in a problem that I am not able to get out of and prevents me from advancing in the use of Hassio.
I have four xiaomi devices, two motion and lighting sensors, and two door / window sensors.
I installed mosquitto broker in hassio, and it connects me well or I think so, with my username and password (by the way I don’t know if it is necessary to use a separate user only for mqtt or have to use the main HA user).
I put the code to see if you can help me
Mosquitto broker configuration:
{
"logins": [
{
"username": "username",
"password": "password"
}
],
"anonymous": false,
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"require_certificate": false
}
This is the mosquitto broker connection log
[22:28:59] INFO: Setup mosquitto configuration
[22:28:59] INFO: Found local users inside config
[22:28:59] INFO: Initialize Hass.io Add-on services
[22:28:59] INFO: Initialize Home Assistant discovery
[22:28:59] INFO: Start Mosquitto daemon
1580246939: mosquitto version 1.6.3 starting
1580246939: Config loaded from /etc/mosquitto.conf.
1580246939: Loading plugin: /usr/share/mosquitto/auth-plug.so
1580246939: |-- *** auth-plug: startup
1580246939: ├── Username/password checking enabled.
1580246939: ├── TLS-PSK checking enabled.
1580246939: └── Extended authentication not enabled.
1580246939: Opening ipv4 listen socket on port 1883.
1580246939: Opening ipv6 listen socket on port 1883.
1580246939: Opening websockets listen socket on port 1884.
1580246939: Opening ipv4 listen socket on port 8883.
1580246939: Opening ipv6 listen socket on port 8883.
1580246939: Opening websockets listen socket on port 8884.
1580246940: Warning: Mosquitto should not be run as root/administrator.
1580246940: New connection from 172.30.32.1 on port 1883.
[INFO] found "nombre de usuario" on local database
1580246940: New client connected from 172.30.32.1 as mqttjs_03eea5ef (p2, c1, k60, u'nombre de usuario').
1580246953: New connection from 172.30.32.1 on port 1883.
1580246953: New client connected from 172.30.32.1 as c5a1e42c590d4bb798b9945d8f80d0c1 (p2, c1, k15, u'nombre de usuario').
I also installed zigbee2mqtt with this configuration:
{
"data_path": "/share/zigbee2mqtt",
"devices": "devices.yaml",
"groups": "groups.yaml",
"homeassistant": true,
"permit_join": false,
"mqtt": {
"base_topic": "zigbee2mqtt",
"server": "mqtt://ipraspberry",
"user": "username",
"password": "password"
},
"serial": {
"port": "/dev/ttyACM0"
},
"advanced":
. . .
And this is part of the zigbee2mqtt connection log:
./run.sh: line 17: [Info] Configuration backup found in /share/zigbee2mqtt/.configuration.yaml.bk. Skipping config backup.: No such file or directory
[Info] Socat is DISABLED and not started
2020-01-28T22:36:21: PM2 log: Launching in no daemon mode
2020-01-28T22:36:21: PM2 log: App [npm:0] starting in -fork mode-
2020-01-28T22:36:21: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.9.0
> node index.js
zigbee2mqtt:info 2020-01-28 22:36:25: Logging to console and directory: '/share/zigbee2mqtt/log/2020-01-28.22-36-25'
zigbee2mqtt:info 2020-01-28 22:36:26: Starting zigbee2mqtt version 1.9.0 (commit #unknown)
zigbee2mqtt:info 2020-01-28 22:36:26: Starting zigbee-herdsman...
zigbee2mqtt:info 2020-01-28 22:36:28: zigbee-herdsman started
zigbee2mqtt:info 2020-01-28 22:36:28: Coordinator firmware version: '{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}}'
zigbee2mqtt:info 2020-01-28 22:36:28: Currently 2 devices are joined:
zigbee2mqtt:info 2020-01-28 22:36:28: sensor_entrada_principal (0x0015...): MCCGQ11LM - Xiaomi Aqara door & window contact sensor (EndDevice)
zigbee2mqtt:info 2020-01-28 22:36:28: sensor_puerta_garaje (0x0015...): RTCGQ11LM - Xiaomi Aqara human body movement and illuminance sensor (EndDevice)
zigbee2mqtt:info 2020-01-28 22:36:28: Zigbee: disabling joining new devices.
zigbee2mqtt:info 2020-01-28 22:36:28: Connecting to MQTT server at mqtt://iddelaraspberry
zigbee2mqtt:info 2020-01-28 22:36:29: Connected to MQTT server
zigbee2mqtt:info 2020-01-28 22:36:29: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
zigbee2mqtt:info 2020-01-28 22:36:29: MQTT publish: topic 'zigbee2mqtt/sensor_entrada_principal', payload '{"battery":91,"voltage":2985,"contact":true,"linkquality":63}'
zigbee2mqtt:info 2020-01-28 22:36:29: MQTT publish: topic 'zigbee2mqtt/sensor_puerta_garaje', payload '{"battery":100,"voltage":3015,"illuminance":3,"linkquality":18,"occupancy":false}'
zigbee2mqtt:info 2020-01-28 22:36:29: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.9.0","commit":"unknown","coordinator":{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}},"log_level":"info","permit_join":false}'
The zigbee2mqtt log shows me all the changes that occur in the sensors correctly.
I have done tests with the windows desktop application MQTT.fx, and it shows me the devices, the changes that occur in them, etc.
I think the zigbee network is working correctly.
But the problem comes in Hassio, where, I don’t know why, I don’t get the devices to appear as an entity, or automatically (I have the discovery a true in configuration.yaml) or adding the devices manually as per figure in the official documentation.
I no longer know what to do, I tried to uninstall the addons and reconfigure in case I had made mistakes, to install everything from 0 on the raspberry, to change parameters over and over again) but I don’t get any of the sensors to appear as an entity , so I can’t do anything with them.
I had many ideas for my home, but I refuse to buy anything until I am able to configure and use these devices.
Forgive my level of English, the message is as translated by Google
I hope my problem is understood
Thanks