AMoo-Miki / homebridge-tuya-lan

Homebridge plugin for IoT devices that use Tuya Smart's platform
MIT License
204 stars 52 forks source link

Novostella smart floodlights appear in Homebridge and the Home App but cannot control devices. #247

Closed J1D2A3 closed 3 years ago

J1D2A3 commented 3 years ago

I have previously used the homebridge-tuya-web plugin to control all of my Tuya devices through Homebridge but wanted to switch to the homebridge-tuya-lan plugin for local control. All 16 devices that I have put into the config are displayed in both Homebridge and the Home app but six of them are not able to control the devices. All six are my outdoor Novostella Smart LED Floodlights, the remaining ten devices (a mixture of bulbs and plugs) all work flawlessly. When looking at the logs after restarting Homebridge, I can see the following relating to the tuya plugin (I have attempted to remove anything relating to other plugins):

[18/06/2021, 13:19:12] [Homebridge UI] Homebridge restart request received
[18/06/2021, 13:19:12] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process
[18/06/2021, 13:19:12] [Homebridge UI] Sending SIGTERM to Homebridge
[18/06/2021, 13:19:12] Got SIGTERM, shutting down Homebridge...
[18/06/2021, 13:19:12] Got SIGTERM, shutting down child bridge process...
[18/06/2021, 13:19:17] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[18/06/2021, 13:19:22] [HB Supervisor] Restarting Homebridge...
[18/06/2021, 13:19:22] [HB Supervisor] Starting Homebridge with extra flags: -I
[18/06/2021, 13:19:22] [HB Supervisor] Started Homebridge v1.3.4 with PID: 24672
Initializing HAP-NodeJS v0.9.4...
[18/06/2021, 13:19:23] Loaded config.json with 0 accessories and 4 platforms.
[18/06/2021, 13:19:23] Loaded 19 cached accessories from cachedAccessories.
[18/06/2021, 13:19:23] ---
[18/06/2021, 13:19:24] Loaded plugin: homebridge-config-ui-x@4.41.1
[18/06/2021, 13:19:24] Registering platform 'homebridge-config-ui-x.config'
[18/06/2021, 13:19:24] ---
[18/06/2021, 13:19:24] Loaded plugin: homebridge-tuya-lan@1.5.0-rc.12
[18/06/2021, 13:19:24] Registering platform 'homebridge-tuya-lan.TuyaLan'
[18/06/2021, 13:19:24] ---
[18/06/2021, 13:19:24] Loading 4 platforms...
[18/06/2021, 13:19:24] [Config] Initializing config platform...
[18/06/2021, 13:19:24] [Config] Running in Service Mode
[18/06/2021, 13:19:24] [TuyaLan] Marked Bedroom Bookshelf unreachable by faulting Service.Bedroom Bookshelf.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Desk Light 1 unreachable by faulting Service.Desk Light 1.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Desk Light 2 unreachable by faulting Service.Desk Light 2.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Big Office Light unreachable by faulting Service.Big Office Light.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Library Lights unreachable by faulting Service.Library Lights.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Worktop Lights 1 unreachable by faulting Service.Worktop Lights 1.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Worktop Lights 2 unreachable by faulting Service.Worktop Lights 2.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Iron unreachable by faulting Service.Iron.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Cat Fountain unreachable by faulting Service.Cat Fountain.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Garage Light unreachable by faulting Service.Garage Light.On
[18/06/2021, 13:19:24] [TuyaLan] Marked The Green Cupboard unreachable by faulting Service.The Green Cupboard.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Side Path Light unreachable by faulting Service.Side Path Light.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Patio Light unreachable by faulting Service.Patio Light.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Garden Light unreachable by faulting Service.Garden Light.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Back Door Light unreachable by faulting Service.Back Door Light.On
[18/06/2021, 13:19:24] [TuyaLan] Marked Front Doo Light unreachable by faulting Service.Front Door Light.On
[18/06/2021, 13:19:25] [TuyaLan] Starting discovery...
Preparing Advertiser for 'Homebridge 572B 6582' using bonjour-hap backend!
Setup Payload:
X-HM://0023PRZHVI1C3
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ XXX-XX-XXX │     
    └────────────┘     

[TuyaDiscovery] Discovery started on port 6666.
[TuyaDiscovery] Discovery started on port 6667.
Starting to advertise 'Homebridge 572B 6582' using bonjour-hap backend!
[18/06/2021, 13:19:25] Homebridge v1.3.4 (Homebridge 572B) is running on port 51716.
[18/06/2021, 13:19:26] [TuyaLan] Discovered Iron (bf61b02f248b7ea5c5pvba) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Iron to 9s
[18/06/2021, 13:19:26] [TuyaLan] Connected to Iron
[TuyaAccessory] Sending first query to Iron (3.3)
[TuyaAccessory] Iron (3.3) didn't respond with its current state.
[18/06/2021, 13:19:26] [TuyaLan] Ready to handle Iron (Outlet:3.3) with signature {}
[18/06/2021, 13:19:26] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:28] [TuyaLan] Discovered Worktop Lights 1 (bff639b4d62329ad6ejlaa) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Worktop Lights 1 to 9s
[18/06/2021, 13:19:28] [TuyaLan] Connected to Worktop Lights 1
[TuyaAccessory] Sending first query to Worktop Lights 1 (3.3)
[TuyaAccessory] Worktop Lights 1 (3.3) didn't respond with its current state.
[18/06/2021, 13:19:28] [TuyaLan] Ready to handle Worktop Lights 1 (Outlet:3.3) with signature {}
[18/06/2021, 13:19:28] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:28] [TuyaLan] Discovered Desk Light 1 (bfbc52dce5f0b4458d0801) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Desk Light 1 to 9s
[18/06/2021, 13:19:28] [TuyaLan] Connected to Desk Light 1
[TuyaAccessory] Sending first query to Desk Light 1 (3.3)
[TuyaAccessory] Desk Light 1 (3.3) didn't respond with its current state.
[18/06/2021, 13:19:28] [TuyaLan] Ready to handle Desk Light 1 (Outlet:3.3) with signature {}
[18/06/2021, 13:19:28] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:29] [TuyaLan] Discovered Worktop Lights 2 (bfb6fcc054a2687cabywdm) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Worktop Lights 2 to 9s
[18/06/2021, 13:19:29] [TuyaLan] Connected to Worktop Lights 2
[TuyaAccessory] Sending first query to Worktop Lights 2 (3.3)
[TuyaAccessory] Worktop Lights 2 (3.3) didn't respond with its current state.
[18/06/2021, 13:19:29] [TuyaLan] Ready to handle Worktop Lights 2 (Outlet:3.3) with signature {}
[18/06/2021, 13:19:29] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:30] [TuyaLan] Discovered Desk Light 2 (bfe21b85258eec4582hodb) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Desk Light 2 to 9s
[18/06/2021, 13:19:32] [TuyaLan] Connected to Desk Light 2
[TuyaAccessory] Sending first query to Desk Light 2 (3.3)
[TuyaAccessory] Desk Light 2 (3.3) didn't respond with its current state.
[18/06/2021, 13:19:32] [TuyaLan] Ready to handle Desk Light 2 (Outlet:3.3) with signature {}
[18/06/2021, 13:19:32] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:43] [TuyaLan] Discovered Bedroom Bookshelf (03100613bcddc242e000) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Bedroom Bookshelf to 9s
[18/06/2021, 13:19:43] [TuyaLan] Connected to Bedroom Bookshelf
[TuyaAccessory] Sending first query to Bedroom Bookshelf (3.3)
[TuyaAccessory] Heard back from Bedroom Bookshelf with command 10
[18/06/2021, 13:19:43] [TuyaLan] Ready to handle Bedroom Bookshelf (Outlet:3.3) with signature {"1":false,"11":0}
[18/06/2021, 13:19:43] [TuyaLan] Discovered The Green Cupboard (03100613bcddc242f5a5) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for The Green Cupboard to 9s
[18/06/2021, 13:19:43] [TuyaLan] Connected to The Green Cupboard
[TuyaAccessory] Sending first query to The Green Cupboard (3.3)
[TuyaAccessory] Heard back from The Green Cupboard with command 10
[18/06/2021, 13:19:43] [TuyaLan] Ready to handle The Green Cupboard (Outlet:3.3) with signature {"1":false,"11":0}
[18/06/2021, 13:19:43] [TuyaLan] Discovered Back Door Light (022375814c11ae0c8ffb) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Back Door Light to 9s
[18/06/2021, 13:19:43] [TuyaLan] Connected to Back Door Light
[TuyaAccessory] Sending first query to Back Door Light (3.3)
[TuyaAccessory] Heard back from Back Door Light with command 10
[18/06/2021, 13:19:43] [TuyaLan] Ready to handle Back Door Light (RGBTWLight:3.3) with signature {"20":false,"21":"white","22":1000,"23":1000,"24":"000003e803e8","25":"000e0d00002e03e802cc00000000","26":0}
[TuyaAccessory] Color format for Back Door Light (3.3) is undetectable.
[18/06/2021, 13:19:43] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:44] [TuyaLan] Discovered Cat Fountain (03100613bcddc242fefe) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Cat Fountain to 9s
[18/06/2021, 13:19:44] [TuyaLan] Connected to Cat Fountain
[TuyaAccessory] Sending first query to Cat Fountain (3.3)
[TuyaAccessory] Heard back from Cat Fountain with command 10
[18/06/2021, 13:19:44] [TuyaLan] Ready to handle Cat Fountain (Outlet:3.3) with signature {"1":true,"11":0}
[18/06/2021, 13:19:44] [TuyaLan] Discovered Garden Light (31824587ecfabc6b1bb7) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Garden Light to 9s
[18/06/2021, 13:19:44] [TuyaLan] Connected to Garden Light
[TuyaAccessory] Sending first query to Garden Light (3.3)
[TuyaAccessory] Heard back from Garden Light with command 10
[18/06/2021, 13:19:44] [TuyaLan] Ready to handle Garden Light (RGBTWLight:3.3) with signature {"20":false,"21":"white","22":1000,"23":1000,"24":"000003e803e8","25":"000e0d00002e03e802cc00000000","26":0}
[TuyaAccessory] Color format for Garden Light (3.3) is undetectable.
[18/06/2021, 13:19:44] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:46] [TuyaLan] Discovered Side Path Light (520006812cf4328255ac) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Side Path Light to 9s
[18/06/2021, 13:19:46] [TuyaLan] Connected to Side Path Light
[TuyaAccessory] Sending first query to Side Path Light (3.3)
[TuyaAccessory] Heard back from Side Path Light with command 10
[18/06/2021, 13:19:46] [TuyaLan] Ready to handle Side Path Light (RGBTWLight:3.3) with signature {"20":false,"21":"white","22":1000,"23":1000,"24":"000003e803e8","25":"000e0d00002e03e802cc00000000","26":0}
[TuyaAccessory] Color format for Side Path Light (3.3) is undetectable.
[18/06/2021, 13:19:46] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:46] [TuyaLan] Discovered Big Office Light (186346424c11ae0f550f) identified as SimpleLight (3.3)
[TuyaAccessory] Changing ping gap for Big Office Light to 9s
[18/06/2021, 13:19:46] [TuyaLan] Connected to Big Office Light
[TuyaAccessory] Sending first query to Big Office Light (3.3)
[TuyaAccessory] Heard back from Big Office Light with command 10
[18/06/2021, 13:19:46] [TuyaLan] Ready to handle Big Office Light (SimpleLight:3.3) with signature {"1":true,"3":255}
[18/06/2021, 13:19:46] [TuyaLan] Discovered Garage Light (42015605483fda4ac016) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Garage Light to 9s
[18/06/2021, 13:19:47] [TuyaLan] Connected to Garage Light
[TuyaAccessory] Sending first query to Garage Light (3.3)
[TuyaAccessory] Heard back from Garage Light with command 10
[18/06/2021, 13:19:47] [TuyaLan] Ready to handle Garage Light (RGBTWLight:3.3) with signature {"20":false,"21":"white","22":1000,"23":1000,"24":"000003e803e8","25":"000e0d00002e03e802cc00000000","26":0}
[TuyaAccessory] Color format for Garage Light (3.3) is undetectable.
[18/06/2021, 13:19:47] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:47] [TuyaLan] Discovered Library Lights (03100613bcddc242f62c) identified as Outlet (3.3)
[TuyaAccessory] Changing ping gap for Library Lights to 9s
[18/06/2021, 13:19:47] [TuyaLan] Connected to Library Lights
[TuyaAccessory] Sending first query to Library Lights (3.3)
[TuyaAccessory] Heard back from Library Lights with command 10
[18/06/2021, 13:19:47] [TuyaLan] Ready to handle Library Lights (Outlet:3.3) with signature {"1":false,"11":0}
[18/06/2021, 13:19:47] [TuyaLan] Discovered Patio Light (31824587ecfabc6ace75) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Patio Light to 9s
[18/06/2021, 13:19:47] [TuyaLan] Connected to Patio Light
[TuyaAccessory] Sending first query to Patio Light (3.3)
[TuyaAccessory] Heard back from Patio Light with command 10
[18/06/2021, 13:19:47] [TuyaLan] Ready to handle Patio Light (RGBTWLight:3.3) with signature {"20":false,"21":"white","22":1000,"23":1000,"24":"000003e803e8","25":"000e0d00002e03e802cc00000000","26":0}
[TuyaAccessory] Color format for Patio Light (3.3) is undetectable.
[18/06/2021, 13:19:47] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:19:47] [TuyaLan] Discovered Front Door Light (022375814c11ae0c8553) identified as RGBTWLight (3.3)
[TuyaAccessory] Changing ping gap for Front Door Light to 9s
[18/06/2021, 13:19:47] [TuyaLan] Connected to Front Door Light
[TuyaAccessory] Sending first query to Front Door Light (3.3)
[TuyaAccessory] Heard back from Front Door Light with command 10
[18/06/2021, 13:19:47] [TuyaLan] Ready to handle Front Door Light (RGBTWLight:3.3) with signature {"20":false,"21":"white","22":1000,"23":1000,"24":"000003e803e8","25":"000e0d00002e03e802cc00000000","26":0}
[TuyaAccessory] Color format for Front Door Light (3.3) is undetectable.
[18/06/2021, 13:19:47] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.
[18/06/2021, 13:20:11] [homebridge-tuya-lan] This plugin generated a warning from the characteristic 'On': characteristic value expected boolean and received undefined. See https://git.io/JtMGR for more info.

Is anyone able to tell me why I can't control the Novostella lights? I have tried setting them up as simple lights, tunable white lights and RGB lights in the config and nothing seems to work. If you need any further details then please ask. Any help greatly appreciated. Thank you.

J1D2A3 commented 3 years ago

Update: after posting on r/homebridge, I was advised to switch to homebridge-tuya as homebridge-tuya-lan hasn't been updated for a while. Managed to get all lights working after fiddling with some of the colour settings. The final config for each light looks like this:

"type": "RGBTWLight",
"name": "Patio Light",
"id": "XXXXXXXXXXXX",
"key": "XXXXXXXXXXXX",
"manufacturer": "Novostella",
"model": "Floodlight",
"dpPower": 20,
"dpBrightness": 22,
"dpColorTemperature": 23,
"minWhiteColor": 0,
"maxWhiteColor": 221,
"dpMode": 21,
"dpColor": 24,
"colorFunction": "HSB",
"scaleBrightness": 1000,
"scaleWhiteColor": 1000