Skip to content

An Apple HomeKit accessory for the Adafruit SCD30 CO2 sensor connected to a Raspberry Pi.

License

Notifications You must be signed in to change notification settings

sighmon/homekit-scd30

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:https://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

About

An Apple HomeKit accessory for the Adafruit SCD30 CO2 sensor connected to a Raspberry Pi.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages