Bom dia a todos.
Para me iniciar nestas coisas do HA e seus derivados decidi montar um cenário de testes onde fosse possível aproveitar hardware existente e onde não fosse necessário andar a abrir caixas ou mexer em ligações elétricas. O objetivo inicial é mesmo ficar familiarizado com o HA e com os seus conceitos. Alterações de maior ficam para uma fase posterior, já na moradia que está a ser construída.
Para este cenário aproveitei um RPi Model B Versão 1, comprei uma CC2531 já flashada como controler e comprei uma lâmpada no Ikea. Objetivo inicial: integrada esta lâmpada no HA. Parece-me uma tarefa simples mas algo não está a correr bem e é por isso que vos peço ajuda.
As minhas configurações iniciais e logs:
[1] Mosquitto
[1.1] Config
{
"logins": [
{
"username": "mosquitto",
"password": "mosquitto"
}
],
"anonymous": true,
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
está no porto 1883.
[1.2] Log
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562516050: Client hassio already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562516050: Client mqttjs_b52ad645 already connected, closing old connection.
1562516050: New client connected from 172.30.32.1 as mqttjs_b52ad645 (p2, c1, k60, u'mosquitto').
1562517850: Saving in-memory database to /data/mosquitto.db.
1562519651: Saving in-memory database to /data/mosquitto.db.
1562521452: Saving in-memory database to /data/mosquitto.db.
1562523253: Saving in-memory database to /data/mosquitto.db.
1562525054: Saving in-memory database to /data/mosquitto.db.
1562526855: Saving in-memory database to /data/mosquitto.db.
1562528656: Saving in-memory database to /data/mosquitto.db.
1562530457: Saving in-memory database to /data/mosquitto.db.
[2] Add-on zigbee2mqtt
[2.1] Config
{
"data_path": "/share/zigbee2mqtt",
"homeassistant": true,
"permit_join": false,
"mqtt_base_topic": "zigbee2mqtt",
"mqtt_server": "mqtt://192.168.1.83",
"serial_port": "/dev/ttyACM0",
"devices": [],
"network_key": [],
"mqtt_user": "mosquitto",
"mqtt_pass": "mosquitto",
"log_level": "debug"
}
[2.2] Log após permitir o join
zigbee2mqtt:debug 7/8/2019, 4:39:41 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:debug 7/8/2019, 4:41:34 PM Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
zigbee2mqtt:info 7/8/2019, 4:41:34 PM Zigbee: allowing new devices to join.
zigbee2mqtt:info 7/8/2019, 4:41:35 PM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":true}'
Verifiquei se no Hassio a CC2531 estava presente e é a ttyACM0;
Confirmei que a lampada é compatível com o add-on e para fazer o reset da lampada segui este video mas efectivamente no final a lampada não tem o mesmo comportamento. A luz fica sempre com a mesma intensidade. Acho que o problema pode estar aqui mas pedi ajuda ao @j_assuncao que me deu as seguintes recomendações:
- Alterar a entrada do MQTT anonymous de true para false
- O username e password do MQTT não devem ser esses pois o addon faz um teste a users e pass conhecidos ou repetitivos. Usa um conjunto de user/pass “normal”
- No Z2M altera o permit_join de false para true
Depois disto, reinicia o host (o rpi) e tenta de novo. - Para emparelhares a lâmpada com o Z2M, a lâmpada deve estar o mais perto possível do CC2531(cerca de 5 a 10cm)
Depois disto alterei as configurações e segui as recomendações de proximidade para emparelhar a lâmpada. Estava próxima, cerca de 15cm, mas estava dentro do candeeiro. Coloquei literalmente em cima da CC2531
Após estas alterações, o problema persiste…
As novas configurações e logs são:
[3] Mosquitto
[3.1] Config
{
“logins”: [
{
“username”: “mqttuser01”,
“password”: “mqttpwd01”
}
],
“anonymous”: false,
“customize”: {
“active”: false,
“folder”: “mosquitto”
},
“certfile”: “fullchain.pem”,
“keyfile”: “privkey.pem”
}
O username tem de existir como utilizador do Hassio ou apenas precisa ser definido aqui na configuração do Mosquitto?
[3.2] O Log
[18:05:57] INFO: Setup mosquitto configuration
[18:05:57] WARNING: SSL not enabled - No valid certs found!
[18:05:57] INFO: Found local users inside config
[18:06:06] INFO: Initialize Hass.io Add-on services
[18:06:06] INFO: Initialize Home Assistant discovery
[18:06:07] INFO: Start Mosquitto daemon
1562691967: mosquitto version 1.6.3 starting
1562691967: Config loaded from /etc/mosquitto.conf.
1562691967: Loading plugin: /usr/share/mosquitto/auth-plug.so
1562691967: |-- *** auth-plug: startup
1562691967: ├── Username/password checking enabled.
1562691967: ├── TLS-PSK checking enabled.
1562691967: └── Extended authentication not enabled.
1562691967: Opening ipv4 listen socket on port 1883.
1562691967: Opening ipv6 listen socket on port 1883.
1562691967: Opening websockets listen socket on port 1884.
1562691968: Warning: Mosquitto should not be run as root/administrator.
1562692156: New connection from 172.30.32.1 on port 1883.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692196: Socket error on client <unknown>, disconnecting.
1562692196: New connection from 172.30.32.1 on port 1883.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692236: Socket error on client <unknown>, disconnecting.
1562692236: New connection from 172.30.32.1 on port 1883.
1562692236: New connection from 172.30.32.1 on port 1883.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692276: Socket error on client <unknown>, disconnecting.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692316: Socket error on client <unknown>, disconnecting.
1562692316: New connection from 172.30.32.1 on port 1883.
1562692316: New connection from 172.30.32.1 on port 1883.
1562692316: New connection from 172.30.32.1 on port 1883.
1562692316: New connection from 172.30.32.1 on port 1883.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692356: Socket error on client <unknown>, disconnecting.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692396: Socket error on client <unknown>, disconnecting.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692436: Socket error on client <unknown>, disconnecting.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692476: Socket error on client <unknown>, disconnecting.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
1562692476: New connection from 172.30.32.1 on port 1883.
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562692516: Socket error on client <unknown>, disconnecting.
[INFO] found homeassistant on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
após alguns minutos já parece tudo ok:
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
1562693237: Socket error on client <unknown>, disconnecting.
[INFO] found homeassistant on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found homeassistant on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
/bin/auth_srv.sh: line 15: echo: write error: Broken pipe
[INFO] found mqttuser01 on local database
1562693276: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
[INFO] found mqttuser01 on local database
1562693285: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693285: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
[INFO] found homeassistant on local database
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Socket error on client hassio, disconnecting.
1562693293: Socket error on client mqttjs_a4a8b02f, disconnecting.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New connection from 172.30.32.1 on port 1883.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693293: Client hassio already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as hassio (p2, c1, k60, u'homeassistant').
1562693293: Client mqttjs_a4a8b02f already connected, closing old connection.
1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').
1562693768: Saving in-memory database to /data/mosquitto.db.
1562695569: Saving in-memory database to /data/mosquitto.db.
1562697370: Saving in-memory database to /data/mosquitto.db.
1562699171: Saving in-memory database to /data/mosquitto.db.
1562700972: Saving in-memory database to /data/mosquitto.db.
1562702773: Saving in-memory database to /data/mosquitto.db.
1562704574: Saving in-memory database to /data/mosquitto.db.```
[4] Add-on zigbee2mqtt
[4.1] Config
{
“data_path”: “/share/zigbee2mqtt”,
“homeassistant”: true,
“permit_join”: true,
“mqtt_base_topic”: “zigbee2mqtt”,
“mqtt_server”: “mqtt://192.168.1.83”,
“serial_port”: “/dev/ttyACM0”,
“devices”: [],
“network_key”: [],
“mqtt_user”: “mqttuser01”,
“mqtt_pass”: “mqttpwd01”,
“log_level”: “debug”
}
[4.2] Log que no arranque também apresenta erros mas passando uns minutos tudo parece ficar bem. Talvez do auto-start ou da ordem pelo que os add-ons arrancam:
[Info] Configuration file found: /share/zigbee2mqtt/configuration.yaml
[Info] Configuration written to /share/zigbee2mqtt/configuration.yaml
2019-07-09T18:07:10: PM2 log: Launching in no daemon mode
2019-07-09T18:07:15: PM2 log: App [npm:0] starting in -fork mode-
2019-07-09T18:07:16: PM2 log: App [npm:0] online
> zigbee2mqtt@1.4.0 start /zigbee2mqtt-1.4.0
> node index.js
zigbee2mqtt:info 7/9/2019, 6:08:28 PM Logging to directory: '/share/zigbee2mqtt/log/2019-07-09.18-08-27'
zigbee2mqtt:debug 7/9/2019, 6:08:29 PM Removing old log directory '/share/zigbee2mqtt/log/2019-07-06.10-15-40'
zigbee2mqtt:debug 7/9/2019, 6:08:54 PM Using zigbee-shepherd with settings: '{"net":{"panId":6754,"extPanId":[221,221,221,221,221,221,221,221],"channelList":[11],"precfgkey":"HIDDEN"},"dbPath":"/share/zigbee2mqtt/database.db","coordBackupPath":"/share/zigbee2mqtt/coordinator_backup.json","sp":{"baudRate":115200,"rtscts":true}}'
zigbee2mqtt:debug 7/9/2019, 6:08:56 PM Loaded state from file /share/zigbee2mqtt/state.json
zigbee2mqtt:debug 7/9/2019, 6:08:56 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 7/9/2019, 6:08:57 PM Starting zigbee2mqtt version 1.4.0 (commit #unknown)
zigbee2mqtt:info 7/9/2019, 6:08:57 PM Starting zigbee-shepherd
zigbee2mqtt:info 7/9/2019, 6:09:09 PM zigbee-shepherd started
zigbee2mqtt:info 7/9/2019, 6:09:09 PM Coordinator firmware version: '20190608'
zigbee2mqtt:debug 7/9/2019, 6:09:09 PM zigbee-shepherd info: {"enabled":true,"net":{"state":"Coordinator","channel":"11","panId":6754,"extPanId":[221,221,221,221,221,221,221,221],"ieeeAddr":"0x00124b0018e1e945","nwkAddr":0},"firmware":{"transportrev":2,"product":0,"version":"2.6.3","revision":20190608},"startTime":1562692149,"joinTimeLeft":0}
zigbee2mqtt:info 7/9/2019, 6:09:09 PM Currently 0 devices are joined:
zigbee2mqtt:warn 7/9/2019, 6:09:09 PM `permit_join` set to `true` in configuration.yaml.
zigbee2mqtt:warn 7/9/2019, 6:09:09 PM Allowing new devices to join.
zigbee2mqtt:warn 7/9/2019, 6:09:10 PM Set `permit_join` to `false` once you joined all devices.
zigbee2mqtt:info 7/9/2019, 6:09:10 PM Zigbee: allowing new devices to join.
zigbee2mqtt:info 7/9/2019, 6:09:10 PM Connecting to MQTT server at mqtt://192.168.1.83
zigbee2mqtt:info 7/9/2019, 6:09:16 PM zigbee-shepherd ready
zigbee2mqtt:debug 7/9/2019, 6:09:19 PM Mounted the cieApp (epId 11)
zigbee2mqtt:error 7/9/2019, 6:09:45 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:09:55 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:10:05 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:10:15 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:10:26 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:10:36 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:10:46 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:10:56 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:11:06 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:11:16 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:11:26 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:11:36 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:11:46 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:11:56 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:12:06 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:12:16 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:12:26 PM Not connected to MQTT server!
zigbee2mqtt:info 7/9/2019, 6:12:31 PM Succesfully reenabled joining
zigbee2mqtt:error 7/9/2019, 6:12:36 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:12:46 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:12:56 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:13:06 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:13:16 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:13:26 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:13:36 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:13:46 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:13:56 PM Not connected to MQTT server!
zigbee2mqtt:debug 7/9/2019, 6:13:56 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:error 7/9/2019, 6:14:06 PM Not connected to MQTT server!
zigbee2mqtt:error 7/9/2019, 6:14:16 PM Not connected to MQTT server!
zigbee2mqtt:info 7/9/2019, 9:39:10 PM Succesfully reenabled joining
zigbee2mqtt:info 7/9/2019, 9:42:30 PM Succesfully reenabled joining
zigbee2mqtt:debug 7/9/2019, 9:43:56 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 7/9/2019, 9:45:50 PM Succesfully reenabled joining
zigbee2mqtt:debug 7/9/2019, 9:48:56 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 7/9/2019, 9:49:10 PM Succesfully reenabled joining
zigbee2mqtt:info 7/9/2019, 9:52:30 PM Succesfully reenabled joining
zigbee2mqtt:debug 7/9/2019, 9:53:56 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 7/9/2019, 9:55:50 PM Succesfully reenabled joining
Após isso voltei a fazer o reset à lâmpada para a emparelhar mas nada de novo. Mesmo no que diz respeito a logs, nada é registado:
zigbee2mqtt:debug 7/9/2019, 9:58:56 PM Saving state to file /share/zigbee2mqtt/state.json
zigbee2mqtt:info 7/9/2019, 9:59:10 PM Succesfully reenabled joining
zigbee2mqtt:info 7/9/2019, 10:02:30 PM Succesfully reenabled joining
zigbee2mqtt:debug 7/9/2019, 10:02:39 PM Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
zigbee2mqtt:info 7/9/2019, 10:02:40 PM Zigbee: allowing new devices to join.
zigbee2mqtt:info 7/9/2019, 10:02:40 PM MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":true}'
zigbee2mqtt:debug 7/9/2019, 10:03:56 PM Saving state to file /share/zigbee2mqtt/state.json
Junto também aqui o meu /usr/share/hassio/homeassistant/configuration.yaml que está muito simples. Sei que devia separar em packages mas para testes não
Tem as configurações sugeridas pelo @tmarquespt neste tópico que são muito semelhantes ao que está na documentação oficial mas acho que com a configuração que tenho ( “permit_join”: true no zigbee2mqtt) não são necessárias:
/usr/share/hassio/homeassistant/configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Sensors
sensor:
# Weather prediction
- platform: yr
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
########## basic information #########
homeassistant:
name: rrs
latitude: 41.000000
longitude: -8.000000
elevation: 30
unit_system: metric
temperature_unit: C
time_zone: Europe/Lisbon
########### mqtt ##########
mqtt:
broker: localhost
port: 1883
client_id: hassio
keepalive: 60
username: "mqttuser01"
password: "mqttpwd01"
discovery: true
######### zigbee ########
input_boolean:
zigbee_permit_join:
name: Allow devices to join
initial: off
icon: mdi:cellphone-wireless
timer:
zigbee_permit_join:
name: Time remaining
duration: 600 # Updated this to the number of seconds you wish
sensor:
- platform: mqtt
name: Bridge state
state_topic: "zigbee2mqtt/bridge/state"
icon: mdi:router-wireless
group:
zigbee_group:
name: Zigbee
entities:
- input_boolean.zigbee_permit_join
- timer.zigbee_permit_join
- sensor.bridge_state
automation:
- id: enable_zigbee_join
alias: Enable Zigbee joining
hide_entity: true
trigger:
platform: state
entity_id: input_boolean.zigbee_permit_join
to: 'on'
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/bridge/config/permit_join
payload: 'true'
- service: timer.start
data:
entity_id: timer.zigbee_permit_join
- id: disable_zigbee_join
alias: Disable Zigbee joining
trigger:
- entity_id: input_boolean.zigbee_permit_join
platform: state
to: 'off'
action:
- data:
payload: 'false'
topic: zigbee2mqtt/bridge/config/permit_join
service: mqtt.publish
- data:
entity_id: timer.zigbee_permit_join
service: timer.cancel
hide_entity: true
- id: disable_zigbee_join_timer
alias: Disable Zigbee joining by timer
hide_entity: true
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.zigbee_permit_join
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/bridge/config/permit_join
payload: 'false'
- service: input_boolean.turn_off
data:
entity_id: input_boolean.zigbee_permit_join
E pronto, é isto.
Agradeço as vossas sugestões e estou certo que será algo simples…
Abraço