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

If ps-elvia-add-tariff fails to authenticate, Node Red will crash and refuse to start. #75

Closed phellarv closed 1 year ago

phellarv commented 2 years ago

How to replicate: 1) Add ps-elvia-add-tariff. 2) Use bogus (or not active) API key from Elvia. 3) Deploy. It then fails to get Tariff. If you then remove ps-elvia-add-tariff, and then try to deploy, you get an "502 Bad Gateway" error, and Node Red crashes. It will not start again.

Wiigian commented 2 years ago

I closed #76, as it was a duplicate of this issue, but for me, the node still crashes when using a key that is supposed to be active. According to the analytics page, the calls are successful, so I'm fairly sure that my API key is working and is entered correct.

phellarv commented 1 year ago

Any chance that this issue could get some love? It's a showstopper as of now.

ottopaulsen commented 1 year ago

Got love tonight :-) Fix is done in version 3.6.2. Should be published before midnight if everything goes well. Please try it out and report back here.

Wiigian commented 1 year ago

I've updated and tested this, and I can confirm that it is now working for me! The API key I used has not been changed, it was correct also when node-red crashed earlier.

phellarv commented 1 year ago

It is not crashing now, but I still get Unauthorized when using the api-key from Elvia.

Wiigian commented 1 year ago

It is not crashing now, but I still get Unauthorized when using the api-key from Elvia.

Are you using the API key from "Min Side" at Elvia, or the Elvia developer portal?

phellarv commented 1 year ago

Min Side. Should I be using the developer one?

Wiigian commented 1 year ago

Min Side. Should I be using the developer one?

Yes, don't ask me how I know

phellarv commented 1 year ago

Where do I get the developer API key? I have signed up in the developer portal, but I cannot see any way to get an API key?

Wiigian commented 1 year ago

It's listed under products, you have to add a subscription. Take a look at the description here

phellarv commented 1 year ago

It's listed under products, you have to add a subscription. Take a look at the description here

Thanks - Now I'm connected, and all good.