My Luminus pricing (BE)

Just want to share one of my custom integrations.
This integration gets gas and electricity prices from My Luminus (Belgium). Only tested on fixed and variable rates.

Code and instructions: GitHub - VinzzB/my-luminus-pricing-ha-addon: Third-party addon for Home Assistant adds price information from active energy contracts.

2 Likes

Hi, was looking for something like thisšŸ‘!
However, after install and entering log-in I get a ā€œerror connecting to apiā€.
Did restart twice and ctrl-F5.

Hmm, strange. I have it working for a few months now, and it also works after HA reboots. Your API responses from Luminus might (slightly) differ. I assume you can login at login.luminus.be without entering a recaptcha?

FYI Luminus has planned a maintenance window for tommorrow (11 jan).

Just looked at my code again and it is possible that i made a mistake in the coordinator class. I’m importing DOMAIN from homeassistant.core. At first glance this should’ve been imported from .const. I will look into it further as soon as i find some time.

I can login without entering a recaptcha.
Ok, I will wait and keep an eye at this thread.

I installed the integratin on a fresh HA installation (Core 2026.1.2) and i can login without any issue.

You might get more information about the exception by enabling debug logging mode in the integration.

I removed the integration, restarted, ctrl-F5 and installed it again.
From the log I get this:

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.my_luminus_pricing.api
Bron: custom_components/my_luminus_pricing/api.py:121
integratie: My Luminus - Pricing
Eerst voorgekomen: 09:22:30 (5 gebeurtenissen)
Laatst gelogd: 09:23:10

Bad logger message: Luminus response error ((ā€˜https://www.luminus.be/myluminus/api/meter-readings/available-sources’, 500, ā€˜ā€œinternal server errorā€ā€™))

and

Deze fout is ontstaan door een aangepaste integratie.

Logger: custom_components.my_luminus_pricing.coordinator
Bron: custom_components/my_luminus_pricing/coordinator.py:92
integratie: My Luminus - Pricing
Eerst voorgekomen: 09:22:30 (5 gebeurtenissen)
Laatst gelogd: 09:23:10

Error connecting to api

ok, It looks like you’re logged in succesfully but the Luminus API is returning different information with your account. Do you have multiple meters (Gas, Electric, multiple ean numbers)?

Can you send me an anonymized response from the API call? Just use your browser, login to my luminus, then paste the url (https://www.luminus.be/myluminus/api/meter-readings/available-sources). You should see a JSON response wirth all your EAN meters.

Yes, I have multiple ean-numbers, electriciteit and gas.
The response is exactly the same as yours, although not in one screen. When I log in it’s already either electriciteit or gas.

hmm. ok, so you get the same response in your browser while the integration receives a 500 internal server error. I created this integration by reverse engineering the MyLuminus website. It is possible that I’m missing some mandatory requests for your account.

Unfortunately, I cannot reproduce this error on my account. This makes it difficult to debug and fix. When you log in with a browser, do you immediately see your dashboard with gas and electricity graphs? Or do you use multiple Luminus accounts within one login?

The failing API call is used to determine the EAN numbers and the type of meter (Gas/Electricity). Perhaps I could add a feature to manually add the EAN and type.
The actual price information is retrieved from this API call https://www.luminus.be/myluminus/api/price-information/{ean}. Where {ean} is the EAN number of your meter.

I have to login with email, next screen password and when I press enter I get the screen like in the snip.
So, top right, a drop-down menu for gas and elektriciteit. I’m not sure if I always start with gas like this morning. Maybe it remembers the last page I visitited from the last time.