Zigbee2mqtt with socat configuration

I spent a few hours getting the configuration to work, this ended up doing the job:

 serial:
  port: /dev/ttyZ2M
advanced:
  log_level: info
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
  rtscts: false
device_options: {}
blocklist: []
passlist: []
queue: {}
experimental: {}
socat:
  enabled: true
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777,end-close'
  slave: 'tcp4:172.16.0.1:8485,ignoreeof'
  restartdelay: 1
  initialdelay: 1
  options: '-d -d'
  log: true

I had ser2net running with

8485:raw:0:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT

in /etc/ser2net.conf on the machine connected to the dongle.

3 Likes