ottopaulsen / node-red-contrib-power-saver

A Node-RED node to saver money by turning off when the power is most expensive
Other
70 stars 17 forks source link

Battery bank charging with powersaver #108

Open torsteinelv opened 1 year ago

torsteinelv commented 1 year ago

Hello.

I have been charging my batteries for a couple of days with the powersaver to reuse power when its expensive, and the savings are big every day.

This is my plan for tomorrow: image

Wheen you look at 10pm to 00am i think its just stupid to charge the batteries caused of when reusing power is cheaper. Is there a way to stop this? Better for me to just keep the battery empty when there is nothing to save.

ottopaulsen commented 1 year ago

Looks like you are using the Best Save node, is that correct? The Lowest Price node is better suited for charging batteries.

torsteinelv commented 1 year ago

sorry forgot to mention that i already use lowest price node: image image

ottopaulsen commented 1 year ago

Then you should fix the graph so that the price is shown correctly. It seems to be smoothed out, and that makes it hard to see what the price actually is.

ottopaulsen commented 1 year ago

But, hey, I think I see your issue. The period is set from 00:00 to 00:00. The last 2 hours on the 4th is actually among the 8 cheapest that day. The next day is another calculation.

You can change to use time from 16:00 to 08:00 or something like that.

torsteinelv commented 1 year ago

Ok. But then no charge between 8 and 16 is done?

torsteinelv commented 1 year ago

Screenshot_20221104-163252_Home Assistant Much better now. But missing the feature to not have to define how many hours on

kristianolofsson commented 1 year ago

Hi, I’m also looking for this. Possible to share your flow? I’m using a 15kwh battery and would like to calculate a predicted forcaste if I should charge/discharge or just use the grid (to save the battery) with every hour.

torsteinelv commented 1 year ago

Yes. I will add forecast also. I can svare the flow but im not happy with it yet

torsteinelv commented 1 year ago

[ { "id":"96227012d2cecae2", "type":"mqtt out", "z":"8b62262273fd21db", "name":"test2", "topic":"", "qos":"0", "retain":"false", "respTopic":"", "contentType":"", "userProps":"", "correl":"", "expiry":"", "broker":"24fbcfb5.569ea", "x":410, "y":1060, "wires":[

  ]

}, { "id":"26eaf7ebbbefe1d1", "type":"function", "z":"8b62262273fd21db", "name":"PÅ", "func":"msg.payload = 57.2;\nmsg.topic = \"solar_assistant/inverter_1/voltage_point_1/set\";\nreturn msg;", "outputs":1, "noerr":0, "initialize":"", "finalize":"", "libs":[

  ],
  "x":250,
  "y":880,
  "wires":[
     [
        "96227012d2cecae2"
     ]
  ]

}, { "id":"55fcc3c6d71df581", "type":"function", "z":"8b62262273fd21db", "name":"AV", "func":"msg.payload = 47;\nmsg.topic = \"solar_assistant/inverter_1/voltage_point_1/set\";\nreturn msg;", "outputs":1, "noerr":0, "initialize":"", "finalize":"", "libs":[

  ],
  "x":250,
  "y":920,
  "wires":[
     [
        "96227012d2cecae2"
     ]
  ]

}, { "id":"24fbcfb5.569ea", "type":"mqtt-broker", "name":"MQTT", "broker":"10.10.10.101", "port":"1883", "clientid":"", "autoConnect":true, "usetls":false, "compatmode":false, "protocolVersion":"4", "keepalive":"60", "cleansession":true, "birthTopic":"", "birthQos":"0", "birthPayload":"", "birthMsg":{

  },
  "closeTopic":"",
  "closeQos":"0",
  "closePayload":"",
  "closeMsg":{

  },
  "willTopic":"",
  "willQos":"0",
  "willPayload":"",
  "willMsg":{

  },
  "userProps":"",
  "sessionExpiry":""

} ]

kristianolofsson commented 1 year ago

Thanks! Yes a forecast would be nice. The question is to how to push the forecast values to HA.

torsteinelv commented 1 year ago

Tale consumption from history and calculate how much energy needed until forcast energy so not charging to much from grid. Also plan for appliances to me using solar or buy when its cheapest.

torsteinelv commented 1 year ago

Is it possible to change the best save to change places to the lowest hours only? This would work much better when able to define the savings.

ottopaulsen commented 1 year ago

I am working on a node that can combine schedules from multiple strategy nodes. With this you can combine a Best Save and a Lowest Price with AND to get only the Best Save hours that are among the x cheapest hours. Not sure it will give you exactly what you want, but maybe. It will be released in v4.0.0, hopefully in a few days or weeks.

ottopaulsen commented 1 year ago

Please take a look at the new Schedule Merger node in version 4.

torsteinelv commented 1 year ago

Thanks. Trying this out now. What about adding a schedule from forcast pv energy to add to the prices? For people with solar powered homes a forcast energy for the next day can be planned into the schedule and eq hotwater can be turned on here?

I Can try to make this myself just modifying the flow but I think many people would like this feature.