julian-klode / zytemp_mqtt

MQTT interface for Holtek USB-zyTemp CO2 sensors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zytemp-mqtt

This is a MQTT interface for the Holtek USB-zyTemp chipset which is used in inexpensive CO2 monitors, such as co2Meter.com or TFA Dostmann.

Installation

  • Clone the repository

    git clone https://github.com/patrislav1/zytemp_mqtt.git
  • Install the Python module

    sudo pip3 install .
  • Run the install script to create the service user and the systemd service.

    sudo ./install.sh

Configuration

The configuration file can be in $HOME/.config/zytempmqtt/config.yaml or zytempmqtt/config.yaml.

It contains following configuration:

mqtt_host: homeassistant.local  # MQTT server
mqtt_port: 1883                 # MQTT port (default: 1883)
mqtt_username: user             # MQTT username
mqtt_password: pass             # MQTT password
mqtt_client_id: foobar          # MQTT client ID (default: zytemp-mqtt)
mqtt_topic: /foo/bar            # MQTT topic (default: zytemp-mqtt)
friendly_name: aircontrol       # Friendly name for HomeAssistant (default: zytemp-mqtt)
discovery_prefix: homeassistant # Discovery prefix for HomeAssistant (default: homeassistant)
decrypt: False                  # Decrypt data from zyTemp, may be needed for some devices (default: False)

Home Assistant integration

On startup, zytemp-mqtt performs MQTT Discovery so that the sensors magically show up in the Home Assistant system without any manual configuration:

HomeAssistant screenshot

About

MQTT interface for Holtek USB-zyTemp CO2 sensors

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 89.6%Language:Shell 10.4%