Closed rjjmd89 closed 1 year ago
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.
This is the device: (only two outlets) http://www.yosmart.com/support/YS6802-UC/docs/instruction
This is the 5 outlet device 4 outlets plus switchable UBS ports: http://www.yosmart.com/support/YS6801-UC/docs/instruction
Error in mqttOutletDevice Please report all bugs at https://github.com/dkerr64/homebridge-yolink/issues TypeError: Cannot read properties of undefined (reading 'service') at YoLinkPlatformAccessory.mqttOutletDevice (/var/lib/homebridge/node_modules/homebridge-yolink/src/outletDevice.ts:317:28)
From: David Kerr @.> Sent: Saturday, October 22, 2022 9:50 AM To: dkerr64/homebridge-yolink @.> Cc: rjjmd89 @.>; Mention @.> Subject: Re: [dkerr64/homebridge-yolink] YoLinkPlatformAccessory.mqttOutletDevice (/var/lib/homebridge/node_modules/homebridge-yolink/src/outletDevice.ts:317:28) (Issue #63)
@rjjmd89https://github.com/rjjmd89 can you provide more information please. I need the log data and information on the device you are trying to use.
Thanks.
— Reply to this email directly, view it on GitHubhttps://github.com/dkerr64/homebridge-yolink/issues/63#issuecomment-1287897215, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TA2BPF454FIM74435KIWLWERAPHANCNFSM6AAAAAARHTY7R4. You are receiving this because you were mentioned.Message ID: @.**@.>>
{ "bridge": { "name": "Homebridge ", "username": "*", "port": 51671, "pin": "", "advertiser": "avahi", "bind": [ "eth0" ] }, "accessories": [], "platforms": [ { "name": "Config", "port": 8581, "auth": "form", "theme": "auto", "tempUnits": "f", "lang": "auto", "platform": "config" }, { "name": "YoLink", "platform": "YoLink", "tokenURL": "http://192.168.1.**/apps/api/101/devices/all?access_token=**", "apiURL": "https://api.yosmart.com/open/yolink/v2/api", "mqttPort": 8003, "userAccessId": "**", "secretKey": "****", "refreshAfter": 14500, "verboseLog": false, "liteLog": true, "allDevices": true, "excludeTypes": [ "Hub", "SpeakerHub" ], "deviceTemperatures": true, "enableExperimental": false }, { "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" } ], "_bridge": { "username": "**", "port": 53492 }, "platform": "Alexa" }, { "platform": "AlexaPlayer" }, { "name": "Hue", "anyOn": true, "effects": true, "groups": true, "hosts": [ "192.168.1.3", "192.168.1.76", "192.168.1.27" ], "homebridgeHue2": "192.168.1.3", "lights": true, "nativeHomeKitLights": true, "nativeHomeKitSensors": true, "resource": true, "_bridge": { "username": "***", "port": 32128 }, "platform": "Hue" } }
@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
Thank you will try your suggestion
Get Outlook for iOShttps://aka.ms/o0ukef
From: David Kerr @.> Sent: Monday, October 24, 2022 11:37:53 AM To: dkerr64/homebridge-yolink @.> Cc: surfer967 @.>; Mention @.> Subject: Re: [dkerr64/homebridge-yolink] YoLinkPlatformAccessory.mqttOutletDevice (/var/lib/homebridge/node_modules/homebridge-yolink/src/outletDevice.ts:317:28) (Issue #63)
@rjjmd89https://github.com/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
— Reply to this email directly, view it on GitHubhttps://github.com/dkerr64/homebridge-yolink/issues/63#issuecomment-1289649913, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TA2BOAOMV5QSR2CW25D3DWE36TDANCNFSM6AAAAAARHTY7R4. You are receiving this because you were mentioned.Message ID: @.***>
@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
All is well in Yolink land……..thank you
From: David Kerr @.> Sent: Saturday, November 5, 2022 12:37 PM To: dkerr64/homebridge-yolink @.> Cc: surfer967 @.>; Mention @.> Subject: Re: [dkerr64/homebridge-yolink] YoLinkPlatformAccessory.mqttOutletDevice (/var/lib/homebridge/node_modules/homebridge-yolink/src/outletDevice.ts:317:28) (Issue #63)
Fixes in release 1.3.1
— Reply to this email directly, view it on GitHubhttps://github.com/dkerr64/homebridge-yolink/issues/63#issuecomment-1304654089, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3TA2BOLK3AUCFETCNXK7P3WG3OQTANCNFSM6AAAAAARHTY7R4. You are receiving this because you were mentioned.Message ID: @.**@.>>
Describe The Bug:
Environment:
>
"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" } ] }