iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
160 stars 53 forks source link

Child bridge restating forever... #79

Closed Dienzora closed 2 years ago

Dienzora commented 2 years ago

Child bridge issue: Hi guys! Today I updated the homebridge and plugin version (hb to v.1.5.1 and plugin to v1.4.12) then all of my devices are on "no response" mode. The bridge is restarting searching process forever.

To Reproduce: After search it must to keep online and keep all devices found it.

Expected behavior:

Logs:

[11/4/2022, 11:27:06 AM] [Smartthings Plug (IK)] Child bridge process ended [11/4/2022, 11:27:06 AM] [Smartthings Plug (IK)] Process Ended. Code: 1, Signal: null [11/4/2022, 11:27:14 AM] [Smartthings Plug (IK)] Restarting Process... [11/4/2022, 11:27:14 AM] [Smartthings Plug (IK)] Launched child bridge with PID 8056 [11/4/2022, 11:27:14 AM] Registering platform 'homebridge-smartthings-ik.HomeBridgeSmartThings' [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loaded homebridge-smartthings-ik v1.4.12 child bridge successfully [11/4/2022, 11:27:15 AM] Loaded 83 cached accessories from cachedAccessories.0EADF0464B31. [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Finished initializing platform: Smartthings Plug (IK) [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Vitrola_cd [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Wi-Fi Cama [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Portão da Garagem [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Freezer [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Banheiro [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Calendar Alert [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Motor do Portão [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Vitrola_bluetooth [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: USB [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tomada do Mac [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Base Qi [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador_modo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tomada do Dell [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Espelho [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Suíte [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Wi-Fi Control [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Interruptor da Cozinha [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luminária do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Máquina de Lavar [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Wi-Fi Mesa [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Geladeira [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Switch [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Mesa [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: My Calendar [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador_luz [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Carregador de Pilhas [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Cozinha [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Pia [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Corredor Superior [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Sala [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Quarto do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador da Sala [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Corredor [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Vitrola_aux [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador da Suíte [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Quintal [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Garagem [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Porta [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Banheiro do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Escritório [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tomada do Deco [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: MAIN Virtual Devices [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Lavabo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz do Espelho do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Lavanderia [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Silence Alert [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Siren [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tomada da Echo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Extensão [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador_on|off [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Ventilador_velocidade [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Garagem_ [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Tomada do Router [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Luz da Escada [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Base de Carregamento [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Quintal [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Corredor [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: TV da Sala [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Débora’s iPhone [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Porta do Escritório [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Banheiro [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor da Cozinha [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Lavabo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Botão [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor da Escada [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Quarto do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Porta da Frente [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: iPhone do Diego [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Porta da Cozinha [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor da Suíte [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor da Sala [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Porta da Lavanderia [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Porta do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Diego’s iPhone [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Fire TV Button [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Banheiro do Lorenzo [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: iPhone da Débora [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Porta da Sala [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: IPCam #1 (configure!) [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Box do Banheiro [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Sensor do Escritório [11/4/2022, 11:27:15 AM] [Smartthings Plug (IK)] Loading accessory from cache: Alexa Siren [11/4/2022, 11:27:15 AM] Publishing bridge accessory (name: Smartthings Plug (IK), publishInfo: { username: '0E:AD:F0:46:4B:31', port: 33658, pincode: '***-**-***', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: undefined }). TypeError: Cannot read properties of undefined (reading 'level') at /usr/local/lib/node_modules/homebridge-smartthings-ik/src/services/fanService.ts:109:50 at processTicksAndRejections (node:internal/process/task_queues:96:5) [11/4/2022, 11:27:18 AM] [Smartthings Plug (IK)] Child bridge process ended [11/4/2022, 11:27:18 AM] [Smartthings Plug (IK)] Process Ended. Code: 1, Signal: null

Plugin Config:

"name": "Smartthings Plug (IK)", "BaseURL": "https://api.smartthings.com/v1/", "AccessToken": "MyToken", "GarageDoorMaxPoll": 40, "PollLocksSeconds": 10, "PollDoorsSeconds": 10, "PollSensorsSeconds": 5, "PollSwitchesAndLightsSeconds": 10, "_bridge": { "username": "myUser", "port": 33658 }, "platform": "HomeBridgeSmartThings" } Show your Homebridge config.json here, remove any sensitive information.

``

Screenshots:

Environment:

iklein99 commented 2 years ago

I will put out a fix in a little bit. Thanks for bringing this to my attention. For now, you can put the fan into the devices to exclude list in the configuration which should fix the restarting issue.

Dienzora commented 2 years ago

Thanks for this! I putted out than solve the issue.

iklein99 commented 2 years ago

This should be fixed in 1.4.13. You can remove the device from the excluded list and give it a shot. Let me know.

Dienzora commented 2 years ago

Hello @iklein99, first of all.. Thanks for this, it works perfectly.

Now I can control my fan.