3 modes based on price

I have defined 3 scenes defined for my smart life set up.
They are called :

  • Normal Electricity
  • Avoid Electricity
  • Use Electricity

The first one i use for the hours that electricity is within a 20% range above or below the average price for that day.
The second one is for when the price is above that 20%
The third one is for when the price is below those 20%

These are the three states my system needs to be in.

I would like to run stekker at ifttt at the beginning of each hour to decide which state to be in.
Which stekker-ifttt scripts should I write?

The way you can currently use IFTTT with Stekker is as follows:

  • Absolute price thresholds (e.g. above 0.2 EUR)
  • Relative: a price threshold compared to the other hours (e.g. trigger when one of the cheapest 2 hours occurs)

There is currently no average price being calculated. There might not be a price that’s 20% above the average, or a lot of them may be above it. This requires you to update the rule if the market circumstances change. The same applies to the absolute thresholds, and we have those… but consider you want to run an electric boiler at a certain price and otherwise use gas, this is a valid use case.

For the ranked prices we use an ordinal system instead of a percentage compared to the average of the day. This means prices are ranked from the cheapest hour (1) to the most expensive one (24). The median price is in the middle (12).

With the ordinal states, there are always cheapest hours and always most expensive hours, so you’re sure that it will be in this state for this amount of hours.

On days that have a rather flat curve there is not much point in trying to save money based on the stekker applets. In case of battery it will even make you loose money due to the 20% loss. It would make your system worthless for many.

When putting up the prices for the next day, it would be helpful if you take the price of the cheapest hour (min) and the most expensive hour (max) and calculate delta = (max-min)/min and use the result to allow us add another condition to each applet which is like “fire on delta today is above [value]” and we can set that value above which we want it to be,

Meanwhile I have the 4 applets running that turn on and off charging and turn on and off the normal use of the grid.
Charging I do 3 hours every 24 hours.
Normal grid use I do 18 hours a day (the 18 cheapest), so 6 hours (logically the 6 most expensive) my kitchen runs on batteries. I am still trying to find the perfect balance between these 3 and 18.

Now if I just would have a method to avoid those days with little variance in the prices, the flatliner days… :slight_smile:

I looked into this but it’s not easy to offer this additional field.

Due to the way it was built, it’s not trivial to add an aggregate/calculated value over the window that also uses a current value. I wish I could help you with this, but I think we need to prioritize features that benefit many users and this one doesn’t seem to be that, yet.

Just to check, are you using a query or a trigger?

Trigger, Query?

Just an ifttt-applet

Trigger I think based on the pictures below.
These applets turn on normal power through the transferswitch. So normal power is on for the 18 cheapest hours a day. Leaves us 6 hours that are the most expensive hours in which everything that consumes is of but my microinverter send electricity from a battery into the grid so I have negative consumption during high priced hours.

The two other applets run on a different ifttt account to save money and they turn on charging in my house on the cheapest 3 hours of the 18 hours mentioned above.

Just changed to two hours charging and 4 hours discharging a day.
This should help to have a bigger price difference between buying electricity and using it, while not cycling my batteries that much. Cycling batteries are a costfactor here. They are lifepo4 and I hope to be able to use them for 20 years :slight_smile:

It also solves my 20% question partly as on most days there are at least 4 hours where the price is 20% higher than the average price for that day. And 2 hours with the lowest price which often is at least 20% below average for that day.

This should help to make relative more money per batterycycle and problably also helps to have more wH in the battery the momen the grid fails.
Charging for less hours also allows my Ecoflow batteries to use more from my solarsystem as my EcoFlows cannot charged from AC and sun at the same time.

Of course I could also slow down the chargingspeed of the batteries a bit, which is good for cycle life.

It is a balancing act.