Closed rcoletti116 closed 2 years ago
‼️
Thanks for the report. I'll look into it ASAP. Were you able to get it running after a restart? If not, I might like to get full diagnostic logs from you.
No, a restart of homebridge doesn't change anything. Or do you mean restart my Lutron Bridge?
No, I mean attempting to re-start Homebridge. If you could do:
In order to enable debugging, set the DEBUG environment variable in the Homebridge UI to leap:*. This will make this plugin, and its main library lutron-leap-js noisier.
And provide me with logs, that would be most excellent and would help me diagnose.
leaplog.txt Let me know if this doesn't work. There's a lot of information. Quick scouring doesn't show anything sensitive.
this might be a better filter on the logs: caseta.txt
C&P from Discord:
so there are two issues; the big one is a client timeout crashing homebridge, which I'm working on. the other one is that the setup is timing out waiting for the bridge. I'm not sure why that's happening, but eventually the bridge shows up and works fine, so I suspect it's just homebridge running kinda slowly. Just now I've released v2.1.0-beta.2 with an increased timeout, which should work around the latter
I just pushed a new beta that should fix crashing Homebridge when there is a delay in connecting to the bridge (v2.1.0-beta.3). lmk how it goes for you
Beta 3 also crashes repeatedly:
[1/4/2022, 2:03:35 AM] TypeError: Cannot read properties of undefined (reading 'label') at new PicoRemote (/usr/lib/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:92:112) at /usr/lib/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:183:33 at processTicksAndRejections (node:internal/process/task_queues:96:5)
@rtkane1015 can you share the log with me? That's a very surprising place to crash, as it's just doing a simple lookup based on the device type and button number.
I actually have the same error present right before the crash. I think the accessory creation doesn't know what to do with alias.label.
2022-01-04T12:13:23.482Z leap:protocol tag 72e5b549-88f6-470e-8c2f-e94e1066fee0 recognized as in-flight
2022-01-04T12:13:23.493Z leap:protocol added promise to inFlightRequests with tag key de82a39b-275a-473d-a78a-450f0eb67e41
2022-01-04T12:13:23.494Z leap:protocol request handler about to write: {"CommuniqueType":"SubscribeRequest","Header":{"ClientTag":"de82a39b-275a-473d-a78a-450f0eb67e41","Url":"/button/106/status/event"}}
TypeError: Cannot read properties of undefined (reading 'label')
at new PicoRemote (/usr/local/lib/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:92:112)
at /usr/local/lib/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:183:33
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[04/01/2022, 07:13:23] [homebridge-lutron-caseta-leap] Child bridge process ended
[04/01/2022, 07:13:23] [homebridge-lutron-caseta-leap] Process Ended. Code: 1, Signal: null```
Here you go (with some of my stuff edited out--where there are blank lines). Hopefully I didn't cut out anything you needed--all just related to other devices/plugins. Let me know if you need anything else:
[1/4/2022, 9:41:56 AM] [HB Supervisor] Restarting Homebridge... [1/4/2022, 9:41:56 AM] [HB Supervisor] Starting Homebridge with extra flags: -I [1/4/2022, 9:41:56 AM] [HB Supervisor] Started Homebridge v1.3.9 with PID: 28950 [1/4/2022, 9:41:57 AM] Loaded config.json with 12 accessories and 8 platforms.
[1/4/2022, 9:42:00 AM] --- [1/4/2022, 9:42:00 AM] Loading 8 platforms... [1/4/2022, 9:42:00 AM] [Config] Initializing config platform... [1/4/2022, 9:42:00 AM] [Config] Running in Service Mode
[1/4/2022, 9:42:00 AM] [LutronCasetaLeap] Initializing LutronCasetaLeap platform... [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] LutronCasetaLeap starting up... [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] LutronCasetaLeap plugin finished early initialization [1/4/2022, 9:42:00 AM] Loading 12 accessories...
[1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower 6293472b-ba8d-409f-9277-14ffc193a696 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Recessed Lighting Pico 1 on bridge 01680905 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower ed047a67-827e-4031-a216-20b83621eb7f [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Recessed Lighting Pico 2 on bridge 01680905 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower 4194fa22-55e4-4b14-adf8-007d5e0d65ca [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Basement Stairs Pico 2 on bridge 01680905 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower ec0df08b-1d2f-42c6-b91f-3e8139e96db6 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Front Foyer Pico on bridge 01680905 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower f8c753c5-4330-47e5-b054-b6fd8c348642 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Outside Gazebo Pico on bridge 01680905 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower 183387a7-ad72-4ee8-a944-7e12b21a40e6 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Curio Cabinet on bridge 01680905 [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring cached Pico3ButtonRaiseLower f9fde335-1a45-4155-8177-2be91213664d [1/4/2022, 9:42:00 AM] [LutronCasetaLeap] restoring remote Basement Stairs Pico 1 on bridge 01680905
[1/4/2022, 9:42:01 AM] [LutronCasetaLeap] Got DID_FINISH_LAUNCHING Setup Payload:
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
[1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type SmartBridge , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallDimmer , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallDimmer , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory 6293472b-ba8d-409f-9277-14ffc193a696 already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory ed047a67-827e-4031-a216-20b83621eb7f already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallSwitch , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallSwitch , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory 4194fa22-55e4-4b14-adf8-007d5e0d65ca already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory ec0df08b-1d2f-42c6-b91f-3e8139e96db6 already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] found a pico remote Pool Pico 1 [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallDimmer , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory f8c753c5-4330-47e5-b054-b6fd8c348642 already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] found a pico remote Outside Pico Outside [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type PlugInDimmer , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory 183387a7-ad72-4ee8-a944-7e12b21a40e6 already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallDimmer , skipping [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Accessory f9fde335-1a45-4155-8177-2be91213664d already registered. skipping. [1/4/2022, 9:42:02 AM] [LutronCasetaLeap] Got unimplemented device type WallSwitch , skipping [1/4/2022, 9:42:03 AM] TypeError: Cannot read properties of undefined (reading 'label') at new PicoRemote (/usr/lib/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:92:112) at /usr/lib/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:183:33 at processTicksAndRejections (node:internal/process/task_queues:96:5)
[1/4/2022, 9:42:03 AM] TypeError: Cannot read properties of undefined (reading 'label') at new PicoRemote (/usr/lib/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:92:112) at /usr/lib/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:183:33 at processTicksAndRejections (node:internal/process/task_queues:96:5) [1/4/2022, 9:42:03 AM] Got SIGTERM, shutting down Homebridge...
[1/4/2022, 9:42:08 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [1/4/2022, 9:42:13 AM] [HB Supervisor] Restarting Homebridge...
Here are additional debug logs: logs.txt
@rcoletti116 @rtkane1015, I am completely baffled by this crash. I published 2.1.0-beta.4 to do some more robust checking and logging. Give that a shot, if you would be so kind. If it continues to crash, can you set the DEBUG environment variable in the Homebridge UI to leap:*.
? That will hopefully help me understand what device is being detected and failing to get looked up.
@rtkane1015 I'm also curious to know what type of device "Outside Pico Outside" and "Pool Pico 1" are, since they're the only ones that appear to be "new" to the plugin.
Here are the logs: beta4log.txt
Still crashing, but a different error this time.
Error: Could not find button 2 in Pico2Button map entry
at new PicoRemote (/usr/local/lib/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:95:23)
at /usr/local/lib/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:183:33
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[04/01/2022, 13:28:57] [homebridge-lutron-caseta-leap] Child bridge process ended
Also still crashing with the same error as rcoletti116:
Logs: beta4logrk.txt
[1/4/2022, 1:47:27 PM] Error: Could not find button 2 in Pico2Button map entry at new PicoRemote (/usr/lib/node_modules/homebridge-lutron-caseta-leap/src/PicoRemote.ts:95:23) at /usr/lib/node_modules/homebridge-lutron-caseta-leap/src/platform.ts:183:33 at processTicksAndRejections (node:internal/process/task_queues:96:5)
Oh... forgot to mention: both the Pico Outside and Pool Pico 1 are 2 button Picos.
Killer! I don't actually own anything but Pico3ButtonRaiseLower devices so I guessed at the button numbering for the other, simpler remotes. Uh, and got it wrong. :D Beta 5 should get you sorted!
I can confirm beta 5 fixes the problem for me.
That appears to have fixed it for me as well! Thank you!
Awesome. I'll close the issue.
Homebridge v 1.3.9 Plugin v2.1.0-beta.1
I successfully followed the steps to get the secrets for the bridge, but the plugin crashes Homebridge.
First I get this error
then a series of this error (5X) before homebridge crashes: