Mega smart home integration, free and open source

Prices your Mega variable and dynamic electricity contracts
Prices your Mega variable and dynamic electricity contracts in Gladys (Belgium).
Installation
In Gladys, open Integrations, then the external integrations store, search for Mega and click Install. Wait for the container to start.
Configuration
Open the Configuration tab.
- ENTSO-E security token (dynamic contracts only): create a free account on the ENTSO-E Transparency Platform and request a security token. It is used to read the Belgian day-ahead electricity price.
- Refresh interval: how often the prices are fetched (15 minutes minimum, 60 by default).
The Refresh the spot prices button fetches them right away.
Usage
In the Gladys energy contract wizard, pick one of the Mega templates:
- Mega variable: enter this month's energy price (€/kWh) and your VAT. Update the contract when Mega changes its monthly rate.
- Mega dynamic: the price follows the spot price:
coefficient × spot price + margin(€/kWh), VAT added. Enter the coefficient and margin from your Mega contract. The integration fills thespot-becalendar with the Belgian day-ahead prices; an interval without a published price is priced later, never at zero. A negative spot price is priced at zero, because Gladys refuses a negative cost.
The formulas are generic: check them against your own contract and invoice.
Scenes and dashboards
- Trigger Spot prices updated: fired when new prices are published. Filter on negative prices; variables: number of slots, lowest and highest price, negative prices.
- Action Refresh the spot prices: fetches the prices now (outputs: slots, lowest and highest price).
- Widget Spot prices: current spot price, token state, last refresh and a refresh button.
Help
A question or a problem? Ask on the Gladys community forum or open an issue on the GitHub repository.
Configuration settings
These are the settings Mega asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Spot prices | section | No | Dynamic contracts follow the Belgian day-ahead price, read from ENTSO-E with a free security token. |
| ENTSO-E security token | secret | No | Needed by dynamic contracts only. Request it from your ENTSO-E account. |
| Refresh interval (min) | number | No | How often the spot prices are fetched (15 minutes minimum). |
How to install Mega in Gladys
- In Gladys, open Integrations: Mega appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/gboulvin/gladys-mega:1.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/gboulvin/gladys-mega.
Mega requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Mega is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by gboulvin, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation