dkerr64/homebridge-yolink

YoLinkPlatformAccessory.mqttOutletDevice (/var/lib/homebridge/node_modules/homebridge-yolink/src/outletDevice.ts:317:28)

rjjmd89 opened this issue · 9 comments

Describe The Bug:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version: <
  v16.18.0
> * **NPM Version**: * **Operating System**: * "bridge": { "name": "Homebridge ", "username": "", "port": , "pin": "", "advertiser": "avahi", "bind": [] }, "accessories": [ { "name": "Bedroom Speakers", "room": "Bedroom", "groupCacheLifetime": 15, "deviceCacheLifetime": 3600, "accessory": "Sonos" } ], "platforms": [ { "name": "Config", "port": 8581, "auth": "form", "theme": "auto", "tempUnits": "f", "lang": "auto", "platform": "config" }, { "name": "YoLink", "platform": "YoLink", "tokenURL": "https://api.yosmart.com/open/yolink/token", "apiURL": "https://api.yosmart.com/open/yolink/v2/api", "mqttPort": , "userAccessId": "", "secretKey": "", "refreshAfter": 14500, "verboseLog": false, "liteLog": true, "allDevices": true, "excludeTypes": [ "Hub", "SpeakerHub" ], "deviceTemperatures": true, "enableExperimental": true }, { "name": "Google Smart Home", "token": ", "notice": "Keep your token a secret!", "forceFahrenheit": true, "platform": "google-smarthome" }, { "name": "Alexa", "username": "", "password": "", "pin": "", "routines": false, "blind": false, "door": false, "debug": false, "deviceListHandling": "allow", "speakers": [ { "manufacturer": "Alexa", "name": "Office" }, { "manufacturer": "Alexa", "name": "Livingroom" }, { "manufacturer": "Alexa", "name": "Kitchen" }, { "manufacturer": "Alexa", "name": "Bathroom" }, { "manufacturer": "Alexa", "name": "Guest Bedroom" }, { "manufacturer": "Alexa", "name": "Main bedroon 2" } ], "_bridge": { "username": "", "port": }, "platform": "Alexa" }, { "platform": "AlexaPlayer" }, { "name": "Hue", "anyOn": true, "effects": true, "groups": true, "hosts": [ " ], "homebridgeHue2": "", "lights": true, "nativeHomeKitLights": true, "nativeHomeKitSensors": true, "resource": true, "_bridge": { "username": "", "port": }, "platform": "Hue" }, { "name": "Security System", "username": " "logLevel": 3, "armingModes": { "away": { "noEntryDelay": false, "silentArming": false, "nightArming": false }, "night": { "noEntryDelay": true, "silentArming": false, "nightArming": true }, "stay": { "noEntryDelay": true, "silentArming": false, "nightArming": false } }, "platform": "Alarmdotcom" } ] }

Can you please explain what the bug is?

Is this a multi-outlet device causing the problem? If so what is the specific YoLink device/model and how many outlets does it have? Have you specced the number of outlets in the config file?

Thanks.

@rjjmd89 can you provide more information please. I need the log data and information on the device you are trying to use.

Thanks.

@rjjmd89 thanks for providing the device info. I suspected that you might have the two-outlet... I don't think anyone has tested that yet. I don't have either that or the 4+USB power strip, though the power strip has been tested as working. I will reach out to YoLink and see if they will send me one of each as it is possible that the 2-outlet is sending a JSON data structure that follows a different format than the 5-outlet.

One thing you could try is to add a device specific configuration to your config file... within the YoLink section add...

"devices": [
                {
                    "deviceId": "0123456789abcdef",
                    "config": {
                        "name": "Dual-Outlet",
                        "model": "YS6802",
                        "nOutlets": 2
                    }
                }
            ]

Replace the deviceId with the actual ID of your two-outlet device. The name and model strings are optional, but the nOutlets setting should be set to 2.

The second thing you could do is turn on verboseLog and capture the log file from the point of initialization of the plugin up until the failure, and send that to me.

Thanks,
David

@rjjmd89 I received the two-outlet device to test with and found the bug. Next release will include the fix. Thank you for reporting it.

Fixes in release 1.3.1