robinjhector / homebridge-tibber-price

Homebridge plugin for tibber price data
Apache License 2.0
7 stars 1 forks source link

Invalid Tibber configuration out of nowhere after updating - but fixes itself? #141

Open ThunderFD opened 9 months ago

ThunderFD commented 9 months ago

Describe The Bug:

I have updated everything on my homebridge install and ran into this issue: It seems like the plugin has trouble reading the config, even though it hasn't been changed. Also, there are no logs on the plugin config page for this plugin?

[08/02/2024, 11:17:48] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:09] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:09] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:14] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:16] [HomebridgeTibberPrice] [relativePriceSensor] Failed to update price in background Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:27] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:28] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.
[08/02/2024, 11:18:32] [HomebridgeTibberPrice] [relativePriceSensor] Failed to get price Invalid Tibber configuration. Check logs.

in this state the accessory is not responsive (doesn't show humidity)

a few restarts later: [08/02/2024, 11:21:16] [HomebridgeTibberPrice] Found Home, with ID: <id here...> it works again.

then I updated some more things (including Node.js and homebridge) and this happened again, first errors, a few restarts later it works again

To Reproduce:

not sure yet. I removed and re-added my home-id from the config when troubleshooting, perhaps removing it has some effect

Expected behavior:

no errors and logs with more info on any errors that might show up

Logs:

see above

Plugin Config:

{
    "accessToken": "....",
    "priceIncTax": true,
    "activatePriceGraphing": false,
    "activatePriceSensor": false,
    "activateRelativePriceSensor": false,
    "activateGaugePriceSensor": true,
    "platform": "HomebridgeTibberPrice"
}

but I removed, re-added, and removed a home id again during all of this

Environment:

ThunderFD commented 9 months ago

update: I think this may be the relevant error (After rebooting entire OS)

[08/02/2024, 12:01:39] [HomebridgeTibberPrice] Failed to query HomeId from Tibber, none of the accessories will work! See error: TimeoutError: Request imeout for uri [object Object]
    at ClientRequest.<anonymous> (/var/lib/homebridge/node_modules/homebridge-tibber-price/node_modules/tibber-api/src/nodes/TibberQueryBase.ts:130:33)
    at Object.onceWrapper (node:events:632:28)
    at ClientRequest.emit (node:events:518:28)
    at TLSSocket.emitRequestTimeout (node:_http_client:840:9)
    at Object.onceWrapper (node:events:632:28)
    at TLSSocket.emit (node:events:530:35)
    at TLSSocket.Socket._onTimeout (node:net:589:8)
    at listOnTimeout (node:internal/timers:573:17)
    at processTimers (node:internal/timers:514:7)

restarting just hombridge fixed the error again

edit: (maybe it's relevant to add that the pi 3b+ homebridge is running on is connected to the internet via WiFi)

robinjhector commented 9 months ago

Hey @ThunderFD ! Interesting, haven't seen this myself. Will investigate later today 👍