Skip to content

Homebridge plugin that uses the Electricity Maps API to display real-time carbon intensity, low-carbon energy, and renewable energy metrics in HomeKit

License

Notifications You must be signed in to change notification settings

tuxity/homebridge-electricitymaps

Repository files navigation

homebridge-electricitymaps

This is a Homebridge plugin that integrates with the Electricity Maps API to display real-time electricity carbon intensity, low-carbon energy percentage, and renewable energy percentage as sensors in Apple HomeKit.

Features

  • Displays real-time carbon intensity (gCO₂eq/kWh).
  • Shows the percentage of low-carbon (fossil-free) energy in the electricity grid.
  • Shows the percentage of renewable energy (wind, solar, hydro, etc.) in the electricity grid.
  • Automatically updates every 10 minutes.

Prerequisites

Installation

Install the plugin via Homebridge UI or with npm:

npm install -g homebridge-electricitymaps

Configuration

In Homebridge's config.json, configure the plugin as follows:

{
  "platforms": [
    {
      "platform": "ElectricityMaps",
      "apiKey": "YOUR_ELECTRICITY_MAPS_API_KEY",
      "zone": "YOUR_ZONE_CODE"
    }
  ]
}

Configuration Options

  • apiKey: Your API key for accessing Electricity Maps data.
  • zone: The region code for your location (e.g., FR for France, US-CA for California).

Available Sensors

This plugin adds the following sensors to HomeKit:

  • Carbon Intensity Sensor: Displays the current carbon intensity (gCO₂eq/kWh).
  • Low-Carbon Percentage Sensor: Shows the percentage of low-carbon (fossil-free) energy in the grid.
  • Renewable Percentage Sensor: Displays the percentage of renewable energy.

Development

To develop and test the plugin locally:

  1. Clone the repository.
  2. Install dependencies:
    npm install
  3. Build the plugin:
    npm run build
  4. Link the plugin for Homebridge:
    npm link

License

This project is licensed under the Apache-2.0 License.

About

Homebridge plugin that uses the Electricity Maps API to display real-time carbon intensity, low-carbon energy, and renewable energy metrics in HomeKit

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published