tuya / tuya-homebridge

Homebridge custom plugin for controlling Powered by Tuya (PBT) devices in HomeKit. This plugin is officially maintained by the Tuya Developer Team.
MIT License
332 stars 168 forks source link

Plugin crashes with Lumary RGB strip #334

Closed thannerfabian closed 1 year ago

thannerfabian commented 1 year ago

When adding my Lumary RGB strip, the tuya plugin crashes all the time. I have the following output

/var/lib/homebridge/node_modules/homebridge-tuya-platform/lib/light_accessory.js:70
        this.colourObj = this.colourData.value === "" ? { "h": 100.0, "s": 100.0, "v": 100.0 } : JSON.parse(this.colourData.value)
                                                                                                      ^
SyntaxError: Unexpected number in JSON at position 1
    at JSON.parse (<anonymous>)
    at LightAccessory.refreshAccessoryServiceIfNeed (/var/lib/homebridge/node_modules/homebridge-tuya-platform/lib/light_accessory.js:70:103)
    at new LightAccessory (/var/lib/homebridge/node_modules/homebridge-tuya-platform/lib/light_accessory.js:32:10)
    at TuyaPlatform.addAccessory (/var/lib/homebridge/node_modules/homebridge-tuya-platform/index.js:131:27)
    at TuyaPlatform.initTuyaSDK (/var/lib/homebridge/node_modules/homebridge-tuya-platform/index.js:99:12)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

I can reproduce this bug every time, I add this RGB strip and the plugin works fine after i removed it.

Any ideas, how to solve it? This strip already worked with the plugin.

Node.js Version: 18.12.1 Homebridge version: 1.6.0 Tuya plugin version: 1.5.0

Thank you!

github-actions[bot] commented 1 year ago

Thank you for your feedback, we will solve this issue soon

github-actions[bot] commented 1 year ago

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.