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

Reset action turns on device outside of schedule #134

Open shadowano opened 1 year ago

shadowano commented 1 year ago

Hi,

I have seen a couple of times now that the reset and reduction actions run outside of schedule. It happened today, where I had to manually turn off the VVB heater.

Below you can see that my VVB is consuming power between 18:30 and 19:00 today image

and below this you can see the schedule (and consumed power per hour (high for outside schedule) image

How does the reset action node know that it's in schedule or outside?

ottopaulsen commented 1 year ago

Not sure I understand exactly your problem, but with the latest version of the nodes and the example, you can use the reduction action to override the best save and lowest price nodes so that they are forced off if a reduction action is necessary, and then turned back to auto when the action is reset.

shadowano commented 1 year ago

Not sure I understand exactly your problem, but with the latest version of the nodes and the example, you can use the reduction action to override the best save and lowest price nodes so that they are forced off if a reduction action is necessary, and then turned back to auto when the action is reset.

That is what i do, but how does the Reset action node know that it should not turn on the VVB if it's outside of the schedule?

Reset action sends a payload to turn on a device, right?

ottopaulsen commented 1 year ago

No, the reset action sets it back to auto, so it will be fine.

shadowano commented 1 year ago

In both the example screenshot and in my setup the Reset action node is connected to a Perform action node. Reset action node sends on output 1 the "payloadToResetAction" json defined in On Start part of the Reduction node.

image

Your examples also shows that "payloadToResetAction" is used to send turn_on actions to the Perform Action node, which is also what I do.

So if I'm still not misunderstanding something, the Reset action node also turns on the device, right?

Should I remove this link, so that it does not turn it on again? If I do this, will the reset command to the best save/lowest price nodes have them turn on the device immediately, or will it only do this when the hour changes?

ottopaulsen commented 1 year ago

You should not remove the link, as you may use it for other actions (not controlled by the strategy nodes), but you should remove the payloadToTakeAction and payloadToResetAction config when you are using strategy override. See Issue #145