Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 2.79 KB

README.md

File metadata and controls

62 lines (38 loc) · 2.79 KB

HomeKit Oregon Scientific IDTW211R

An Apple HomeKit accessory for the IDTW211R running on a Raspberry Pi.

The accessory added to iOS

Dependencies

Installation

Install this on a Raspberry Pi, or test it on macOS.

Setup

  1. Install Go >= 1.14 (useful Gist for Raspberry Pi)
  2. Clone this project: git clone https://github.com/sighmon/homekit-oregon-temperature and then cd homekit-oregon-temperature
  3. Install the Go dependencies: go get
  4. Install and run the Prometheus exporter oregon-temperature-prometheus

Build

  1. To build this accessory: go build homekit-oregon-scientific-idtw211r.go
  2. To cross-compile for Raspberry Pi on macOS: env GOOS=linux GOARCH=arm GOARM=7 go build homekit-oregon-scientific-idtw211r.go

Run

  1. Execute the executable: ./homekit-oregon-scientific-idtw211r
  2. Or run with the command: go run homekit-oregon-scientific-idtw211r.go

Optional flags

The flag defaults can be overridden by handing them in at runtime:

  • -host=http://0.0.0.0 The host of your IDTW211R sensor
  • -port=1006 The port of your IDTW211R sensor
  • -sleep=5s The time between updating the accessory with sensor readings (5s equals five seconds)
  • -dev This turns on development mode to return a random temperature reading without needing to have an IDTW211R

e.g. to override the port run: go run homekit-oregon-scientific-idtw211r.go -port=8000 or ./homekit-oregon-scientific-idtw211r -port=8000

Reset this accessory

If you uninstall this accessory from your Apple Home, you'll also need to delete the stored data for it to be able to be re-added.

macOS

  1. Delete the data in the folder created: homekit-oregon-scientific-idtw211r/Thermometer/
  2. Restart the executable

Raspberry Pi

  1. Remove the persistent data: rm -rf /var/lib/homekit-oregon-scientific-idtw211r/data
  2. Restart the Raspberry Pi

Thanks

Based on: https://github.com/sighmon/homekit-enviroplus

This project uses the amazing work of Matthias. Please consider donating if you found this useful.