Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin enters crash loop when String light is auto discovered #40

Open
ekinnear opened this issue Apr 14, 2024 · 2 comments
Open

Plugin enters crash loop when String light is auto discovered #40

ekinnear opened this issue Apr 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ekinnear
Copy link

Describe The Bug:
When a Lifx String Light is present on the network and auto discovery is turned on, the plugin (running in a child bridge) enters a crash loop.

When auto discovery is turned off, the crash loop stops.

Even once auto discovery is turned off, the plugin is now not able to control my existing bulbs that were working prior to adding the string lights. This happens even when removing the new lights from the accessory cache.

To Reproduce:
Set up one of the new string lights on the network

Expected behavior:
Even if not able to control the string light, it shouldn't crash

Logs:

[homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Manufacturer': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Model': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
TypeError: Cannot read properties of undefined (reading 'color')
    at Bulb.hasColors (/usr/lib/node_modules/homebridge-lifx-plugin/src/bulb.ts:60:47)
    at LifxPlatformAccessory.bindFunctions (/usr/lib/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:70:19)
    at /usr/lib/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:25:12
    at /usr/lib/node_modules/homebridge-lifx-plugin/src/bulb.ts:29:11
    at /usr/lib/node_modules/homebridge-lifx-plugin/src/bulb.ts:90:7
    at /usr/lib/node_modules/homebridge-lifx-plugin/src/bulb.ts:125:7
    at Client.<anonymous> (/usr/lib/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/light.js:218:5)
    at Client.<anonymous> (/usr/lib/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/client.js:428:26)
    at Array.forEach (<anonymous>)
    at Client.processMessageHandlers (/usr/lib/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/client.js:414:24)
[Lifx Plugin] Child bridge process ended
[Lifx Plugin] Process Ended. Code: 1, Signal: null

Plugin Config:

        {
            "name": "Lifx Plugin",
            "duration": 0,
            "brightnessDuration": 300,
            "colorDuration": 300,
            "default": "192.168.0.201",
            "broadcast": "192.168.0.255",
            "lightOfflineTolerance": 3,
            "messageHandlerTimeout": 45000,
            "resendPacketDelay": 150,
            "resendMaxTimes": 3,
            "updates": true,
            "debug": false,
            "autoDiscover": false,
            "_bridge": {
                "username": "...",
                "port": 37047
            },
            "platform": "LifxPlugin"
        },

Environment:

  • Plugin Version: v0.3.0
  • Homebridge Version: 1.7.0
  • Node.js Version: 18.6.0
  • NPM Version: 9.5.1
  • Operating System: Raspbian
@ekinnear ekinnear added the bug Something isn't working label Apr 14, 2024
@greyham6
Copy link

greyham6 commented May 19, 2024

UPDATE: I managed to prevent the crash loop on my setup by excluding my 2x LIFX DL (downlight) bulbs. I also re-added my LIFX string light to the plugin and it continued to work.


ORIGINAL POST
I am also experiencing the same bug, causing the plugin to enter a crash loop. But I am experiencing it regardless of whether auto-discover is on or off. I am also not sure if it is the String light that causes it, because I added my string light to the exclusion list and it still crashes.

Log

[5/19/2024, 11:13:06 AM] [homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Model': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[5/19/2024, 11:13:07 AM] TypeError: Cannot read properties of undefined (reading 'color')
    at Bulb.hasColors (/homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:60:47)
    at LifxPlatformAccessory.bindFunctions (/homebridge/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:70:19)
    at /homebridge/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:25:12
    at /homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:29:11
    at /homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:90:7
    at /homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:125:7
    at Client.<anonymous> (/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/light.js:218:5)
    at Client.<anonymous> (/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/client.js:428:26)
    at Array.forEach (<anonymous>)
    at Client.processMessageHandlers (/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/client.js:414:24)
[5/19/2024, 11:13:07 AM] [homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Manufacturer': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[5/19/2024, 11:13:07 AM] [homebridge-lifx-plugin] This plugin generated a warning from the characteristic 'Model': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[5/19/2024, 11:13:07 AM] TypeError: Cannot read properties of undefined (reading 'color')
    at Bulb.hasColors (/homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:60:47)
    at LifxPlatformAccessory.bindFunctions (/homebridge/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:70:19)
    at /homebridge/node_modules/homebridge-lifx-plugin/src/platformAccessory.ts:25:12
    at /homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:29:11
    at /homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:90:7
    at /homebridge/node_modules/homebridge-lifx-plugin/src/bulb.ts:125:7
    at Client.<anonymous> (/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/light.js:218:5)
    at Client.<anonymous> (/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/client.js:428:26)
    at Array.forEach (<anonymous>)
    at Client.processMessageHandlers (/homebridge/node_modules/homebridge-lifx-plugin/node_modules/lifx-lan-client/src/lifx/client.js:414:24)
[5/19/2024, 11:13:07 AM] Got SIGTERM, shutting down Homebridge…

Plugin Config

    "name": "LIFX",
    "duration": 0,
    "brightnessDuration": 300,
    "colorDuration": 300,
    "default": "0.0.0.0",
    "broadcast": "255.255.255.255",
    "lightOfflineTolerance": 3,
    "messageHandlerTimeout": 45000,
    "resendPacketDelay": 150,
    "resendMaxTimes": 3,
    "updates": true,
    "debug": false,
    "autoDiscover": false,
    "bulbs": [
        {
            "name": "LIFX Mini Bed",
            "address": "xxx.xxx.xx.29"
        },
        {
            "name": "LIFX Mini 2 Bed",
            "address": "xxx.xxx.xx.38"
        },
        {
            "name": "Study North",
            "address": "xxx.xxx.xx.40"
        },
        {
            "name": "Study South",
            "address": "xxx.xxx.xx.47"
        },
        {
            "name": "Living Room LIFX",
            "address": "xxx.xxx.xx.21"
        }
    ],
    "excludes": [
        {
            "name": "LIFX Bedhead",
            "address": "xxx.xxx.xx.20",
            "id": "xxxREDACTEDxxx"
        }
    ],
    "platform": "LifxPlugin"
}

Environment:
Plugin Version: v0.3.0
Homebridge Version: 1.8.2
Node.js Version: v20.12.2

@kmahelona
Copy link

I've experienced the same problem on a new A21 Bulb (with matter). I think these new lights have a different color setting which is causing the plugin to crash. It'll probably need updating to support the new lights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants