awahlig / homebridge-casambi

Homebridge Casambi Plugin
Apache License 2.0
18 stars 3 forks source link

Unexpected server response: 429 #31

Closed Schempershofe closed 1 year ago

Schempershofe commented 1 year ago

Describe Your Problem: Hey there, my Homebridge suddenly went into a restart loop with an "unexpected server response 429"

I don´t really get whats happening here. The API call seems to work, atleast the GET for the Units does. But after that...isnt 429 "too many connections"?

I´d love some insight or help with that, the homebridge casambi plugin is what makes the lights within my house become truly alive :-)

Cheers

Chris

Logs:

26.4.2023, 21:47:47] [Casambi] Logging in to Casambi network Setup Payload: -Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

[26.4.2023, 21:47:48] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge) is running on port 51434. [26.4.2023, 21:47:48] [Casambi] Successfully logged in to Casambi network Haus [26.4.2023, 21:47:48] [Casambi] Found 5 unit(s) in the network Haus [26.4.2023, 21:47:48] [Casambi] Unit air module is a Luminaire with fixtureId 1422 [26.4.2023, 21:47:48] [Casambi] Registering accessory air module [26.4.2023, 21:47:48] [Casambi] Unit air module is a Luminaire with fixtureId 1422 [26.4.2023, 21:47:48] [Casambi] Registering accessory air module [26.4.2023, 21:47:48] [Casambi] Unit CBU-TED (log) is a Luminaire with fixtureId 8123 [26.4.2023, 21:47:48] [Casambi] Registering accessory CBU-TED (log) [26.4.2023, 21:47:48] [Casambi] Unsupported control type overheat for unit CBU-TED (log) [26.4.2023, 21:47:48] [Casambi] Unit Arbeitszimmer is a BatterySwitch with fixtureId 200001 [26.4.2023, 21:47:48] [Casambi] Skipping unit Arbeitszimmer - unsupported type BatterySwitch [26.4.2023, 21:47:48] [Casambi] Unit Mito gioia is a Luminaire with fixtureId 23807 [26.4.2023, 21:47:48] [Casambi] Registering accessory Mito gioia [26.4.2023, 21:47:48] [Casambi] Unsupported control type slider for unit Mito gioia [26.4.2023, 21:47:48] Error: Unexpected server response: 429 at ClientRequest. (/var/lib/homebridge/node_modules/homebridge-casambi/node_modules/ws/lib/websocket.js:783:7) at ClientRequest.emit (node:events:513:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:695:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17) at TLSSocket.socketOnData (node:_http_client:536:22) at TLSSocket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at TLSSocket.Readable.push (node:internal/streams/readable:234:10) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) [26.4.2023, 21:47:48] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "". [26.4.2023, 21:47:48] Got SIGTERM, shutting down Homebridge...

Plugin Config:

{ "apiKey": "", "loginMode": "network", "email": "ch**@sc*m****.com", "password": "*", "verticalControl": "separate", "platform": "Casambi" } Environment:

m-a-r-c-u-s commented 1 year ago

I'm experiencing the same problem

Schempershofe commented 1 year ago

I'm experiencing the same problem

Interesting, did that error start to occur like 5 (+-1) hours ago aswell on your side?

Just tested https://developer.casambi.com/console/ to check if my API key is still working correctly...works like a charm. Set up a second machine to test it...same error.

m-a-r-c-u-s commented 1 year ago

Most likely, the plugin was working this morning but was unresponsive and in a boot loop when I came home a few hours ago.

philjo89 commented 1 year ago

I have the exact same issue. Started a few hours ago aswel. Strange that we all have the same issue at the same time, but API is working and there hasnt been any changes in the plugin for months.

Schempershofe commented 1 year ago

At least we are not alone ;-) Im not sure if the Websocket wss://door.casambi.com/v1/bridge/ is actually triggered by https://developer.casambi.com/console/ / if they are they same thing so…maybe…its outage on the Casambi side and this will resolve itself tomorrow.

Am 26.04.2023 um 23:51 schrieb philjo89 @.***>:

I have the exact same issue. Started a few hours ago aswel. Strange that we all have the same issue at the same time, but API is working and there hasnt been any changes in the plugin for months. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

awahlig commented 1 year ago

Since 429 is "too many connections", it is not necessarily the problem here but rather a side effect of Homebridge boot looping for some other reason. Is there anything else in the logs that could be a reason for restarts? Does the loop stop when the Casambi plugin is disabled?

Schempershofe commented 1 year ago

Is there anything else in the logs that could be a reason for restarts? Does the loop stop when the Casambi plugin is disabled?

Thank you for the super quick reply @awahlig. Yep, it does: Deactivating the plugin stops the loop at once.

Log from reboot to deactivating the plugin:

[26.4.2023, 23:06:35] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge B71D) is running on port 51434. [26.4.2023, 23:06:35] [Casambi] Successfully logged in to Casambi network Haus [26.4.2023, 23:06:36] [Casambi] Found 5 unit(s) in the network Haus [26.4.2023, 23:06:36] [Casambi] Unit air module is a Luminaire with fixtureId 1422 [26.4.2023, 23:06:36] [Casambi] Restoring accessory air module [26.4.2023, 23:06:36] [Casambi] Unit air module is a Luminaire with fixtureId 1422 [26.4.2023, 23:06:36] [Casambi] Restoring accessory air module [26.4.2023, 23:06:36] [Casambi] Unit CBU-TED (log) is a Luminaire with fixtureId 8123 [26.4.2023, 23:06:36] [Casambi] Restoring accessory CBU-TED (log) [26.4.2023, 23:06:36] [Casambi] Unsupported control type overheat for unit CBU-TED (log) [26.4.2023, 23:06:36] [Casambi] Unit Arbeitszimmer is a BatterySwitch with fixtureId 200001 [26.4.2023, 23:06:36] [Casambi] Skipping unit Arbeitszimmer - unsupported type BatterySwitch [26.4.2023, 23:06:36] [Casambi] Unit Mito gioia is a Luminaire with fixtureId 23807 [26.4.2023, 23:06:36] [Casambi] Restoring accessory Mito gioia [26.4.2023, 23:06:36] [Casambi] Unsupported control type slider for unit Mito gioia [26.4.2023, 23:06:36] Error: Unexpected server response: 429 at ClientRequest. (/var/lib/homebridge/node_modules/homebridge-casambi/node_modules/ws/lib/websocket.js:783:7) at ClientRequest.emit (node:events:513:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:695:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17) at TLSSocket.socketOnData (node:_http_client:536:22) at TLSSocket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at TLSSocket.Readable.push (node:internal/streams/readable:234:10) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) [26.4.2023, 23:06:36] UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "". [26.4.2023, 23:06:36] Got SIGTERM, shutting down Homebridge... [26.4.2023, 23:06:41] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [26.4.2023, 23:06:41] [Homebridge UI] Changes to config.json saved. [26.4.2023, 23:06:46] [HB Supervisor] Restarting Homebridge... [26.4.2023, 23:06:46] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution [26.4.2023, 23:06:46] [HB Supervisor] Started Homebridge v1.6.0 with PID: 15583 [26.4.2023, 23:06:47] Loaded config.json with 0 accessories and 2 platforms. [26.4.2023, 23:06:47] Loaded 4 cached accessories from cachedAccessories. [26.4.2023, 23:06:47] --- [26.4.2023, 23:06:47] Disabled plugin: homebridge-casambi@0.3.4 [26.4.2023, 23:06:47] --- [26.4.2023, 23:06:47] Loading 2 platforms... [26.4.2023, 23:06:47] Ignoring config for the platform "Casambi" in your config.json as the plugin "homebridge-casambi" has been disabled. [26.4.2023, 23:06:47] Failed to find plugin to handle accessory air module [26.4.2023, 23:06:47] Removing orphaned accessory air module [26.4.2023, 23:06:47] Failed to find plugin to handle accessory air module [26.4.2023, 23:06:47] Removing orphaned accessory air module [26.4.2023, 23:06:47] Failed to find plugin to handle accessory CBU-TED (log) [26.4.2023, 23:06:47] Removing orphaned accessory CBU-TED (log) [26.4.2023, 23:06:47] Failed to find plugin to handle accessory Mito gioia [26.4.2023, 23:06:47] Removing orphaned accessory Mito gioia

philjo89 commented 1 year ago

If it is any help, here is my log.

Yesterday i had this one:

[homebridge-casambi] Error logging in: connect ECONNREFUSED 20.86.219.19:443

Now:

[27/04/2023, 08:03:49] [homebridge-casambi] Restarting Process... [27/04/2023, 08:03:50] [homebridge-casambi] Launched child bridge with PID 1643 [27/04/2023, 08:03:51] Registering platform 'homebridge-casambi.Casambi' [27/04/2023, 08:03:51] [homebridge-casambi] Loaded homebridge-casambi v0.3.4 child bridge successfully [27/04/2023, 08:03:51] Loaded 18 cached accessories from cachedAccessories.0E7E1869D3CE. [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Keuken [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Bureau [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Living [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: LEDstrip keuken [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Nachtlamp Phil [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Nachtlamp Max [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Keuken 2 [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Slaapkamer [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Slaapkamer Jul [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Hall [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Badkamer [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: WC / beneden [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Eiland [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Wc boven [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: CBU-TED [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: Keuken leds [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: PWM-60 [27/04/2023, 08:03:51] [homebridge-casambi] Loading accessory from cache: CBU-TED [27/04/2023, 08:03:51] [homebridge-casambi] Logging in to Casambi user account [27/04/2023, 08:03:51] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-casambi) is running on port 30592. [27/04/2023, 08:03:51] [homebridge-casambi] Successfully logged in to Casambi user account [27/04/2023, 08:03:51] [homebridge-casambi] Found 1 network(s) in the site Test [27/04/2023, 08:03:51] [homebridge-casambi] Found 34 unit(s) in the network JVM [27/04/2023, 08:03:51] [homebridge-casambi] Unit Keuken is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Keuken [27/04/2023, 08:03:51] [homebridge-casambi] Unit Bureau is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Bureau [27/04/2023, 08:03:51] [homebridge-casambi] Unit Living is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Living [27/04/2023, 08:03:51] [homebridge-casambi] Unit LEDstrip keuken is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory LEDstrip keuken [27/04/2023, 08:03:51] [homebridge-casambi] Unit Wc boven schakelaar is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Wc boven schakelaar - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Bureau is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Bureau - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Hall naast deur is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Hall naast deur - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Grote slaakamer is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Grote slaakamer - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Nachtlamp Phil is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Nachtlamp Phil [27/04/2023, 08:03:51] [homebridge-casambi] Unit Nachtlamp Max is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Nachtlamp Max [27/04/2023, 08:03:51] [homebridge-casambi] Unit Keuken 2 is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Keuken 2 [27/04/2023, 08:03:51] [homebridge-casambi] Unit Slaapkamer is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Slaapkamer [27/04/2023, 08:03:51] [homebridge-casambi] Unit Slaapkamer Jul is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Slaapkamer Jul [27/04/2023, 08:03:51] [homebridge-casambi] Unit Hall is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Hall [27/04/2023, 08:03:51] [homebridge-casambi] Unit Badkamer is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Badkamer [27/04/2023, 08:03:51] [homebridge-casambi] Unit Grote badkamer is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Grote badkamer - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Hall naast slp groot is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Hall naast slp groot - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Hall naast slpk klein is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Hall naast slpk klein - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Kleine kamer is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Kleine kamer - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Hall beneden naast kelder is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Hall beneden naast kelder - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Hall beneden aan wc is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Hall beneden aan wc - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit WC / beneden is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory WC / beneden [27/04/2023, 08:03:51] [homebridge-casambi] Unit Keuken Koffiecorner is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Keuken Koffiecorner - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Eiland is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Eiland [27/04/2023, 08:03:51] [homebridge-casambi] Unit Keuken kapot PTM215B is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Keuken kapot PTM215B - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Schakelaar eetruimte grote raam is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Schakelaar eetruimte grote raam - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Schakelaar nachtlamp phil is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Schakelaar nachtlamp phil - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Schakelaar nachtlampje max is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Schakelaar nachtlampje max - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Keuken naast diepvries is a BatterySwitch with fixtureId 200001 [27/04/2023, 08:03:51] [homebridge-casambi] Skipping unit Keuken naast diepvries - unsupported type BatterySwitch [27/04/2023, 08:03:51] [homebridge-casambi] Unit Wc boven is a Luminaire with fixtureId 1039 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Wc boven [27/04/2023, 08:03:51] [homebridge-casambi] Unit Eetkamer is a Luminaire with fixtureId 526 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Eetkamer [27/04/2023, 08:03:51] [homebridge-casambi] Unsupported control type overheat for unit Eetkamer [27/04/2023, 08:03:51] [homebridge-casambi] Unit Keuken leds is a Driver with fixtureId 14731 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Keuken leds [27/04/2023, 08:03:51] [homebridge-casambi] Unsupported control type overheat for unit Keuken leds [27/04/2023, 08:03:51] [homebridge-casambi] Unsupported control type ambienttemperature for unit Keuken leds [27/04/2023, 08:03:51] [homebridge-casambi] Unit Douche led is a Driver with fixtureId 14731 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Douche led [27/04/2023, 08:03:51] [homebridge-casambi] Unsupported control type overheat for unit Douche led [27/04/2023, 08:03:51] [homebridge-casambi] Unsupported control type ambienttemperature for unit Douche led [27/04/2023, 08:03:51] [homebridge-casambi] Unit Voordeur is a Luminaire with fixtureId 526 [27/04/2023, 08:03:51] [homebridge-casambi] Restoring accessory Voordeur [27/04/2023, 08:03:51] [homebridge-casambi] Unsupported control type overheat for unit Voordeur

/var/lib/homebridge/node_modules/.pnpm/ws@7.5.8/node_modules/ws/lib/websocket.js:774 abortHandshake( ^ Error: Unexpected server response: 429 at ClientRequest. (/var/lib/homebridge/node_modules/.pnpm/ws@7.5.8/node_modules/ws/lib/websocket.js:774:7) at ClientRequest.emit (node:events:513:28) at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:701:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) at TLSSocket.socketOnData (node:_http_client:542:22) at TLSSocket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at TLSSocket.Readable.push (node:internal/streams/readable:234:10) at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) [27/04/2023, 08:03:52] [homebridge-casambi] Child bridge process ended [27/04/2023, 08:03:52] [homebridge-casambi] Process Ended. Code: 1, Signal: null [27/04/2023, 08:03:57] [Homebridge UI] Changes to config.json saved.

joske1979 commented 1 year ago

Same problem here. Worked until yesterday. Now hombridhe is in a restart loop with a 429 error...

joske1979 commented 1 year ago

Everything is working fine again for me!

philjo89 commented 1 year ago

Yes, here too 👍

Schempershofe commented 1 year ago

Yep, back running. Still: Thanks @awahlig, awesome to know that you´re here for support when s*** hits the fan.

joske1979 commented 1 year ago

thanks awahlig!!!