SvenFinn / pwl-homeassistant

PWL Adapter for homeassistant mqtt
MIT License
0 stars 1 forks source link

Authentication errors #23

Open Lmax12 opened 1 month ago

Lmax12 commented 1 month ago

I'm having issues with this script. Though triple checked it still gives errors on authentication. I even removed weird characters from the password, since those might break some code. Any suggestions what could be wrong?

[17:03:53.857] INFO (pwl-client/1): Authenticating [17:03:53.857] INFO (pwl-client/1): Waiting for authentication [17:03:53.860] ERROR (pwl-client/1): Failed to authenticate Error: Failed to authenticate at PwlClient.waitForAuthentication (/app/pwl/pwl.js:94:23) at async PwlClient. (/app/pwl/pwl.js:120:13) at async retryWrapper (/app/pwl/retryWrapper.js:8:20) at async PwlClient.getDiscoveryData (/app/pwl/pwl.js:119:28) at async main (/app/index.js:17:31) /app/pwl/retryWrapper.js:15 throw new Error("Failed to execute function after " + retries + " retries"); ^

Error: Failed to execute function after 3 retries at retryWrapper (/app/pwl/retryWrapper.js:15:11) at async PwlClient.getDiscoveryData (/app/pwl/pwl.js:119:28) at async main (/app/index.js:17:31)

Node.js v20.17.0

SvenFinn commented 1 month ago

Hi,

thanks for reporting the issue. It should be fixed with the latest version of the container. Please check if your deployment work now :)

Best regards, Fabian

Lmax12 commented 1 month ago

Hi Fabian,

The authentication now seems to work, but i still have errors, and now data is being published to mqtt. Any ideas?

[15:30:11.439] INFO (proweatherlive/1): Refreshing weather data [15:30:11.449] INFO (mqtt-client/1): Connected to MQTT broker [15:30:11.411] INFO (pwl-client/1): Authenticating [15:30:11.439] INFO (pwl-client/1): Requesting discovery data [15:30:11.439] INFO (pwl-client/1): Waiting for authentication [15:30:20.389] INFO (pwl-client/1): Authenticated Error: Failed to fetch weather data at PwlClient.requestWeather (/app/pwl/pwl.js:176:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PwlClient. (/app/pwl/pwl.js:121:20) at async retryWrapper (/app/pwl/retryWrapper.js:8:20) at async PwlClient.getDiscoveryData (/app/pwl/pwl.js:119:28) at async main (/app/index.js:21:31) [15:30:21.130] INFO (pwl-client/1): Authenticating [15:30:21.130] INFO (pwl-client/1): Waiting for authentication [15:30:25.491] INFO (pwl-client/1): Authenticated Error: Failed to fetch weather data at PwlClient.requestWeather (/app/pwl/pwl.js:176:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PwlClient. (/app/pwl/pwl.js:121:20) at async retryWrapper (/app/pwl/retryWrapper.js:8:20) at async PwlClient.getDiscoveryData (/app/pwl/pwl.js:119:28) at async main (/app/index.js:21:31) [15:30:27.318] INFO (pwl-client/1): Authenticating [15:30:27.319] INFO (pwl-client/1): Waiting for authentication [15:30:32.499] INFO (pwl-client/1): Authenticated Error: Failed to fetch weather data at PwlClient.requestWeather (/app/pwl/pwl.js:176:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PwlClient. (/app/pwl/pwl.js:121:20) at async retryWrapper (/app/pwl/retryWrapper.js:8:20) at async PwlClient.getDiscoveryData (/app/pwl/pwl.js:119:28) at async main (/app/index.js:21:31) /app/pwl/retryWrapper.js:15 throw new Error("Failed to execute function after " + retries + " retries"); ^

Error: Failed to execute function after 3 retries at retryWrapper (/app/pwl/retryWrapper.js:15:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PwlClient.getDiscoveryData (/app/pwl/pwl.js:119:28) at async main (/app/index.js:21:31)

Node.js v20.17.0

SvenFinn commented 1 month ago

Hi, The issue you're experiencing is likely caused by an incorrect value for the PWL_DEVICE_ID environment variable. Please follow the steps listed here to get the correct device id. Hope this solves your issues :)

Kind regards, Fabian