scd30-mqtt

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

README

Sensirion SCD30 CO2 sensor MQTT gateway for Home Assistant

Overview

This gateway can be used to publish measurements SCD30 to mqtt.

It supports Home Assistant MQTT Discovery but can also be used without Home Assistant.

Only requirement is MQTT Broker to connect to.

Example usecase

Attach SCD30 to Raspberry Pi Zero W I2C bus and run this gateway to publish CO2, temperature and humidity to Home Assistant.

Configuration

Application is configure with environment variables

variable required default description
SCD30_MQTT_URL x mqtt url, for example tcp://10.1.2.3:8883
SCD30_MQTT_USER mqtt username
SCD30_MQTT_PASSWORD mqtt password
SCD30_MQTT_CLIENT_ID scd30 mqtt client id
SCD30_DEBUG false enable debug output, true/false
SCD30_ID scd30 home assistant discovery id
SCD30_TEMP_OFFSET 150 temperature compensation offset
SCD30_NAME SCD30 home assistant device name
SCD30_INTEVAL 50 measurement interval in seconds
SCD30_AUTOCAL 1 1 to enable automatic calibration, 0 to disable
SCD30_FORCECAL CO2 ppm to force calibration to

Usage

For example with following script

#!/bin/sh

# Change to your real mqtt url
export MQTT_URL=tcp://localhost:8883

./scd30-mqtt

MQTT Topics used

  • homeassistant/status subscribe to HA status changes
  • scd30/id/co2 publish co2
  • scd30/id/temperature publish temperature
  • scd30/id/humidity publish humidity

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL