homekit-powerwall

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

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 14 Imported by: 0

README

HomeKit Tesla Powerwall 2

An Apple HomeKit accessory for the Tesla Powerwall 2.

Software

  • Install Go >= 1.14 (useful Gist for Raspberry Pi)
  • Build: go build homekit-powerwall.go
  • Build for Raspberry Pi by cross-compiling on macOS: env GOOS=linux GOARCH=arm GOARM=7 go build homekit-powerwall.go
  • Run: go run homekit-powerwall.go -ip POWERWALL_IP -username YOUR_USERNAME -password YOUR_PASSWORD
  • In iOS Home app, click Add Accessory -> "More options..." and you should see "Tesla"
Prometheus exporter

To export the battery, load, and solar for Prometheus use the optional flag -prometheusExporter.

  • Run: go run homekit-powerwall.go -ip POWERWALL_IP -username YOUR_USERNAME -password YOUR_PASSWORD -prometheusExporter

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

# HELP battery Charge (%)
# TYPE battery gauge
battery 90

# HELP load Watt (W)
# TYPE load gauge
load 3980

# HELP solar Watt (W)
# TYPE solar gauge
solar 6230

Powerwall setup

Follow the instructions in Connecting to Tesla Gateway to set your username and password for your Powerwall.

Then use these credentials to run this HomeKit exporter app.

Thank you

TODO

  • Update to use hap instead of `hc
  • Add energy exported/imported from meters
  • Add pull-request to the original repository

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