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

Capacity grid #109

Open pittbull opened 1 year ago

pittbull commented 1 year ago

Hi. I've implemented your nodered "Capacity part of grid tariff", and to me the reduction part does not seem to work. I am unable to confirm if a device is actually turned off and reset when requested.

This is what was logged during last night and at least for the vvb I cannot find that it has turn off or on at the times mentioned in the actions. Are you able to spot if I have done something wrong on my part?

{"time":"2022-11-07T02:00:01.786Z","name":"Reduction action","data":{"status":"Alarm","statusOk":false,"statusWarning":false,"statusAlarm":true,"alarmLevel":8,"highestPerDay":[{"from":"2022-11-05T20:00:00.000+01:00","consumption":4.652},{"from":"2022-11-01T05:00:00.000+01:00","consumption":4.236},{"from":"2022-11-04T02:00:00.000+01:00","consumption":4.016},{"from":"2022-11-06T17:00:00.000+01:00","consumption":3.71},{"from":"2022-11-07T00:00:00.000+01:00","consumption":2.96},{"from":"2>
{"time":"2022-11-07T02:00:01.787Z","name":"Reduction action","data":{"status":"Alarm","statusOk":false,"statusWarning":false,"statusAlarm":true,"alarmLevel":8,"highestPerDay":[{"from":"2022-11-05T20:00:00.000+01:00","consumption":4.652},{"from":"2022-11-01T05:00:00.000+01:00","consumption":4.236},{"from":"2022-11-04T02:00:00.000+01:00","consumption":4.016},{"from":"2022-11-06T17:00:00.000+01:00","consumption":3.71},{"from":"2022-11-07T00:00:00.000+01:00","consumption":2.96},{"from":"2>
{"time":"2022-11-07T02:00:05.649Z","name":"Reduction action","data":{"status":"Alarm","statusOk":false,"statusWarning":false,"statusAlarm":true,"alarmLevel":8,"highestPerDay":[{"from":"2022-11-05T20:00:00.000+01:00","consumption":4.652},{"from":"2022-11-01T05:00:00.000+01:00","consumption":4.236},{"from":"2022-11-04T02:00:00.000+01:00","consumption":4.016},{"from":"2022-11-06T17:00:00.000+01:00","consumption":3.71},{"from":"2022-11-07T00:00:00.000+01:00","consumption":2.96},{"from":"2>
{"time":"2022-11-07T02:00:12.049Z","name":"Reduction action","data":{"status":"Alarm","statusOk":false,"statusWarning":false,"statusAlarm":true,"alarmLevel":8,"highestPerDay":[{"from":"2022-11-05T20:00:00.000+01:00","consumption":4.652},{"from":"2022-11-01T05:00:00.000+01:00","consumption":4.236},{"from":"2022-11-04T02:00:00.000+01:00","consumption":4.016},{"from":"2022-11-06T17:00:00.000+01:00","consumption":3.71},{"from":"2022-11-07T00:00:00.000+01:00","consumption":2.96},{"from":"2>
{"time":"2022-11-07T03:00:01.938Z","name":"Reset action","action":{"consumption":"sensor.master_bathroom_electric_consumption_w","name":"Varme gulv bad 2. etg.","id":"gulvmasterbad","minAlarmLevel":3,"reduceWhenRecommended":true,"minTimeOffSec":300,"payloadToTakeAction":{"domain":"climate","service":"turn_off","target":{"entity_id":["climate.master_bathroom"]}},"payloadToResetAction":{"domain":"climate","service":"turn_on","target":{"entity_id":["climate.master_bathroom"]}},"actionTak>
{"time":"2022-11-07T03:00:01.938Z","name":"Reset action","action":{"consumption":"sensor.entrance_electric_consumption_w","name":"Varme gulv gang 1. etg.","id":"gulvgang","minAlarmLevel":3,"reduceWhenRecommended":true,"minTimeOffSec":300,"payloadToTakeAction":{"domain":"climate","service":"turn_off","target":{"entity_id":["climate.entrance"]}},"payloadToResetAction":{"domain":"climate","service":"turn_on","target":{"entity_id":["climate.entrance"]}},"actionTaken":true,"savedConsumptio>
{"time":"2022-11-07T03:00:01.938Z","name":"Reset action","action":{"consumption":"sensor.washroom_electric_consumption_w","name":"Varme gulv vaskerom","id":"gulvvaskerom","minAlarmLevel":3,"reduceWhenRecommended":true,"minTimeOffSec":300,"payloadToTakeAction":{"domain":"climate","service":"turn_off","target":{"entity_id":["climate.washroom"]}},"payloadToResetAction":{"domain":"climate","service":"turn_on","target":{"entity_id":["climate.washroom"]}},"actionTaken":true,"savedConsumptio>
{"time":"2022-11-07T03:33:13.797Z","name":"Reset action","action":{"consumption":"sensor.waterheater_electric_consumption_w","name":"Varmtvannsbereder","id":"vvb","minAlarmLevel":3,"reduceWhenRecommended":true,"minTimeOffSec":300,"payloadToTakeAction":{"domain":"switch","service":"turn_off","target":{"entity_id":["switch.waterheater"]}},"payloadToResetAction":{"domain":"switch","service":"turn_on","target":{"entity_id":["switch.waterheater"]}},"actionTaken":true,"savedConsumption":2.1>
ottopaulsen commented 1 year ago

Looks like 4 actions was taken, and then reset an hour later.

pittbull commented 1 year ago

Looks like 4 actions was taken, and then reset an hour later.

Indeed they were. Problem was found in my head.

A follow-up question: Will the state of devices turned off be kept after reboot or restarts of nodered?

ottopaulsen commented 1 year ago

No, when you reboot you have to start over again. I am not sure what happens if you set context storage to file. Maybe it is restored then, but I guess it is not perfectly handled.