Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pvainio/scd30-mqtt
Sensirion SCD30 CO2 sensor MQTT gateway with Home Assistant MQTT discovery
https://github.com/pvainio/scd30-mqtt
co2 co2-sensor home-assistant home-automation homeassistant iot mqtt scd30 sensirion sensirion-scd30
Last synced: 19 days ago
JSON representation
Sensirion SCD30 CO2 sensor MQTT gateway with Home Assistant MQTT discovery
- Host: GitHub
- URL: https://github.com/pvainio/scd30-mqtt
- Owner: pvainio
- License: gpl-3.0
- Created: 2021-11-02T09:28:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-06T07:03:25.000Z (about 1 year ago)
- Last Synced: 2024-11-30T04:06:10.588Z (25 days ago)
- Topics: co2, co2-sensor, home-assistant, home-automation, homeassistant, iot, mqtt, scd30, sensirion, sensirion-scd30
- Language: Go
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```sh
#!/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