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

No Shedule - all looks OK?! #165

Open Nornode opened 1 year ago

Nornode commented 1 year ago

Hi, Posersaver.no has been working rock solid for a long time however the last few days it has not been calculating schedules. However Ffr no reason to me, my flows have all stopped calculating schedules. I don't know what I need to do to make it work. Remove and re-build all flows? The Nordpool integration has already been re-installed (not created a new integration) on Home Assistant, I genuinely don't know what's wrong.

I'm running with home assistant version 2023.04.4 Nordpool HACS plugin v0.0.13, Node-Red v3.0.2

Output of debug in Lowest Price strategy node: This one is supposed to be on 3 cheapest hours split is allowed. Yet, no schedule is given.

Ful Object

{"payload":{"schedule":[{"time":"2023-04-15T00:00:00+03:00","value":false,"countHours":25}],"hours":[{"start":"2023-04-15T00:00:00+03:00","price":1.57,"onOff":false,"saving":null},{"start":"2023-04-15T01:00:00+03:00","price":1.571,"onOff":false,"saving":null},{"start":"2023-04-15T02:00:00+03:00","price":1.571,"onOff":false,"saving":null},{"start":"2023-04-15T03:00:00+03:00","price":1.571,"onOff":false,"saving":null},{"start":"2023-04-15T04:00:00+03:00","price":1.573,"onOff":false,"saving":null},{"start":"2023-04-15T05:00:00+03:00","price":1.576,"onOff":false,"saving":null},{"start":"2023-04-15T06:00:00+03:00","price":1.582,"onOff":false,"saving":null},{"start":"2023-04-15T07:00:00+03:00","price":2.923,"onOff":false,"saving":null},{"start":"2023-04-15T08:00:00+03:00","price":2.925,"onOff":false,"saving":null},{"start":"2023-04-15T09:00:00+03:00","price":2.935,"onOff":false,"saving":null},{"start":"2023-04-15T10:00:00+03:00","price":2.935,"onOff":false,"saving":null},{"start":"2023-04-15T11:00:00+03:00","price":2.928,"onOff":false,"saving":null},{"start":"2023-04-15T12:00:00+03:00","price":2.926,"onOff":false,"saving":null},{"start":"2023-04-15T13:00:00+03:00","price":2.925,"onOff":false,"saving":null},{"start":"2023-04-15T14:00:00+03:00","price":2.924,"onOff":false,"saving":null},{"start":"2023-04-15T15:00:00+03:00","price":2.924,"onOff":false,"saving":null},{"start":"2023-04-15T16:00:00+03:00","price":2.925,"onOff":false,"saving":null},{"start":"2023-04-15T17:00:00+03:00","price":2.925,"onOff":false,"saving":null},{"start":"2023-04-15T18:00:00+03:00","price":2.93,"onOff":false,"saving":null},{"start":"2023-04-15T19:00:00+03:00","price":2.937,"onOff":false,"saving":null},{"start":"2023-04-15T20:00:00+03:00","price":2.94,"onOff":false,"saving":null},{"start":"2023-04-15T21:00:00+03:00","price":2.938,"onOff":false,"saving":null},{"start":"2023-04-15T22:00:00+03:00","price":1.595,"onOff":false,"saving":null},{"start":"2023-04-15T23:00:00+03:00","price":1.592,"onOff":false,"saving":null},{"start":"2023-04-16T00:00:00+03:00","price":1.588,"onOff":false,"saving":null}],"source":"Nordpool","config":{"fromTime":"18","toTime":"18","hoursOn":3,"maxPrice":null,"doNotSplit":false,"sendCurrentValueWhenRescheduling":true,"outputIfNoSchedule":false,"outputOutsidePeriod":false,"outputValueForOn":true,"outputValueForOff":true,"outputValueForOntype":"bool","outputValueForOfftype":"bool","override":"auto","contextStorage":"memory","hasChanged":false},"time":"2023-04-17T22:16:16.602+03:00","version":"4.1.3","strategyNodeId":"391ac08890e0dd40","current":false},"_msgid":"9f4c6b1c8c56b810"}

My flow:

Details

[ { "id": "3662aca5.dfe974", "type": "server-state-changed", "z": "55a9113465e6b694", "name": "Nord Pool sensor", "server": "63fde485.d542dc", "version": 4, "exposeToHomeAssistant": false, "haConfig": [ { "property": "name", "value": "" }, { "property": "icon", "value": "" } ], "entityidfilter": "sensor.nordpool_kwh_fi_eur_3_075_01", "entityidfiltertype": "exact", "outputinitially": true, "state_type": "str", "haltifstate": "", "halt_if_type": "str", "halt_if_compare": "is", "outputs": 1, "output_only_on_state_change": true, "for": 0, "forType": "num", "forUnits": "minutes", "ignorePrevStateNull": false, "ignorePrevStateUnknown": false, "ignorePrevStateUnavailable": false, "ignoreCurrentStateUnknown": false, "ignoreCurrentStateUnavailable": false, "outputProperties": [ { "property": "payload", "propertyType": "msg", "value": "", "valueType": "entityState" }, { "property": "data", "propertyType": "msg", "value": "", "valueType": "eventData" }, { "property": "topic", "propertyType": "msg", "value": "", "valueType": "triggerId" } ], "x": 340, "y": 240, "wires": [ [ "e21a4b49adea2350" ] ] }, { "id": "ed7202ff.b5725", "type": "debug", "z": "55a9113465e6b694", "name": "Nord Pool result", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1320, "y": 320, "wires": [] }, { "id": "e21a4b49adea2350", "type": "ps-receive-price", "z": "55a9113465e6b694", "name": "Price Receiver", "x": 540, "y": 240, "wires": [ [ "ea137ce567c62f2f", "469e580a9a582967" ] ] }, { "id": "391ac08890e0dd40", "type": "ps-strategy-lowest-price", "z": "55a9113465e6b694", "name": "Lowest Price Boiler 3h", "fromTime": "18", "toTime": "18", "hoursOn": "3", "maxPrice": "", "doNotSplit": false, "sendCurrentValueWhenRescheduling": true, "outputValueForOn": "true", "outputValueForOff": "true", "outputValueForOntype": "bool", "outputValueForOfftype": "bool", "outputIfNoSchedule": "false", "outputOutsidePeriod": "false", "contextStorage": "memory", "x": 1080, "y": 240, "wires": [ [ "e7daf43a90bfd1d9" ], [ "bc191a59f5dbbd3a" ], [ "ed7202ff.b5725", "cad33a63f66ef72e" ] ] }, { "id": "469e580a9a582967", "type": "ps-general-add-tariff", "z": "55a9113465e6b694", "name": "Add Caruna Tariff", "periods": [ { "start": "07", "value": "2.88" }, { "start": "22", "value": "1.54" } ], "validFrom": "", "validTo": "", "days": { "Mon": true, "Tue": true, "Wed": true, "Thu": true, "Fri": true, "Sat": true, "Sun": true }, "x": 850, "y": 240, "wires": [ [ "10865d8233f54ed5", "391ac08890e0dd40" ] ] }, { "id": "e7daf43a90bfd1d9", "type": "api-call-service", "z": "55a9113465e6b694", "name": "Turn Boiler On", "server": "63fde485.d542dc", "version": 5, "debugenabled": false, "domain": "switch", "service": "turn_on", "areaId": [], "deviceId": [], "entityId": [ "switch.vv_beredare" ], "data": "", "dataType": "jsonata", "mergeContext": "", "mustacheAltTags": false, "outputProperties": [], "queue": "none", "x": 1320, "y": 220, "wires": [ [] ] }, { "id": "bc191a59f5dbbd3a", "type": "api-call-service", "z": "55a9113465e6b694", "name": "Turn Boiler Off", "server": "63fde485.d542dc", "version": 5, "debugenabled": false, "domain": "switch", "service": "turn_off", "areaId": [], "deviceId": [], "entityId": [ "switch.vv_beredare" ], "data": "", "dataType": "jsonata", "mergeContext": "", "mustacheAltTags": false, "outputProperties": [], "queue": "none", "x": 1315.5555686950684, "y": 264.44444942474365, "wires": [ [] ] }, { "id": "63fde485.d542dc", "type": "server", "name": "ha.lagus.net - Local IP", "version": 5, "addon": false, "rejectUnauthorizedCerts": true, "ha_boolean": "y|yes|true|on|home|open", "connectionDelay": true, "cacheJson": true, "heartbeat": false, "heartbeatInterval": 30, "areaSelector": "friendlyName", "deviceSelector": "friendlyName", "entitySelector": "friendlyName", "statusSeparator": "at: ", "statusYear": "hidden", "statusMonth": "short", "statusDay": "numeric", "statusHourCycle": "h23", "statusTimeFormat": "h:m", "enableGlobalContextStore": true } ]

Nornode commented 1 year ago

Something happened, I really can't say what and I'm now looking at schedules for all my powersaver nodes... I don't know what happened or why it started working again.. ¯_(ツ)_/¯

john-arvid commented 1 year ago

Maybe I'm having the same issue, haven't had any schedule for 3 days. Would be nice to get some directions from the devs on how to troubleshoot something like this? Want to contribute so one doesn't experience no hot water suddenly.

Nornode commented 1 year ago

I realised that I downgraded the nordpool plugin on Home Assistant and it seems to have done the trick...?

john-arvid commented 1 year ago

I'm still running on Nordpool version 0.0.7, and haven't done any other updates on my HA system.

Nornode commented 1 year ago

I can't say anything about your HA version, the nordpool I'm using 0.0.12. try it maybe?

john-arvid commented 1 year ago

Still no schedule, and price receiver is ok with 24 hours from nordpool.

Nornode commented 1 year ago

I had the same issue again and I had to restart homeassistant and it again gives me a schedule (and displays 48h from Nordpool).

So seems like there's something in between homeassistant and NodeRed not giving it all 48h ?

shadowano commented 1 year ago

I'm also having no schedules for the last day.

I added a debug node to Nordpool sensor, Price Receiver and Add Elvia Grid Tariff. As I didn't get any data from nordpool sensor node, I removed the checkbox for "Ingore state change event when: [ ] Current State is Unknown". After this the nordpool sensor reports "unknown", this is the value for the State attribute. The Price data array returned from Price Receiver shows price information for tomorrow, but not for today.

In Home Assistant I went to Developer menu item, and opened the STATES tab page. Filtering entities for "nordpool" gives me the sensor "sensor.nordpool_kwh_oslo_nok_2_10_025" (which is the one used in the Node Red Nordpool sensor). This shows State column as unknown, Current price is null and there are no price values for today, only for tomorrow.

The problem is with the nordpool plugin, and not a problem with powersaver nodes.

I did a full reboot of my Home Assistant and all plugins and that solved the problem for me. I now have price information for all 48 hours.

Btw to prevent cold water in the shower you can enforce the strategy node to send ON when there is no schedule. This will keep your water hot, still preventing using too much power, but will not control according to price data as there is none.

john-arvid commented 1 year ago

Tried to reboot several times, yesterday it started to work again (I got 48 hours and a schedule). So this is seems like a issue with nordpool.

john-arvid commented 1 year ago

Not sure if the "24/48 hours from Nordpool" is a indication that is worth anything when troubleshooting. I have checked a bit lately and I only get "24 hours from Nordpool" on the Price Reciever. But the nordpool entity still has today and tomorrow.