Rules based on Flex Alerts

So my wife and I were talking about the current western heat wave and and a conserve email I received from our energy provider today.

Basically they are saying try to run less things during the alert today in the 5-10PM time frame.

That got me thinking about creating some tweaks to my automation rules that would only turn on what I call critical lights at sunset.

Right now I turn on lots of comfort lights including side table lights and landscape lights amongst other things at the appropriate evening times.

However If there was a way to automatically determine there was a utility conserve alert "Flex Alert" I would like to not turn on the nice to have vs the critical lights.

Has anybody set something up like that and figured a way to determine if there is a Flex alert and set it either in a mode or some global variable that I can use in triggering rules.

Does your utility have an API for its website? Iā€™ve seen some threads for similar things, but, as I recall, they either involved scraping the HTML for the utility website, or using an endpoint provided by the utility that could be polled using the API. The use cases I have seen involved scheduling washing, drying, irrigation, etc., during low cost periods.

I believe the more appropriate way to modify your rules, rather than having a trigger, would be to use a virtual switch in a condition for deciding what to turn on. That way, you could solve the problem in two parts:

  1. Modify your rules to use the virtual switch in conditions, and add the virtual switch to a dashboard (or link to Alexa, etc.) so you could manually enable the conserve mode and fully test out your rules, and

  2. Focus on extracting the info from the utility.

Such an approach decouples the utility info extraction from getting something quickly working.

1 Like

Basically what I was thinking but either way managing the condition is the question?

We are in the PG&E San Jose area and I thought I would ask first before reinvent things.

There is a website www.flexalert.org I could scrape as well as the caliso.org app but it does not look programmatical.

Thereā€™s no need for a global variable that I can see. Just have your rule(s) use the virtual switch directly in conditions. If you want to avoid the (very slight, since itā€™s a virtual switch) overhead of examining the virtual switch state in various conditions, you could set a local variable at the start of the rule based on the state of the virtual switch.

I believe that global variables are implemented similarly to virtual devices, anyway. The overhead should be about the same.

1 Like

I think this is probably the easiest and most logical approach. Virtual switch = off, things are normal. VS = on actions blocked.

@bob8 does your utility send emails, text, or have an Google calendar? If there is a calendar, there are calendar integrations for Hubitat. There might be a way to get an email event into a Google calendar, not sure...

Another thing you might try is to use weather, once it hits (some number) temperature, you block your automations. It might not work perfectly that way, but might be better than nothing.

The other thing to consider would be: do you really need everything on every night? Maybe rethink things, things like outdoor lights are off by default unless there is motion. Turn them off until later or limit their hours. Go to LED that draw less current overall. But the biggest savings will be A/C and water heating, and if you have it electric oven/stove. Those 3 things always dwarf things like lighting.

1 Like

Yes you are right about the big draws. Our house is also LED across the board. But you know being a good citizen and being retired it's something to do.

1 Like

Update for now I created a virtual switch I can turn on with an Alexa command or the Hubitat app.
If the switch is on my non critical items like landscape lights and such will not run. I disable the switch every night at 10PM.

I will probably look at ways to automate enabling the switch at some point.

1 Like

If you want to change topics very slightly, what do you use to heat your water? Probably 3 years ago, I changed from a tank electric to a hybrid heat pump (tank) water heater. It cut my bill dramatically. Like average of $30-$40 a month. And I am in cold Michigan, not the "ideal" climate for a heat pump water heater. It paid for the cost of itself within a couple years. And with the Rheem, there is a community integration, so you could even turn down the temperature or turn off the water heater if you desire, although they work best when they just sit and run.

We have a Gas Tankless water heater. Only runs when hot water is demanded.

We are also in the process of locking down Solar.

I was going to get a battery but the building codes are getting a bit onerous for that. They can't be close to doors or windows. They cant be on the south side of the house in direct sunlight. They can't be in the garage unless you have a fire sprinkler. We literally don't have any good place around the house that satisfies all those conditions.

1 Like

Check out the flex alert data page..
California ISO - Today's Outlook (caiso.com)

and the alert page: California ISO - Alert Warning Emergency Notices (caiso.com) there's an app and an RSS feed. content.caiso.com/awe/noticeflexRSS.xml

With RSS we can do IFTT.

1 Like

Can also use an xmlSlurper to parse an Rss feed if someone wants to write a quick app.

This looks like a close example to the IFTTT mention above

Looking at todays CAISO report it has yesterdays Flex alert Notice and then a new notice at the top saying Cancelled. I really need to be able to do more if then else if logic which seems to be only available in IFTTT Pro which I really don't want to pay for at this moment.

Parsing essentially log records to see if they apply to today and they have not been cancelled is more than a simple pattern match. Sigh!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.