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.
- 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.
- Homebridge v1.3 or newer
- Node.js v18 or newer
- An API key from Electricity Maps
Install the plugin via Homebridge UI or with npm:
npm install -g homebridge-electricitymaps
In Homebridge's config.json
, configure the plugin as follows:
{
"platforms": [
{
"platform": "ElectricityMaps",
"apiKey": "YOUR_ELECTRICITY_MAPS_API_KEY",
"zone": "YOUR_ZONE_CODE"
}
]
}
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).
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.
To develop and test the plugin locally:
- Clone the repository.
- Install dependencies:
npm install
- Build the plugin:
npm run build
- Link the plugin for Homebridge:
npm link
This project is licensed under the Apache-2.0 License.