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

Tibber connectivity #173

Open pittbull opened 1 year ago

pittbull commented 1 year ago

Yesterday after upgrading HA to 10.1 my capacity live node will not connect to the Tibber api. As per screenshot it will stay in "connecting" mode without giving any info in debug or in NR logfile.

I have tried to activate/deactivate and disable/enable but it stays the same.

Do you have any tips?!

image

ottopaulsen commented 1 year ago

It is obviously something with your Tibber connection, but I have no idea what it might be.

pittbull commented 1 year ago

Agreed, but I am unable to extract any logs. If I change the API-key I get an error on wrong key, so the link is there - but no errors anywhere...

ottopaulsen commented 1 year ago

Did you figure this out?

pittbull commented 1 year ago

Well, to be honest, I do not know what solved it. Running out of ideas I disabled and reset a few nodes and suddenly it was all up and running again. I also increased the timeouts on the node at the same time (and reset them to default later). The problem has not reoccured.

pittbull commented 1 year ago

Having said that the issue reoccured just this evening after a regular restart.

This is the error:

image

And these nodes are not created:

image

And this warning is shown on the "find highest per day"-node:

image

Could the 400 errors be related to not being able to set the value for these two, as they - for some reason - are unknown?

//UlfThomas

pittbull commented 1 year ago

Situation autoresolved itself during the night 🤷‍♂️

ottopaulsen commented 1 year ago

It is the Set entity node that reports errors. It is connecting to the Home Assistant API. 400 means client error, so yes, there may be something wrong in the previous nodes. That error message was very strange. Looks like a compilation error. The strange thing is that it only happens some times. Seems to be some bug in the code that occurs only when some data is missing. Would be interesting to know the inpt to the "find highest per day" node, but I guess that is hard to get hold of now.

pittbull commented 1 year ago

Confirming "set entity"-node.

Agreed. And yes, for the time being it would be kinda hard to debug. I'll make sure to capture this data if it happens again.

I did switch on "show debug" on this node and it output an amount of successful operations and 2 errors (same as above). That's why I'm thinking correlation with the 2 missing sensors in HA.

Thinking about error in previous nodes: could the issue be related to a lack of data (from Tibber?) resulting in code not being able to compute "top 3" in the start of a month? I think I've seen this somewhere else?