dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

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

Closed rjjmd89 closed 1 year ago

rjjmd89 commented 1 year ago

Describe The Bug:

Environment:

  v16.18.0

>

dkerr64 commented 1 year ago

Can you please explain what the bug is?

dkerr64 commented 1 year ago

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.

dkerr64 commented 1 year ago

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

Thanks.

rjjmd89 commented 1 year ago

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" } }

dkerr64 commented 1 year ago

@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 commented 1 year ago

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: @.***>

dkerr64 commented 1 year ago

@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.

dkerr64 commented 1 year ago

Fixes in release 1.3.1

rjjmd89 commented 1 year ago

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: @.**@.>>