Correctly connecting Home Assistant with ZigBee2MQTT via Mosquitto on TrueNAS Scale

hi all.

I am going to begin by saying that there most likely is a published solution here, but I have not been able to correctly identify it. I do aplogise if this has been posted and answered previously.

now, coming back to the topic at hand, I am struggling with my first installation of both TrueNAS Scale and the apps for Home Assistant, Mosquitto and ZigBee2MQTT. namely, I have successfully installed TrueNAS Scale, configured everything according to my wishes and moved on to installing Home Assistant app, the Mosquitto MQTT broker and the ZigBee2MQTT app, configured them all together with authentication and they are all almost working good except that I cannot see any events in Home Assistant once any actions are happening with the ZigBee devices configured inside ZigBee2MQTT.

now, to add more context, in the HA MQTT settings I can successfully see all MQTT events using the zigbee2mqtt/# topic. the problem is that any new ZigBee device added simply does not appear in Home Assistant nor any action like button push or ON/OFF actions triggered from ZigBee2MQTT.

according to my understanding, I must have not properly configured the Discovery prefix, Birth message topic and Will message topic and I would really appreciate any pointers in this direction or any other mistakes that I might have inadvertently made during this setup and configuration.

I hope my question makes sense and am happy to reply with any relevant details in order to be able to move forward and enjoy the great power of Home Assistant.

thank you.

Did you set

homeassistant: true

in Zigbee2MQTT’s configuration.yaml ?

considering that I have installed both Home Assistant and ZigBee2MQTT using TrueNAS apps, no I have not. I would love to do that, but I have no idea where I can do that now.

I will look into the ZigBee2MQTT deployment and see where I can add the homeassistant: true option.

thank you.

LE: I have tried, but since I have no idea where to insert the homeassistant: true setting, the only thing I have succeeded was breaking my ZigBee2MQTT deployment as seen in the attached picture.

either way, after reverting, I am back to square 1.

after some digging, I have located the ZigBee2MQTT configuration.yaml that looks like this:

───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /mnt/BIG/apps/zigbee2mqtt/data/configuration.yaml
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ experimental:
   2   │   new_api: false
   3   │ frontend:
   4   │   port: 10103
   5   │ permit_join: false
   6   │ mqtt:
   7   │   server: mqtt://mosquitto.ix-mosquitto.svc.cluster.local
   8   │   base_topic: zigbee2mqtt
   9   │   user: mqtt_user
  10   │   password: xxxxxx
  11   │   keepalive: 60
  12   │   reject_unauthorized: true
  13   │   version: 4
  14   │ serial:
  15   │   port: /dev/ttyUSB1
  16   │   adapter: ezsp
  17   │ advanced:
  18   │   homeassistant_legacy_entity_attributes: false
  19   │   legacy_api: false
  20   │   legacy_availability_payload: false
  21   │   log_syslog:
  22   │     app_name: Zigbee2MQTT
  23   │     eol: /n
  24   │     host: localhost
  25   │     localhost: localhost
  26   │     path: /dev/log
  27   │     pid: process.pid
  28   │     port: 514
  29   │     protocol: udp4
  30   │     type: '5424'
  31   │   channel: 25
  32   │   network_key:
  33   │     - xxx
  34   │     - xxx
  35   │     - xxx
  36   │     - xxx
  37   │     - xxx
  38   │     - xxx
  39   │     - xxx
  40   │     - xxx
  41   │     - xxx
  42   │     - xxx
  43   │     - xxx
  44   │     - xxx
  45   │     - xxx
  46   │     - xxx
  47   │     - xxx
  48   │     - xxx
  49   │   log_level: info
  50   │ device_options:
  51   │   legacy: false
  52   │ devices:
  53   │   '0xxxxxxxxxxxxxxxxx':
  54   │     friendly_name: dormitor_horia_priză_veioză_pat
  55   │     description: 'priza care controlează veioza de lângă patul lui Horia. '
  56   │   '0xxxxxxxxxxxxxxxxx':
  57   │     friendly_name: dormitor_horia_priză_veioză_dulap
  58   │     description: 'priza care controlează veioza de pe Kallax. '
  59   │   '0xxxxxxxxxxxxxxxxx':
  60   │     friendly_name: dormitor_Horia_senzor_ușă
  61   │     description: 'senzorul de pe ușa dormitorului lui Horia. '
  62   │   '0xxxxxxxxxxxxxxxxx':
  63   │     friendly_name: dormitor_Horia_termometru_ambiental
  64   │     description: 'termometrul care stă pe Kallax în dormitorul lui Horia '
  65   │   '0xxxxxxxxxxxxxxxxx':
  66   │     friendly_name: buton_simplu_1
  67   │   '0xxxxxxxxxxxxxxxxx':
  68   │     friendly_name: buton_on_off_2
  69   │   '0xxxxxxxxxxxxxxxxx':
  70   │     friendly_name: buton_on_off_3
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

PS: the xxx is my awkward way of masking sensitive information.

manually adding homeassistant: true is out of the question since it would defeat the entire point of using a Helm Chart to deploy these containers.

my main challenge at this time is figuring out where in the TrueNAS Scale I can add the homeassistant: true option before the system is building this configuration.yaml file that is directing the container’s behaviour.

as soon as I have manually added Francis’ advised homeassistant: true into my configuration.yaml, everything worked like a charm.

thank you.