Skip to content

patrislav1/zytemp_mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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