Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

andrasmaroy/ansible-role-zigbee2mqtt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Role Name

igami.zigbee2mqtt

Ansible role to install zigbee2mqtt on Raspberry Pi running stock Raspbian lite or full. Should also work on other Debian distributions.

https://www.zigbee2mqtt.io/

Requirements

Raspberry Pi with SSH enabled and CC2531 USB sniffer. If installing on a fresh 'headless' Raspberry Pi server, add an empty file named 'ssh' to the boot directory of the SD card to enable remote SSH access.

Role Variables

  • zigbee_user: zigbee
  • zigbee_user_groups: tty,dialout
  • zigbee_user_append: false
  • zigbee_dir: /usr/local/lib/zigbee2mqtt
  • zigbee_data_dir: /var/lib/zigbee2mqtt
  • zigbee_generate_new_network_key: no
  • zigbee_repository: https://github.com/Koenkk/zigbee2mqtt.git
  • zigbee_update: no
  • zigbee_version: HEAD

The final configuration.yaml is generated by combining all variables prefixed with zigbee2mqtt_ followed by the key. As examples the defaults are the following:

  • zigbee2mqtt_homeassistant: true
  • zigbee2mqtt_permit_join: false
  • zigbee_defaults_mqtt_base_topic: zigbee2mqtt
  • zigbee_defaults_mqtt_user: zigbee
  • zigbee_defaults_advanced_log_level: info
  • zigbee_defaults_advanced_log_output:
    • console
  • zigbee_defaults_advanced_network_key: '!network_key network_key' Zigbee2mqtt uses a known default encryption key. Therefore it is recommended to use a different one. By default this role will create an random key at firstrun.

Dependencies

  • npm >=5.8
  • nodejs >=10

Example Playbook

To install zigbee2mqtt with default serial port:

    - name: zigbee2mqtt octoprint on raspbian
      hosts: ip_address_of_rpi
      become: true

      roles:
      - igami.zigbee2mqtt

To install zigbee2mqtt with custom serial port:

    - name: zigbee2mqtt octoprint on raspbian
      hosts: ip_address_of_rpi
      become: true

      roles:
      - role: igami.zigbee2mqtt
        vars:
          zigbee2mqtt_serial:
            port: /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00

To install zigbee2mqtt with default serial port and MQTT authentication:

    - name: zigbee2mqtt octoprint on raspbian
      hosts: ip_address_of_rpi
      become: true

      roles:
      - role: igami.zigbee2mqtt
        vars:
          zigbee2mqtt_mqtt:
            user: mqtt_user
            password: mqtt_password

To install zigbee2mqtt with device specific configuration:

    - name: zigbee2mqtt octoprint on raspbian
      hosts: ip_address_of_rpi
      become: true

      roles:
      - role: igami.zigbee2mqtt
        vars:
          zigbee2mqtt_devices:
            '0xFEFEFEFEFEFEFEFE':
              friendly_name: Example
              availability: true

License

BSD

Author Information

igami@noreply.user.github.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jinja 100.0%