Integration - Enercoop

While browsing the forum and GitHub, I generated the CSV files for Enercoop supplier contracts. Despite the ReadMe, I couldn’t generate the js file

I admit I used AI to generate these files. It would be great to have an automatic converter for energy contracts into a file that can be used by Gladys (I know, YakaFokon ^^).

Here’s the link (valid for 30 days) to the CSVs

Here’s the link (valid for 30 days) to Enercoop energy contracts

Thanks a lot!

Hi @Zenfull :waving_hand:

Thanks for generating these files! However, the links you shared don’t seem to be working.

That’s exactly what we’re already doing in this GitHub repository: GitHub - GladysAssistant/energy-contracts: Gladys Assistant Energy Contracts as JSON · GitHub :slightly_smiling_face:

If you look at the EDF Tempo contract for example (energy-contracts/contracts/edf/tempo at main · GladysAssistant/energy-contracts · GitHub), you’ll see there’s a small script that automatically converts the CSV provided by EDF. This allows us to update the contract as soon as the supplier publishes a new version of the file.

However, there is no standard format: each supplier uses its own file. Therefore, a specific import script needs to be written for each one.

The good news is that with current AI tools, this kind of script is generated very quickly, so adding new suppliers has become quite simple. :slightly_smiling_face:

I understand!

The links have been updated

I hope the generated documents will be usable as needed

Thanks! I’ll check it out and keep you posted :slight_smile:

I’ll check it out tonight and I’ll make the PR if that’s okay with you.

Thanks a lot!

First remark: I rename the directory to blue because it doesn’t match the name of the csv.

Secondly (is that a word??): no need for the contracts directory, those are the ones from the GitHub repo.

I’ll let you know as soon as it’s good :slight_smile:

@Zenfull what are you based on with AI to generate these CSV files?
Because I don’t see the columns I have for example with Électricité de Strasbourg or EDF and the rates don’t seem to be in the right unit: we have prices in euros directly and they are multiplied by 10,000 with the converters of these two examples.



As it stands and not being a developer, I won’t be able to do much, sorry :frowning:
If you have exactly the right columns, just take the convert.js file from the rate directory and it should work.
After that, it is possible to take an example from the json of the other rates but I don’t understand much about this part (I’m more of a classic spreadsheet…)

Another point, I think we don’t manage the differences in days (week/WE/holidays) or the seasons in the energy consumption tracking:


In other words, we could only manage the base rate and maybe the flexibility-off-peak

@pierre-gilles do you think a dev update with the management of different days (and seasons?) could be integrated soon? Is it in your development pipeline?

Here is the conversation history with Mistral … Really sorry about the files. The first prompt wasn’t conclusive at all (I provided the official file from the Enercoop website as an attachment), with the second one, the result seemed satisfactory to me.

However, in this case, I’m a bit disappointed because I have a night and weekend subscription, which is really a shame because I won’t be able to fully enjoy the Lixee TIC that I just bought in this case …

Thanks anyway. I’m not an expert in prompts, maybe sharing a precise and relevant prompt could help generate relevant files more quickly? I thought that by sharing the GitHub link for the constraints, the AI would have better understood the request …

Yes, that can be added :slight_smile:

I would like a separate feature request with the specifics of the contract and the data sources, because I see there is a notion of « holidays », for it to work it needs an open API that exposes these dates :slight_smile:

and here it is:

Thanks @mutmut! I’ll take a look

I think we can close this request thanks to:

Shouldn’t we create the Enercoop external integration?

I thought we could create our own contract, export it, and publish it on the community contracts GitHub, right?
Otherwise, I must have misunderstood then :frowning:

Thank you for your feedback,

In this case, maybe we should update the Gladys Energy Contracts Repo.

Because, according to the articles I read about energy tracking, Gladys can distinguish between days of the week,

However, I don’t know which « data fields » and which value (weekday label) Gladys recognizes

On the repo, I only have this (and that’s maybe why my first attempts failed.

Data Fields

  • contract: Contract type identifier
  • price_type: Always « consumption » for energy consumption pricing
  • currency: « euro », « usd »
  • start_date: Start date of the pricing period (ISO format YYYY-MM-DD)
  • end_date: End date of the pricing period (ISO format YYYY-MM-DD, null for open-ended)
  • price: Price in currency (multiplied by 10000 for integer precision)
  • hour_slots: Time slots when the price applies (contract-specific format)
  • day_type: Day classification for Tempo contracts (« blue », « white », « red »)

I don’t have the means right now to do an external integration, whereas we might just be able to modify the json

Thanks a lot

Hi @Zenfull
Since your Enercoop contract is based on weekdays, it can’t be in the community base and an external integration needs to be developed.

Could you please provide the files for this provider again?

Would a developer (@guim31 @Will_71 @prohand @lmilcent) be up for doing this little Enercoop integration? :wink: ?

Hi,

I take :slight_smile:

Hello @Zenfull,

It’s done: the Enercoop integration is available (v0.0.1).
No need to modify the JSON in the energy-contracts repository: its format does not handle weekends or holidays, so your offer goes through this external integration. You have nothing to develop.

Code and documentation: GitHub - prohand/gladys-enercoop: Gladys external integration to connect enercoop in Gladys · GitHub (Gladys 5.3 minimum)

What it brings

  • The 3 Enercoop offers in Gladys’ contract assistant:
    • Base Offer
    • Off-peak hours flexibility (your off-peak slots)
    • Night and weekend flexibility: Off-peak hours from 11 p.m. to 6 a.m. on weekdays, all weekend and holidays
  • Holidays are calculated by the integration (Alsace-Moselle option).
  • Prices (kWh HP/off-peak and subscription) are entered in the contract: enter those from your bill, the proposed values are indicative.
  • Linky consumption comes from Enedis via Conso API (free): consent, then paste your PRM and token. Data from a day arrives the next morning.
  • A scene trigger for « tariff period change », to start the water heater at the beginning of off-peak hours, including weekends.
  • An action « read current price », a daily consumption threshold, and a widget (current price and period, 14-day graph).

To install it

  1. Integrations → Enercoop → Install.
  2. Enter your PRM and Conso API token, then click « Test connection ».
  3. In the Discovery tab, create the « Linky Enercoop » meter.
  4. In the Energy settings, add the « Enercoop – Night and Weekend Flexibility » contract to the meter.

For your Lixee TIC: In theory, you can also associate the « night and weekend » offer with your Lixee meter, without using the Conso API part. I haven’t tested it yet, your feedback interests me.

This is a first version: don’t hesitate to report any issues here or on GitHub. And if you can give me your HP/off-peak prices and your subscription (on your bill), I will update the default proposed values.