Configuração inicial (Rpi + Hassio + CC2531 + Lampada Ikea)

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 :slight_smile:

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 :slight_smile:
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

A parte das automações não podem ficar dentro do ficheiro configuration.yaml. Tens de meter dentro do ficheiro automation.yaml uma vez que não tens packages.

Obrigado @maxcalavera
Mas tendo na configuração do zigbee2mqtt o permit_join”: true em princípio não preciso das automações para emparelhar a lâmpada, correcto? Neste momento eu nem consigo que a lâmapada aparece nos logs do zigbee2mqtt.

E no log do mqtt aparece tudo bem? O zigbee2mqtt conseque se ligar ao mqtt? Já viste site http://www.zigbee2mqtt.io/information/supported_devices.html como emparelhar a lâmpada? Comigo não consegui emparelhar um sensor de temperatura e testei outro e funcionou. O de temperatura não estava a funcionar. Já experimentaste trocar de dispositivo?

Em princípio sim:

1562693293: New client connected from 172.30.32.1 as mqttjs_a4a8b02f (p2, c1, k60, u'mqttuser01').

Sim, foi precisamente aí que vi que a lâmpada é suportada e onde vi a instruções para o reset.

Desde o início que estou inclinado para a lâmpada e quando passar pelo Ikea vou trocá-la para testar outra.

@rjmontenegro às vezes é cansativo conseguir emparelhar um equipamento co CC2531.

No caso da lªampada se nºao fez a variaçºao no brilho, é porque não fez reset. se não esotu em erro é ligar e depois desligar e ligar 6x com intervalos não superiores a 1s

por x não é fácil e já tive situações em que foram 10x para lhe conseguir fazer o reset.
duvido que seja um problema da lâmpada :thinking:

Penso que o @tmarquespt refere uma coisa importante. Se a lampada não faz a variação de brilho é porque não fez o reset e sem reset não a vais conseguir ligar ao CC2531.

Sim, no video isso é claro e eu nunca o consegui. Daí suspeitar da lâmpada.
Quando tiver um bocadinho volto ao assunto a ver se consigo. Se na configuração/logs está tudo ok, não pode ser outra coisa…

Não obstante do atual tema, creio que as lâmpadas ainda não funcionam corretamente no z2m e cc : - O estado não é atualizado devidamente.

@tmarquespt podes confirmar se o problema já está resolvido?

@tmarquespt pelo tutorial que ele fez penso que só conseguiu sincronizar as lâmpadas com uma determinada versão de firmeware. Eu com a versão de firmeware que tenho ainda não consigo ter a funcionar o botão do ikea pois a versão de firmeware que tenho ainda não o suporta. Por isso acho que é altamente recomendo ter o firmware do CC sempre atualizado. Estou a espera do meu, debugger para testar essa teoria.

O status já está resolvido. Mas o comportamento de dim é mau. Não interessa para o caso, ele só quer testar

Esquece isso tudo. Isso foi feito quando o zigbee2mqtt apareceu. Agora tens de usar o fw específico do z2m. Tenho de actualizar esses tutorial

1 Curtiu

O CC2531 que ele tem fui eu que flashei e aparece no log como Coordinator firmware version: '20190608'

1 Curtiu

@j_assuncao só me lembrei desse pormenor porque me lembro de ter ligo isso no tutorial do Tiago. Como ele não especificou a versão…

Sim e foi bem lembrado. Mas neste caso estava sob controlo. Penso que o problema poderá estar na lâmpada. Existem várias coisas a verificar aqui:

  1. CC2531 instalado e a comunicar com o Z2M - segundo o log o CC2531 é reconhecido Coordinator firmware version: '20190608'
  2. Z2M configurado e a comunicar com o MQTT - segundo o log não se liga ao broker Not connected to MQTT server!
  3. Z2M com o join activado - segundo o log está activado permit_join set to "true" in configuration.yaml
  4. Emparelhamento da lâmpada com o Z2M - segundo o log não é encontrado nenhum dispositivo

@rjmontenegro para despistar um possível problema que existia à umas versões atrás, experimenta criar um novo utilizador na interface do HA com privilégios de administração. Depois usa esse user e pass e configura-os nas respectivas entradas do MQTT (mosquitto) e Z2M. Por fim altera a entrada da configuração do addon do Z2M de "mqtt_server": "mqtt://192.168.1.83" para “mqtt_server”: “http://192.168.1.83”.

Depois reinicia o Rpi por completo e tenta de novo. Se tiveres erros nos logs mostra quais são.

1 Curtiu

Obrigado a todos pela ajuda.
@j_assuncao o Z2M após o arranque apresenta sempre vários registos de “Not connected to MQTT server” mas após algum tempo parece que se liga correctamente. No log que enviei esses erros de not connected são das 18:xx:xx e, para não ficar muito extenso, retirei algumas linhas até às 9:xx:xx. No fds vou fazer o que recomendas e depois coloco aqui os logs completos.

confirmas que é HTTP://?

Ab

Sim, confirmo que deves trocar mqtt:// por http://.

Eu tenho assim a confirmação do addon.

{
  "data_path": "/share/zigbee2mqtt",
  "homeassistant": true,
  "permit_join": false,
  "mqtt_base_topic": "zigbee2mqtt",
  "mqtt_server": "mqtt://homeassistant",
  "serial_port": "/dev/ttyACM0",
  "devices": [],
  "network_key": []
}

Fiz as alterações que indicaste e entretanto já consegui colocar a lâmpada a funcionar. Ainda não tive tempo de verificar, trocando algumas configurações, mas parece-me que o problema sempre esteve no reset da lâmpada e não na configuração. Quando tiver mais algum tempo vou testar e coloco aqui os testes que fiz.
Neste lâmpada o reset tem de ser bem mais rápido que o que é explicado no video. Só assim, após dezenas de tentativas, é que consegui fazer reset à lampada… Uffaaaa.
Deixo aqui o log onde invariavelmente dá erro de ligação ao mqtt server, isto quando arranca o PI:

7/15/2019, 7:42:46 AM - info: Logging to directory: '/share/zigbee2mqtt/log/2019-07-15.07-42-46'
7/15/2019, 7:42:47 AM - debug: Removing old log directory '/share/zigbee2mqtt/log/2019-07-06.15-07-27'
7/15/2019, 7:43:10 AM - debug: 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}}'
7/15/2019, 7:43:12 AM - debug: Loaded state from file /share/zigbee2mqtt/state.json
7/15/2019, 7:43:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 7:43:13 AM - info: Starting zigbee2mqtt version 1.4.0 (commit #unknown)
7/15/2019, 7:43:13 AM - info: Starting zigbee-shepherd
7/15/2019, 7:43:24 AM - info: zigbee-shepherd started
7/15/2019, 7:43:24 AM - info: Coordinator firmware version: '20190608'
7/15/2019, 7:43:24 AM - debug: 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":1563173004,"joinTimeLeft":0}
7/15/2019, 7:43:25 AM - info: Currently 0 devices are joined:
7/15/2019, 7:43:25 AM - warn: `permit_join` set to  `true` in configuration.yaml.
7/15/2019, 7:43:25 AM - warn: Allowing new devices to join.
7/15/2019, 7:43:25 AM - warn: Set `permit_join` to `false` once you joined all devices.
7/15/2019, 7:43:25 AM - info: Zigbee: allowing new devices to join.
7/15/2019, 7:43:25 AM - info: Connecting to MQTT server at http://192.168.1.83
7/15/2019, 7:43:31 AM - info: zigbee-shepherd ready
7/15/2019, 7:43:34 AM - debug: Mounted the cieApp (epId 11)
7/15/2019, 7:46:41 AM - error: Not connected to MQTT server!
7/15/2019, 7:46:45 AM - info: Succesfully reenabled joining
7/15/2019, 7:46:51 AM - error: Not connected to MQTT server!
7/15/2019, 7:48:11 AM - error: Not connected to MQTT server!
7/15/2019, 7:48:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 7:48:21 AM - error: Not connected to MQTT server!
7/15/2019, 7:50:01 AM - error: Not connected to MQTT server!
7/15/2019, 7:50:05 AM - info: Succesfully reenabled joining
7/15/2019, 7:50:11 AM - error: Not connected to MQTT server!
7/15/2019, 7:53:11 AM - error: Not connected to MQTT server!
7/15/2019, 7:53:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 7:53:21 AM - error: Not connected to MQTT server!
7/15/2019, 7:53:25 AM - info: Succesfully reenabled joining
7/15/2019, 7:53:31 AM - error: Not connected to MQTT server!
7/15/2019, 7:56:41 AM - error: Not connected to MQTT server!
7/15/2019, 7:56:45 AM - info: Succesfully reenabled joining
7/15/2019, 7:56:51 AM - error: Not connected to MQTT server!
7/15/2019, 7:58:11 AM - error: Not connected to MQTT server!
7/15/2019, 7:58:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 7:58:21 AM - error: Not connected to MQTT server!
7/15/2019, 7:58:29 AM - info: Connected to MQTT server
7/15/2019, 7:58:29 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
7/15/2019, 7:58:30 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":true}'
7/15/2019, 8:00:05 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
7/15/2019, 8:00:05 AM - info: Zigbee: allowing new devices to join.
7/15/2019, 8:00:06 AM - info: Succesfully reenabled joining
7/15/2019, 8:00:06 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":true}'
7/15/2019, 8:03:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 8:03:25 AM - info: Succesfully reenabled joining
7/15/2019, 8:06:45 AM - info: Succesfully reenabled joining
7/15/2019, 8:08:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 8:10:05 AM - info: Succesfully reenabled joining
7/15/2019, 8:10:06 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
7/15/2019, 8:10:06 AM - info: Zigbee: disabling joining new devices.
7/15/2019, 8:10:06 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
7/15/2019, 8:10:06 AM - info: Zigbee: disabling joining new devices.
7/15/2019, 8:10:07 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":false}'
7/15/2019, 8:13:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 8:58:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 8:59:41 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
7/15/2019, 8:59:41 AM - info: Zigbee: allowing new devices to join.
7/15/2019, 8:59:41 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":true}'
7/15/2019, 9:03:01 AM - info: Succesfully reenabled joining
7/15/2019, 9:03:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 9:06:21 AM - info: Succesfully reenabled joining
7/15/2019, 9:08:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 9:09:41 AM - info: Succesfully reenabled joining
7/15/2019, 9:09:42 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
7/15/2019, 9:09:42 AM - info: Zigbee: disabling joining new devices.
7/15/2019, 9:09:42 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'false'
7/15/2019, 9:09:42 AM - info: Zigbee: disabling joining new devices.
7/15/2019, 9:09:43 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":false}'
7/15/2019, 9:13:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 9:18:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 9:58:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 10:03:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 10:05:52 AM - debug: Received MQTT message on 'zigbee2mqtt/bridge/config/permit_join' with data 'true'
7/15/2019, 10:05:52 AM - info: Zigbee: allowing new devices to join.
7/15/2019, 10:05:53 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.4.0","commit":"unknown","coordinator":20190608,"log_level":"debug","permit_join":true}'
7/15/2019, 10:06:54 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genBasic","data":{"manufacturerName":"IKEA of Sweden","modelId":"TRADFRI bulb E14 W op/ch 400lm","powerSource":1}}' of device 'undefined' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:06:54 AM - info: New device 'undefined' with address 0x000b57fffe48a8b6 connected!
7/15/2019, 10:06:54 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 10:06:54 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":"0x000b57fffe48a8b6","meta":{}}'
7/15/2019, 10:06:54 AM - warn: Device with modelID 'undefined' is not supported.
7/15/2019, 10:06:54 AM - warn: Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html
7/15/2019, 10:06:55 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genBasic","data":{"zclVersion":1,"appVersion":17,"stackVersion":87,"hwVersion":1,"dateCode":"20170302","swBuildId":"1.2.214"}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:06:55 AM - info: MQTT publish: topic 'homeassistant/light/0x000b57fffe48a8b6/light/config', payload '{"brightness":true,"schema":"json","command_topic":"zigbee2mqtt/0x000b57fffe48a8b6/set","state_topic":"zigbee2mqtt/0x000b57fffe48a8b6","name":"0x000b57fffe48a8b6_light","unique_id":"0x000b57fffe48a8b6_light_zigbee2mqtt","device":{"identifiers":"zigbee2mqtt_0x000b57fffe48a8b6","name":"0x000b57fffe48a8b6","sw_version":"Zigbee2mqtt 1.4.0","model":"TRADFRI LED bulb E12/E14/E17 400 lumen, dimmable warm white, chandelier opal (LED1649C5)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
7/15/2019, 10:06:55 AM - info: MQTT publish: topic 'homeassistant/sensor/0x000b57fffe48a8b6/linkquality/config', payload '{"unit_of_measurement":"-","value_template":"{{ value_json.linkquality }}","state_topic":"zigbee2mqtt/0x000b57fffe48a8b6","json_attributes_topic":"zigbee2mqtt/0x000b57fffe48a8b6","name":"0x000b57fffe48a8b6_linkquality","unique_id":"0x000b57fffe48a8b6_linkquality_zigbee2mqtt","device":{"identifiers":"zigbee2mqtt_0x000b57fffe48a8b6","name":"0x000b57fffe48a8b6","sw_version":"Zigbee2mqtt 1.4.0","model":"TRADFRI LED bulb E12/E14/E17 400 lumen, dimmable warm white, chandelier opal (LED1649C5)","manufacturer":"IKEA"},"availability_topic":"zigbee2mqtt/bridge/state"}'
7/15/2019, 10:06:58 AM - debug: Received zigbee message of type 'devInterview' with data '"0x000b57fffe48a8b6"'
7/15/2019, 10:06:59 AM - debug: Received zigbee message of type 'devInterview' with data '"0x000b57fffe48a8b6"'
7/15/2019, 10:06:59 AM - debug: Received zigbee message of type 'endDeviceAnnce' with data '"0x000b57fffe48a8b6"' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:06:59 AM - debug: Received zigbee message of type 'devInterview' with data '"0x000b57fffe48a8b6"'
7/15/2019, 10:07:00 AM - debug: Received zigbee message of type 'endDeviceAnnce' with data '"0x000b57fffe48a8b6"' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:00 AM - debug: Received zigbee message of type 'devInterview' with data '"0x000b57fffe48a8b6"'
7/15/2019, 10:07:01 AM - debug: Received zigbee message of type 'endDeviceAnnce' with data '"0x000b57fffe48a8b6"' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:15 AM - debug: Received zigbee message of type 'endDeviceAnnce' with data '"0x000b57fffe48a8b6"' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:17 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"haDiagnostic","data":{"numberOfResets":0,"macRxBcast":0,"macTxBcast":0,"aPSRxBcast":0,"aPSTxBcast":0}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:17 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"haDiagnostic","data":{"nwkFcFailure":0,"packetBufferAllocateFailures":0,"averageMacRetryPerApsMessageSent":0,"lastMessageLqi":255,"lastMessageRssi":-27}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:18 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"haDiagnostic","data":{"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:18 AM - debug: Received zigbee message of type 'devInterview' with data '"0x000b57fffe48a8b6"'
7/15/2019, 10:07:18 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"lightLink","data":{"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:18 AM - debug: Received zigbee message of type 'devInterview' with data '"0x000b57fffe48a8b6"'
7/15/2019, 10:07:19 AM - debug: Accept device incoming with ieeeAddr '0x000b57fffe48a8b6' permit join is 'true'
7/15/2019, 10:07:19 AM - debug: Allowing device '0x000b57fffe48a8b6' to join
7/15/2019, 10:07:19 AM - debug: Received zigbee message of type 'devIncoming' with data '"0x000b57fffe48a8b6"' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:07:19 AM - info: Device incoming...
7/15/2019, 10:07:19 AM - info: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"device incoming"}'
7/15/2019, 10:07:19 AM - debug: Received zigbee message of type 'devStatus' with data '"online"' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:08:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 10:09:12 AM - info: Succesfully reenabled joining
7/15/2019, 10:11:42 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON"}'
7/15/2019, 10:11:42 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:11:43 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON"}'
7/15/2019, 10:11:45 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genOnOff","data":{"16387":1,"onOff":1,"globalSceneCtrl":1,"onTime":0,"offWaitTime":0}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:45 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181}'
7/15/2019, 10:11:45 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"16387":1,"onOff":1,"globalSceneCtrl":1,"onTime":0,"offWaitTime":0}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:45 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181}'
7/15/2019, 10:11:46 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genOnOff","data":{"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:46 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:46 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"16387":1,"65533":1,"onOff":1,"globalSceneCtrl":1,"onTime":0,"offWaitTime":0}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:46 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181}'
7/15/2019, 10:11:47 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON", "brightness": 175}'
7/15/2019, 10:11:47 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genLevelCtrl - moveToLevelWithOnOff - {"level":175,"transtime":0} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:11:48 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":175}'
7/15/2019, 10:11:50 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":175,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:50 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":175}'
7/15/2019, 10:11:50 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":175,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:51 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON", "brightness": 53}'
7/15/2019, 10:11:51 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:51 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:51 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"15":0,"16384":254,"65533":1,"currentLevel":175,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:51 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genLevelCtrl - moveToLevelWithOnOff - {"level":53,"transtime":0} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:11:51 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":53}'
7/15/2019, 10:11:52 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":53,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:52 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":53}'
7/15/2019, 10:11:52 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":53}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:53 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:53 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":53}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:53 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON", "brightness": 196}'
7/15/2019, 10:11:54 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genLevelCtrl - moveToLevelWithOnOff - {"level":196,"transtime":0} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:11:54 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":196}'
7/15/2019, 10:11:55 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":196,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:55 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":196}'
7/15/2019, 10:11:56 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":196}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:56 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:56 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":196}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:57 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON", "brightness": 239}'
7/15/2019, 10:11:57 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genLevelCtrl - moveToLevelWithOnOff - {"level":239,"transtime":0} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:11:58 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":239}'
7/15/2019, 10:11:59 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":239,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:59 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":239}'
7/15/2019, 10:11:59 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":239}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:59 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:11:59 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":239}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:00 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON", "brightness": 15}'
7/15/2019, 10:12:00 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genLevelCtrl - moveToLevelWithOnOff - {"level":15,"transtime":0} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:12:01 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":15}'
7/15/2019, 10:12:02 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":15,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:02 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":15}'
7/15/2019, 10:12:02 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":15}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:03 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:03 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":15}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:04 AM - debug: Received MQTT message on 'zigbee2mqtt/0x000b57fffe48a8b6/set' with data '{"state": "ON", "brightness": 10}'
7/15/2019, 10:12:04 AM - info: Zigbee publish to device '0x000b57fffe48a8b6', genLevelCtrl - moveToLevelWithOnOff - {"level":10,"transtime":0} - {"manufSpec":0,"disDefaultRsp":0} - null
7/15/2019, 10:12:05 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":10}'
7/15/2019, 10:12:06 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"15":0,"currentLevel":10,"remainingTime":0,"onOffTransitionTime":5,"onLevel":255}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:06 AM - info: MQTT publish: topic 'zigbee2mqtt/0x000b57fffe48a8b6', payload '{"state":"ON","linkquality":181,"brightness":10}'
7/15/2019, 10:12:06 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":10}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:07 AM - debug: Received zigbee message of type 'readRsp' with data '{"cid":"genLevelCtrl","data":{"16384":254,"65533":1}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:07 AM - debug: Received zigbee message of type 'devChange' with data '{"cid":"genLevelCtrl","data":{"currentLevel":10}}' of device 'TRADFRI bulb E14 W op/ch 400lm' (0x000b57fffe48a8b6) of endpoint 1
7/15/2019, 10:12:32 AM - info: Succesfully reenabled joining
7/15/2019, 10:13:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json
7/15/2019, 10:18:12 AM - debug: Saving state to file /share/zigbee2mqtt/state.json

Obrigado a todos pela ajuda.
Ricardo

Se te referes a arrancar o Rpi a frio (ligar a alimentação depois de ter sido desligada) isso é perfeitamente normal pois, possivelmente, o addon do Z2M levanta primeiro que o addon do MQTT o que faz com que o Z2M se tente ligar ao broker e não consiga.


Copyright © 2017-2021. Todos os direitos reservados
CPHA.pt - info@cpha.pt


FAQ | Termos de Serviço/Regras | Política de Privacidade