ottopaulsen / node-red-contrib-power-saver

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

ps-strategy-lowest-price FromTime ToTime #167

Open Home-Control9000 opened 1 year ago

Home-Control9000 commented 1 year ago

Hi,

In 'ps-strategy-lowest-price' module you can set 'FromTime'. This is a fixed value. In practice for example you want to schedule the washmachine on the lowest hour price that day. Is it possible to replace FromTime to actual time? This is usefull when you schedule in the morning for eaxmple 6am. The hours between 0 and 6am are not available anymore.

Regards, Walter

ottopaulsen commented 1 year ago

Sorry, I do not understand the question. Are you looking for something like the Fixed Schedule node?

Home-Control9000 commented 1 year ago

Sorry, I do not understand the question. Are you looking for something like the Fixed Schedule node?

No, I want the lowest hour price. So i want to use the ps-strategy-lowest-price module. The problem is that the FromTime and ToTime are fixes values (hours) I want to have the lowest hourprice starting at the actual hour. For example when i wakeup and want to schedule the washingmachine then the time is 6am. Then calculating the lowest price must start from that time. The hours before 6am are already past.

Walter

ottopaulsen commented 1 year ago

Ok, so you want the lowest price from "now". You would have to use dynamic config. Find the current hour or maybe the next, and send it to the node as the new fromTime.

Home-Control9000 commented 1 year ago

Thanks for your fast reply! I was looking for that:) I will try this. Someting else. Im connecting to the energyZero API (Netherlands ANWB Energie) Im already have a working Node-Red API for this. Im parsing every hour a JSON. I read i must create a specific JSON input but im just a beginner Node_red programmer. The JSON i received from Energyzero looks like this:

image

Can you give me some tips how i can convert this to the needed format as said in the docs? Thankyou.

image