Connecting my Tesla Powerwall (gateway) to Homekit via HomeBridge so it can be monitored and actioned on
Expose Tesla Gateway unofficial API on LAN
Deploy Apple Homekit (using Apple TV 4k)
Deploy Homebridge (using a Docker Image on a QNAP NAS)
Build a custom Homebridge Plugin that can authenticate and poll Tesla battery status
Use Homekit Automation to turn on or off space heaters based on battery charge level and grid status
Homebridge plugin code published on github: https://github.com/boaworm/homebridge-tesla-gateway
End result: A few days worth of learning Homebridge plugin, and I was able to connect all things together.
Now I can use Homekit Automation to trigger on when the grid goes offline (power goes out), and automatically disable some power-hungry devices and alert me. This reduces the risk that space-heaters will drain the battery reserve during an outage.