homekit-scd30

command module
v0.0.0-...-a769f7f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 15 Imported by: 0

README

HomeKit SCD-30 CO2 sensor

An Apple HomeKit accessory for the Adafruit SCD-30 CO2 sensor.

The accessory added to iOS

Hardware

Wiring

Adafruit have a great tutorial: Learn SCD-30

Raspberry Pi pin SCD-30 sensor pin Wire colour
1 3.3V VIN Voltage in Red
3 GPIO 02 I2C SDA SDA I2C SDA Blue
5 GPIO 03 I2C SCL SCL I2C SCL Yellow
6 Ground GND Ground Black

Software

  • Install Go >= 1.14 (useful Gist for Raspberry Pi)
  • Build: go build homekit-scd30.go
  • Run: go run homekit-scd30.go
  • In iOS Home app, click Add Accessory -> "More options..." and you should see "SCD-30"
Prometheus exporter

To export the co2, temperature, and humidity for Prometheus use the optional flag -prometheusExporter.

  • Run: go run homekit-scd30.go -prometheusExporter

You'll then see the data on port 8000: http://localhost:8000/metrics

# HELP co2 CO2 measured (ppm)
# TYPE co2 gauge
co2 513.689697265625

# HELP temperature Temperature measured (°C)
# TYPE temperature gauge
temperature 16.708629608154297

# HELP humidity Relative humidity measured (%)
# TYPE humidity gauge
humidity 66.6168212890625

TODO

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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