Hydro quebec winter credit / peak events

Hello,

I created a new github repo with a bit of code that might interest Quebec users.

This is a simple module to interact with Hydro QC API and get information.

So far I’m interested in getting the next peak event in HA, so that’s what I’ve focused on.

It’s not super advanced and will for now only give you a JSON object like this :

{
 "current_winter": {
  "past": {
   "1641294000.0": {
    "date": "2022-01-04",
    "start": "06:00:00",
    "end": "09:00:00"
   },
   "1641243600.0": {
    "date": "2022-01-03",
    "start": "16:00:00",
    "end": "20:00:00"
   },
   "1641207600.0": {
    "date": "2022-01-03",
    "start": "06:00:00",
    "end": "09:00:00"
   }
  },
  "future": {
   "1641330000.0": {
    "date": "2022-01-04",
    "start": "16:00:00",
    "end": "20:00:00"
   }
  }
 },
 "past_winter": {},
 "next": {
  "1641330000.0": {
   "date": "2022-01-04",
   "start": "16:00:00",
   "end": "20:00:00"
  }
 }
}

As some might expect it’s based partly on the pyhydroquebec (GitHub - titilambert/pyhydroquebec: Get your consumption data from your HydroQuebec account (www.hydroquebec.com)) project but is more focused on winter credit automation as of now.

I hope some might be interested to improve/contribute to make it a bit nicer, i’m open to ideas / PR like include MQTT for instance :slight_smile:

1 Like

MQTT is now included as an implementation example and data about winter peak events are better (thanks to the discussion we had with few people).

This will improve with contribution so if you’re in QC and are on Flex D or Winter Credit tarifs, share your thought / ideas.

The other aspect is the consumption information, however that is an entirely different topic as the data is delayed and is thus not compliant with HA energy (if I understood other topics correctly)

1 Like

I just want to let people know that this project has been moved and greatly improved on since this initial post. The project supports the following:

  • Hourly Energy consumption sent to the Energy Dashboard
  • Winter credit information and triggers, including a blueprint
  • General account information

We provide both a docker image (hydroqc2mqtt) and a Home-Assistant Add-on

You can find more info here : https://hydroqc.ca

1 Like

Hello, FYI recently a new feature was added to home assistant core, Local calendar.

I’m using it to enter the winter credit peak periods in it and do my automation when an event starts or ends from my “hydro-québec” calendar.

My idea was to check my email account using the “IMAP Email Content” integration and filter on hydroquebec address and parse the body to find the date and time period, it’s always either 6-9am or 4-8pm. Now we may automatically create an event to a calendar.

I did a try but currently my issue is the email body is just full of html tags and french accents are not properly decoded by default.

<li>7 f=C3=A9vrier, de 6 h &agrave;&nbsp;9 h, =\r\nen matin&eacute;e.</li>=0A</ul>

When I’ll be able to parse the date/dates because sometimes they send multiple periods in one email, my setup will be just fine.

I did try your addon in december but I was unsure how to use it properly, finally the calendar thing was added and uninstalled your addon because I thought it was overkill.

Cheers,

2 Likes