runnane / node-red-contrib-easee

Node-Red module for streaming Easee charger data.
Apache License 2.0
7 stars 4 forks source link

TypeError: Cannot read properties of undefined (reading 'secure'). #12

Closed runnane closed 1 month ago

runnane commented 1 year ago

I started using your node red module and i got it running with my box. thanks for that. I just have two problems:

First i don't get message at the output from the nodes (streaming or rest). I would like to check the status if charging is on or off. I think it should come from the streaming node but its nothing. Is there a fix for this?

Second i get every 5 seconds an error message with the streaming node:

[2023-07-04T11:47:22.081Z] Debug: Sending negotiation request: https://streams.easee.com/hubs/chargers/negotiate?negotiateVersion=1. [2023-07-04T11:47:22.101Z] Warning: Error from HTTP request. TypeError: Cannot read properties of undefined (reading 'secure'). [2023-07-04T11:47:22.105Z] Error: Failed to complete negotiation with the server: TypeError: Cannot read properties of undefined (reading 'secure') [2023-07-04T11:47:22.111Z] Error: Failed to start the connection: Error: Failed to complete negotiation with the server: TypeError: Cannot read properties of undefined (reading 'secure') [2023-07-04T11:47:22.116Z] Debug: HubConnection failed to start successfully because of error 'Error: Failed to complete negotiation with the server: TypeError: Cannot read properties of undefined (reading 'secure')'.

runnane commented 1 year ago

Node version 16.16.0.

Also something else, which is probably related(?): After one day running the rest node stopped working. was red dot with text i don't remember (sorry) and after creating new rest node i see following line in the node-red-log: EaseeConfiguration::doRefreshToken() - No accessToken, exiting

You wrote on github that someone has to login and refresh himself but this does not seem to work. when i send login or refresh it's just not happening anything. Also the other commands don't do anything.

runnane commented 1 year ago

Seems to be an issue with node versions and signalr, but not sure why. Unable to reproduce locally with v16.13.1 and nodered 3.0.2. Will try to pin signalr version to 3.0.0 in version 0.5.3

runnane commented 1 month ago

seems solved