dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

Key Fob 4 buttons will not show in Home App anymore, Key Fob temperature does show in Home App though. #76

Closed mames13 closed 1 year ago

mames13 commented 1 year ago

Describe Your Problem: <Hello, noticed a few days ago that several Yolink devices were not responding in Home app but where showing up in the Yolink app. Tried installed v1.3.4, which didn't seem to fix the problem. Removed the bridge from Home app and reloaded it but noticed that the key fob (with button functions) would not load back in at all. The rest of the accessories did load (Hub, Sirens, Vibration Sensor+Vibration Sensor Temperature). The temperature of the Key Fob does show in Home app. Have since tried deleting the Key Fob from the Yolink app and reinstalling it and also manually adding all of Yolink to the Devices Config list via SETTINGS Device Identifier. I just tried uninstalling and reinstalling on my Synology DS and when that failed I tried doing a fresh install of the Yolink Plugin on my Mac (because other plugins that have not worked on my Synology have worked there). Decided to keep the Plugin running on my Mac now but I still can't get Home app to see the Fob in Home (the Fob is unfortunately the glue that binds /syncs all of my Yolink and Aquara sensors and alarms so hoping to figure this out. Thank you! >

Logs: This log is taken from the Logs Tab (redacted info is noted with ****)

[4/20/2023, 6:02:08 PM] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge FD93) is running on port 51912.
[4/20/2023, 6:02:08 PM] [MiLightHubPlatform] Launched child bridge with PID *****
[4/20/2023, 6:02:08 PM] [YoLink] Launched child bridge with PID 14489
[4/20/2023, 6:02:08 PM] [Diskstation] Launched child bridge with PID *****
[4/20/2023, 6:02:08 PM] Registering platform 'homebridge-milighthub-platform.MiLightHubPlatform'
[4/20/2023, 6:02:08 PM] [MiLightHubPlatform] Loaded homebridge-milighthub-platform v1.0.0 child bridge successfully
[4/20/2023, 6:02:08 PM] Registering platform 'homebridge-yolink.YoLink'
[4/20/2023, 6:02:08 PM] Loaded 11 cached accessories from cachedAccessories.0E2C5CE126EE.
[4/20/2023, 6:02:08 PM] [YoLink] Loaded homebridge-yolink v1.3.4 child bridge successfully
[4/20/2023, 6:02:08 PM] Loaded 4 cached accessories from cachedAccessories.0ED6447D2AF8.
[4/20/2023, 6:02:08 PM] [YoLink] YoLink plugin for HomeBridge version 1.3.4 (c) 2022 David A. Kerr
Please report all bugs at https://github.com/dkerr64/homebridge-yolink/issues

[4/20/2023, 6:02:08 PM] [YoLink] [verbose] Loaded configuration:
{"name":"YoLink","platform":"YoLink","tokenURL":"https://api.yosmart.com/open/yolink/token","apiURL":"https://api.yosmart.com/open/yolink/v2/api","mqttPort":8003,"userAccessId":"ua_********","secretKey":"sec_********","refreshAfter":14500,"verboseLog":true,"liteLog":true,"allDevices":true,"includeTypes":["Hub","SpeakerHub","VibrationSensor","MotionSensor","LeakSensor","Manipulator","THSensor","DoorSensor","Siren","Switch","Outlet","SmartRemoter","MultiOutlet","GarageDoor","Finger","Lock","PowerFailureAlarm","Dimmer"],"deviceTemperatures":true,"enableExperimental":true,"devices":{"undefined":{"temperature":true}},"excludeTypes":["Hub","SpeakerHub"],"powerFailureSensorAs":"Outlet","version":"1.3.4","garageDoors":[],"checkNewDeviceInterval":0}
[4/20/2023, 6:02:08 PM] [YoLink] [verbose] YoLinkAPI.constructor
[4/20/2023, 6:02:08 PM] [YoLink] [verbose] Loading accessory from cache:Yo PLUG
[4/20/2023, 6:02:08 PM] [YoLink] [verbose] Loading accessory from cache:Yo Siren 2
[4/20/2023, 6:02:08 PM] [YoLink] [verbose] Loading accessory from cache:Yo Vibration Sensor
[4/20/2023, 6:02:08 PM] [YoLink] [verbose] Loading accessory from cache:YoLink Fob
[4/20/2023, 6:02:08 PM] Registering accessory 'homebridge-synology.synology'
[4/20/2023, 6:02:08 PM] [YoLink] Login to YoLink API with credentials from config
[4/20/2023, 6:02:08 PM] [YoLink] [verbose] SENDING:
grant_type=client_credentials&client_id=ua_********&client_secret=sec_********
[4/20/2023, 6:02:08 PM] [Diskstation] Loaded homebridge-synology v0.5.2 child bridge successfully
[4/20/2023, 6:02:08 PM] [MiLightHubPlatform] **** removing about 100 lines MilightHubPlatform plugin device logs here **** 
[4/20/2023, 6:02:08 PM] Loaded 0 cached accessories from cachedAccessories.0E441CB4E1ED.
[4/20/2023, 6:02:08 PM] [Diskstation] Synology Diskstation finished initializing!
[4/20/2023, 6:02:08 PM] [MiLightHubPlatform] DEBUG:  DidFinishLaunching
[4/20/2023, 6:02:08 PM] [MiLightHubPlatform] DEBUG:  Querying /settings
[4/20/2023, 6:02:08 PM] [MiLightHubPlatform] DEBUG:  GET: /settings
[4/20/2023, 6:02:09 PM] Homebridge v1.6.0 (HAP v0.11.0) (Diskstation) is running on port *****.
[4/20/2023, 6:02:09 PM] Homebridge v1.6.0 (HAP v0.11.0) (MiLightHubPlatform) is running on port *****.
[4/20/2023, 6:02:09 PM] Homebridge v1.6.0 (HAP v0.11.0) (YoLink) is running on port 44099.
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] RECEIVED:
{"access_token":"****","token_type":"bearer","expires_in":7200,"refresh_token":"***","scope":["create"]}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] SENDING:
{"time":1682038929139,"method":"Home.getGeneralInfo"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] RECEIVED:
{"code":"000000","time":1682038929208,"msgid":1682038929208,"method":"Home.getGeneralInfo","desc":"Success","data":{"id":"b895c9896af7488fa26eeac4f5fefb1a"}}
[4/20/2023, 6:02:09 PM] [YoLink] Starting interval timer to refresh accessToken every 6480 seconds
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] YoLinkAPI.getDeviceList
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] YoLinkAPI.getAccessToken
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] SENDING:
{"time":1682038929226,"method":"Home.getDeviceList"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] RECEIVED:
{"code":"000000","time":1682038929299,"msgid":1682038929299,"method":"Home.getDeviceList","desc":"Success","data":{"devices":[{"deviceId":"d88b4c0100057311","deviceUDID":"63b62d50bacb414f84522d33dee1d4f6","name":"Yo PLUG","token":"16CE241F37972DEB004ACC9A8C0A4DC4","type":"Outlet","parentDeviceId":null,"modelName":"YS6604-UC"},{"deviceId":"d88b4c0100049c64","deviceUDID":"e371f6b68a674bb2aef16c0678c32afb","name":"Yo Siren 2","token":"790143A9E7AB1C63F84BA0BA058A6775","type":"Siren","parentDeviceId":null,"modelName":"YS7104-UC"},{"deviceId":"d88b4c010004e05b","deviceUDID":"199cfb7f76a346cca98586e86171376c","name":"Yo Vibration Sensor","token":"5AF175D7BFB194A3D53724CDCF3A3186","type":"VibrationSensor","parentDeviceId":null,"modelName":"YS7201-UC"},{"deviceId":"d88b4c0100053338","deviceUDID":"bfdb51a6b8454044ac18f2fde9ce8bc7","name":"YoLink Fob","token":"8D018B0B1C8605DADA7AC229A4D7E5FF","type":"SmartRemoter","parentDeviceId":null,"modelName":"YS3604-UC"},{"deviceId":"d88b4c160301cfb5","deviceUDID":"8f3f8a17dbf547609694cdf105bf8b58","name":"YoLink Hub","token":"9A02E8C0F14DE1CC9282B7D76F389316","type":"Hub","parentDeviceId":null,"modelName":"YS1603-UC"}]}}
[4/20/2023, 6:02:09 PM] [YoLink] YoLinkAPI.getDeviceList found 5 devices [lite]
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] {"deviceId":"d88b4c0100057311","deviceUDID":"63b62d50bacb414f84522d33dee1d4f6","name":"Yo PLUG","token":"16CE241F37972DEB004ACC9A8C0A4DC4","type":"Outlet","parentDeviceId":null,"modelName":"YS6604-UC"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Restoring accessory from cache: Yo PLUG (d88b4c0100057311)
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Data refresh timer for Yo PLUG (d88b4c0100057311) fired
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] {"deviceId":"d88b4c0100049c64","deviceUDID":"e371f6b68a674bb2aef16c0678c32afb","name":"Yo Siren 2","token":"790143A9E7AB1C63F84BA0BA058A6775","type":"Siren","parentDeviceId":null,"modelName":"YS7104-UC"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Restoring accessory from cache: Yo Siren 2 (d88b4c0100049c64)
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Data refresh timer for Yo Siren 2 (d88b4c0100049c64) fired
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] {"deviceId":"d88b4c010004e05b","deviceUDID":"199cfb7f76a346cca98586e86171376c","name":"Yo Vibration Sensor","token":"5AF175D7BFB194A3D53724CDCF3A3186","type":"VibrationSensor","parentDeviceId":null,"modelName":"YS7201-UC"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Restoring accessory from cache: Yo Vibration Sensor (d88b4c010004e05b)
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Data refresh timer for Yo Vibration Sensor (d88b4c010004e05b) fired
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] {"deviceId":"d88b4c0100053338","deviceUDID":"bfdb51a6b8454044ac18f2fde9ce8bc7","name":"YoLink Fob","token":"8D018B0B1C8605DADA7AC229A4D7E5FF","type":"SmartRemoter","parentDeviceId":null,"modelName":"YS3604-UC"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Restoring accessory from cache: YoLink Fob (d88b4c0100053338)
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Initialize stateless programmable switch with 4 buttons
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Data refresh timer for YoLink Fob (d88b4c0100053338) fired
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] {"deviceId":"d88b4c160301cfb5","deviceUDID":"8f3f8a17dbf547609694cdf105bf8b58","name":"YoLink Hub","token":"9A02E8C0F14DE1CC9282B7D76F389316","type":"Hub","parentDeviceId":null,"modelName":"YS1603-UC"}
[4/20/2023, 6:02:09 PM] [YoLink] Not registering device YoLink Hub (d88b4c160301cfb5) as config 'hide=true'
[4/20/2023, 6:02:09 PM] [YoLink] Device "undefined" does not exist in YoLink device list ({"temperature":true}). Check config file for deviceID typo.
[4/20/2023, 6:02:09 PM] [YoLink] Create MQTT client to connect to YoLink message service
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] MQTT options: {"clean":true,"username":"****","reconnectPeriod":2000}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] checkDeviceState for Yo PLUG (d88b4c0100057311) (refresh after 14500 seconds)
[4/20/2023, 6:02:09 PM] [YoLink] YoLinkAPI.getDeviceState for Yo PLUG (d88b4c0100057311) [lite]
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] checkDeviceState for Yo Siren 2 (d88b4c0100049c64) (refresh after 14500 seconds)
[4/20/2023, 6:02:09 PM] [YoLink] YoLinkAPI.getDeviceState for Yo Siren 2 (d88b4c0100049c64) [lite]
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] checkDeviceState for Yo Vibration Sensor (d88b4c010004e05b) (refresh after 14500 seconds)
[4/20/2023, 6:02:09 PM] [YoLink] YoLinkAPI.getDeviceState for Yo Vibration Sensor (d88b4c010004e05b) [lite]
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] checkDeviceState for YoLink Fob (d88b4c0100053338) (refresh after 14500 seconds)
[4/20/2023, 6:02:09 PM] [YoLink] YoLinkAPI.getDeviceState for YoLink Fob (d88b4c0100053338) [lite]
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] YoLinkAPI.getAccessToken
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] SENDING:
{"time":1682038929341,"method":"Outlet.getState","targetDevice":"d88b4c0100057311","token":"16CE241F37972DEB004ACC9A8C0A4DC4"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] YoLinkAPI.getAccessToken
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] SENDING:
{"time":1682038929342,"method":"Siren.getState","targetDevice":"d88b4c0100049c64","token":"790143A9E7AB1C63F84BA0BA058A6775"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] YoLinkAPI.getAccessToken
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] SENDING:
{"time":1682038929344,"method":"VibrationSensor.getState","targetDevice":"d88b4c010004e05b","token":"5AF175D7BFB194A3D53724CDCF3A3186"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] YoLinkAPI.getAccessToken
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] SENDING:
{"time":1682038929351,"method":"SmartRemoter.getState","targetDevice":"d88b4c0100053338","token":"8D018B0B1C8605DADA7AC229A4D7E5FF"}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] MQTT connect: subscribe to messages for 'yl-home/b895c9896af7488fa26eeac4f5fefb1a/+/report'
[4/20/2023, 6:02:09 PM] [YoLink] MQTT subscribed: yl-home/b895c9896af7488fa26eeac4f5fefb1a/+/report
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] RECEIVED:
{"code":"000000","time":1682038929422,"msgid":1682038929422,"method":"VibrationSensor.getState","desc":"Success","data":{"online":true,"state":{"alertInterval":60,"battery":4,"devTemperature":26,"noVibrationDelay":0,"sensitivity":5,"state":"alert","version":"0107"},"deviceId":"d88b4c010004e05b","reportAt":"2023-04-20T23:46:37.427Z"}}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Battery level for Yo Vibration Sensor (d88b4c010004e05b) is: 100%
[4/20/2023, 6:02:09 PM] [YoLink] At 4/20/2023, 4:46:37 PM: Device state for Yo Vibration Sensor (d88b4c010004e05b) is: Motion: alert, Battery: 4, DevTemp: 26°C (78.8°F)
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Set data refresh timer for Yo Vibration Sensor (d88b4c010004e05b) to run in 14500 seconds
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] RECEIVED:
{"code":"000000","time":1682038929423,"msgid":1682038929423,"method":"SmartRemoter.getState","desc":"Success","data":{"online":true,"state":{"battery":4,"beep":true,"devTemperature":27,"event":{"keyMask":1,"type":"Press"},"version":"0411"},"deviceId":"d88b4c0100053338","reportAt":"2023-04-21T00:10:39.120Z"}}
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Battery level for YoLink Fob (d88b4c0100053338) is: 100%
[4/20/2023, 6:02:09 PM] [YoLink] At 4/20/2023, 5:10:39 PM: Device state for YoLink Fob (d88b4c0100053338) is: {"keyMask":1,"type":"Press"}, Battery: 4, DevTemp: 27°C (80.6°F)
[4/20/2023, 6:02:09 PM] [YoLink] [verbose] Set data refresh timer for YoLink Fob (d88b4c0100053338) to run in 14500 seconds
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] checkDeviceState for Yo Vibration Sensor (d88b4c010004e05b) (refresh after 14500 seconds)
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] Battery level for Yo Vibration Sensor (d88b4c010004e05b) is: 100%
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] checkDeviceState for Yo Vibration Sensor (d88b4c010004e05b) (refresh after 14500 seconds)
[4/20/2023, 6:02:10 PM] [YoLink] At 4/20/2023, 4:46:37 PM: Device state for Yo Vibration Sensor (d88b4c010004e05b) is: Motion: alert, Battery: 4, DevTemp: 26°C (78.8°F) [lite]
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] checkDeviceState for Yo Vibration Sensor (d88b4c010004e05b) (refresh after 14500 seconds)
[4/20/2023, 6:02:10 PM] [YoLink] At 4/20/2023, 4:46:37 PM: Device state for Yo Vibration Sensor (d88b4c010004e05b) is: Motion: alert, Battery: 4, DevTemp: 26°C (78.8°F) [lite]
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] checkDeviceState for YoLink Fob (d88b4c0100053338) (refresh after 14500 seconds)
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] Battery level for YoLink Fob (d88b4c0100053338) is: 100%
[4/20/2023, 6:02:10 PM] [YoLink] [verbose] checkDeviceState for YoLink Fob (d88b4c0100053338) (refresh after 14500 seconds)
[4/20/2023, 6:02:10 PM] [YoLink] At 4/20/2023, 5:10:39 PM: Device state for YoLink Fob (d88b4c0100053338) is: {"keyMask":1,"type":"Press"}, Battery: 4, DevTemp: 27°C (80.6°F) [lite]
[4/20/2023, 6:02:11 PM] [YoLink] [verbose] RECEIVED:
{"code":"000000","time":1682038931192,"msgid":1682038931192,"method":"Siren.getState","desc":"Success","data":{"state":"normal","soundLevel":0,"mute":false,"battery":1,"powerSupply":"battery","alarmDuation":30,"version":"0402","loraInfo":{"signal":-34,"gatewayId":"d88b4c160301cfb5","gateways":1}}}
[4/20/2023, 6:02:11 PM] [YoLink] At 4/20/2023, 6:02:11 PM: Device state for Yo Siren 2 (d88b4c0100049c64) is: Switch: normal, Battery: 1
[4/20/2023, 6:02:11 PM] [YoLink] Battery level for Yo Siren 2 (d88b4c0100049c64) is: 25%
[4/20/2023, 6:02:11 PM] [YoLink] [verbose] Set data refresh timer for Yo Siren 2 (d88b4c0100049c64) to run in 14498 seconds
[4/20/2023, 6:02:11 PM] [YoLink] [verbose] checkDeviceState for Yo Siren 2 (d88b4c0100049c64) (refresh after 14500 seconds)
[4/20/2023, 6:02:11 PM] [YoLink] Battery level for Yo Siren 2 (d88b4c0100049c64) is: 25%
[4/20/2023, 6:02:11 PM] [YoLink] [verbose] checkDeviceState for Yo Siren 2 (d88b4c0100049c64) (refresh after 14500 seconds)
[4/20/2023, 6:02:11 PM] [YoLink] At 4/20/2023, 6:02:11 PM: Device state for Yo Siren 2 (d88b4c0100049c64) is: Switch: normal, Battery: 1 [lite]
[4/20/2023, 6:02:13 PM] [homebridge-yolink] This plugin slows down Homebridge. The read handler for the characteristic 'On' was slow to respond! See https://homebridge.io/w/JtMGR for more info.
[4/20/2023, 6:02:13 PM] [YoLink] [verbose] RECEIVED:
{"code":"000201","time":1682038933414,"msgid":1682038933414,"method":"Outlet.getState","desc":"Can't connect to Device","data":{}}
[4/20/2023, 6:02:13 PM] [YoLink] Retry bound tryGetDeviceState due to error, try again in 2 second(s): YoLink API error code: 000201 Can't connect to Device (Outlet.getState) [lite]
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  Querying /settings
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /settings
[4/20/2023, 6:02:14 PM] [Diskstation] state changed to Online; updated characteristic
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x4004/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET (dedup): /gateways/0x4004/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x1004/fut089/4
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x1001/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET (dedup): /gateways/0x1001/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET (dedup): /gateways/0x1001/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x4008/fut089/8
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x1008/fut089/8
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x3001/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET (dedup): /gateways/0x3001/fut089/1
[4/20/2023, 6:02:14 PM] [MiLightHubPlatform] DEBUG:  GET: /gateways/0x4007/fut089/7
[4/20/2023, 6:02:15 PM] [YoLink] YoLinkAPI.getDeviceState for Yo PLUG (d88b4c0100057311) [lite]
[4/20/2023, 6:02:15 PM] [YoLink] [verbose] YoLinkAPI.getAccessToken
[4/20/2023, 6:02:15 PM] [YoLink] [verbose] SENDING:
{"time":1682038935564,"method":"Outlet.getState","targetDevice":"d88b4c0100057311","token":"16CE241F37972DEB004ACC9A8C0A4DC4"}
[4/20/2023, 6:02:16 PM] [YoLink] [verbose] RECEIVED:
{"code":"000000","time":1682038936154,"msgid":1682038936154,"method":"Outlet.getState","desc":"Success","data":{"state":"open","delay":{"ch":1,"on":0,"off":0},"power":0,"watt":0,"version":"040e","time":"2023-04-20T10:02:16.000Z","tz":-7,"loraInfo":{"signal":-35,"gatewayId":"d88b4c160301cfb5","gateways":1}}}
[4/20/2023, 6:02:16 PM] [YoLink] At 4/20/2023, 6:02:16 PM: Device state for Yo PLUG (d88b4c0100057311) is: nOutlets: 1, Outlet (0..n-1) 0: open
[4/20/2023, 6:02:16 PM] [YoLink] [verbose] Set data refresh timer for Yo PLUG (d88b4c0100057311) to run in 14493 seconds
[4/20/2023, 6:02:16 PM] [YoLink] [verbose] checkDeviceState for Yo PLUG (d88b4c0100057311) (refresh after 14500 seconds)
[4/20/2023, 6:02:16 PM] [YoLink] At 4/20/2023, 6:02:16 PM: Device state for Yo PLUG (d88b4c0100057311) is: nOutlets: 1, Outlet (0..n-1) 0: open [lite]

Plugin Config:

{
    "name": "YoLink",
    "platform": "YoLink",
    "tokenURL": "https://api.yosmart.com/open/yolink/token",
    "apiURL": "https://api.yosmart.com/open/yolink/v2/api",
    "mqttPort": 8003,
    "userAccessId": "ua_*****",
    "secretKey": "sec_*****",
    "refreshAfter": 14500,
    "verboseLog": true,
    "liteLog": true,
    "allDevices": true,
    "includeTypes": [
        "Hub",
        "SpeakerHub",
        "VibrationSensor",
        "MotionSensor",
        "LeakSensor",
        "Manipulator",
        "THSensor",
        "DoorSensor",
        "Siren",
        "Switch",
        "Outlet",
        "SmartRemoter",
        "MultiOutlet",
        "GarageDoor",
        "Finger",
        "Lock",
        "PowerFailureAlarm",
        "Dimmer"
    ],
    "deviceTemperatures": true,
    "enableExperimental": true,
    "devices": [
        {
            "config": {
                "temperature": true
            }
        }
    ],
    "_bridge": {
        "username": "**:**:**:**:**:**",
        "port": 44099
    }
}

Screenshots:

Environment

dkerr64 commented 1 year ago

After the plugin is all initialized, if you press a button on the remote/fob is that registered in the log? You should see something like...

[4/20/2023, 10:37:39 PM] [YoLink] At 4/20/2023, 10:37:39 PM: Device state for YoLink Fob (d88b4c0100040bb2) is: {"keyMask":2,"type":"Press"}, Battery: 4, DevTemp: 23°C (73.4°F) (MQTT: SmartRemoter.StatusChange)
[4/20/2023, 10:37:39 PM] [YoLink] MQTT: SmartRemoter.StatusChange for device YoLink Fob (d88b4c0100040bb2) button 2 single press event

Also, does the fob, and all its buttons, appear in the Homebridge accessories? It should look something like this...

image

Thanks, David

mames13 commented 1 year ago

Hi! Yes the buttons show up visually. I have tried pushing the buttons a few times and I do not get similar messages as yours just "[4/20/2023, 8:38:19 PM] [YoLink] [verbose] checkDeviceState for YoLink Fob (d88b4c0100053338) (refresh after 14500 seconds) [4/20/2023, 8:38:19 PM] [YoLink] [verbose] Battery level for YoLink Fob (d88b4c0100053338) is: 100%" Nothing with the word "press."

The fob is now technically working again but it is still invisible in the iPhone app (and I'm not sure precisely what I did, of a few things, that may have helped). However I do now see it (responding and programable) in the Mac Desktop version of Home.

Just incase this helps you others, here's what I did do.

  1. I uninstalled the plugin from HB and then cleared out all the old Yolink Cashed accessories in the Homebridge Settings menu (they were still there after uninstalling the plugin).

  2. When I reinstalled the plugin, I turned off temperature services in the globals and then manually entered the devices I wanted to see the temperatures for ( but not for the fob because when having this problem, I noticed that the Home app would add the fob temperature sensor as an accessory but not add the Buttons part of the fob as a device, repeated this error 5 times). This definitely gave me some hope because at least, I finally got add the Button part of the Fob as an accessory back to the Home app. But! After adding it back to home it was still not visible on my iPhone 11 Pro.

  3. Launched Home Desktop app on my Mac laptop Home Version 5.0 (472.7.18.4.1) Big Sur 11.7.2 and I visually saw the Fob there with buttons again. Also when getting info on the Fob in Home, I saw that the previous scenes that I assigned were also still there. When I press the Yolink fob buttons (both physically and with the Home app via the "Test this Action" digital button), both the Yolink scenes and the the Apple Home-side Aqara scenes sync up, which is great.

I realize now that this problem may have started after I updated my iPhone 11 iOS recently. I'm downloading the latest bug fix update (16.4.1) to see if it helps. I will let you know shortly.

dkerr64 commented 1 year ago

I'm not sure that there is anything in the plugin that would cause the behavior you see. I will comment though on deleting cached accessories in Homebridge. I had to do this from time-to-time while developing the plugin and bad things can happen if the cache gets out-of-sync (Apple Home gets confused).

A word of warning... only empty your Homebridge cache as a last resort... it is much safer to delete single cached entries. When removed from cache, the accessory is recreated when next discovered and Apple Home thinks that the old one is gone and the new one is a different accessory... and that can cause havoc with any automations you have, which may end up being deleted. If you empty the cache you will have a lot of work to do to rebuild your Apple Home automations, etc.

dkerr64 commented 1 year ago

Is this still a problem?

mames13 commented 1 year ago

Hi David, thanks for checking in! I was just in the process earlier this week of finally testing the fob buttons (after just installing a more robust access point …. to hopefully help things) when the battery in the Macbook that I was hosting HB on popped! The battery didn’t explode but expanded causing two screws in case to shoot out and the case to open (LiPo battery fun). I’m currently using the settings.json and other device files to restore the whole, big system. By the end of the weekend I should have it up and running. The last I checked, when tapping on the fob buttons in the Homebridge accessories simulator, there was no print out of activity. I will let you know tho, asap. Thanks again, love your software … Mame

On Fri, Jun 9, 2023 at 14:18 David Kerr @.***> wrote:

Is this still a problem?

— Reply to this email directly, view it on GitHub https://github.com/dkerr64/homebridge-yolink/issues/76#issuecomment-1585138611, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4VNJDVWDKSONH7DMKKNOJLXKOHJBANCNFSM6AAAAAAXGHXEBE . You are receiving this because you authored the thread.Message ID: @.***>

dkerr64 commented 1 year ago

I'm not sure what you mean by Homebridge Accessories Simulator. If you mean clicking on the icon that appears in the Accessories page of Homebridge UI then I would not expect to see anything in the Homebridge log for that. The plugin will only log interaction/messages from the actual YoLink device(s), it is not notified when you click on icons in Homebridge.

David

mames13 commented 1 year ago

Hi! Yes, that’s what I meant re: accessory simulator (that’s what thought that page does however I’m realizing now that I can’t control any devices from it from any of my plugins). Okay great to know about logging. 👍Do you know though, on the Accessories page of the Homebridge UI, when I click on devices such as my Yolink smart miniplugs and other devices listed on that page are they supposed to respond/turn on or off? In terms of my fob disappearing issue, it seems to have come back and is staying put! On top of clearing the fob device in the homekit device cache, I also updated the Apple Home software on my main phone to the current/last version of the “old architecture” Home App (there was an update for it that I was unaware of when the problem started) so that may have helped too. Also … This week, since everything had to be rebuilt anyway, I tried upgrading to the “new architecture” version of Home IOS as well. My Yolink devices all seem to be working great! These are screen shots of what I see now … which is how I remember things being before I had my problem.There are not controllable buttons or a switch located on the main/favorite screen for the fob, but I can control the fob actions by clicking the icon for the fob / going into the device, and running the automation via “test this action” …When I arm or disarm my car alarm system it triggers my TP-Link Kasas plugs (3 plugs currently, for stay, away, and disarm) and the Kasa plugs (listed in above automation ) talk with Amazon Alexa where Alexa triggers the corresponding scene changes in the Yolink App/ Yolink. I did all this so I can use my physical fob on my car keychain when I’m in range of the car and yolink hubs to control both the Yolink and Aqara sensors + physical sirens and speaker hubs (I have the Yolink speaker hub too just need to still reconnect it). But also … When I’m away from home / out of range, I can arm or disarm both systems with in Apple Home! I wish that the Yolink pluggin included a four state switch to use with the fob (just for the odd times where it would come in handy), similar to how Aqara has a switch (see pic)  but in place of that, I change the security states in one of three ways other ways which work great: by changing the Scenes in Apple Home, by turning on/off Tp-link Kasa plug, or by the changing the Aqara 4-way switch pictured above (I have lots of automations that tie all of these things  together using Controller App). Pretty cool right?!!I will log into Github and update that the original problem was fixed.Thanks for great your work, I really love the Yolink products and I’m so happy they can work in Homekit. Together with the Aqara sensors and and alarms they make a great system, (that use two different kinds of sensor technology with two different connections to the web,  for extra verification and redundancy).  I’ve had two would-be thieves who ignored my security cameras on the carport but then ran away when the car alarms went off and my Homekit house lights went on (also via automation)!I also have a disabled sister, so my next project will be making a combination Yolink + Aqara system for her needs. The Yolink mini plugs and hubs have a much more stable connection to the network than the TP-plugs so I’m going way more Yolink plugs on her set up(glad you have included support for for them in your plugin).  Thank you so much,MameSent from my iPhoneOn Jun 12, 2023, at 05:28, David Kerr @.***> wrote: I'm not sure what you mean by Homebridge Accessories Simulator. If you mean clicking on the icon that appears in the Accessories page of Homebridge UI then I would not expect to see anything in the Homebridge log for that. The plugin will only log interaction/messages from the actual YoLink device(s), it is not notified when you click on icons in Homebridge. David

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

dkerr64 commented 1 year ago

Thanks for the long description. As you replied to the email rather than within Github, it looks like images were dropped.

mames13 commented 1 year ago

HI David,

I thought longer about how none of the accessories on the Homebridge accessory page did not work (not just your’s). I tried a complete uninstall and reinstall of Homebridge but got lots of install errors when reinstalling. I booted my mac in Command + R / Restore mode, and reinstalled the Mac OS. After that I reinstalled Homebridge with no errors and restored Homebridge from a back up again.This time, all the accessories in the Accessory page of Homebriged started working! As well my Milight Hub pluggin in Homebridge started to working with 100% accuracy again, it had been hit or miss. So in the end I think it something in Homebridge got corrupted. Thankfully the backup restore worked great. I think my problems are finally fixed now!

Thanks you! Mame

On Jun 19, 2023, at 6:49 AM, David Kerr @.***> wrote:

Thanks for the long description. As you replied to the email rather than within Github, it looks like images were dropped.

— Reply to this email directly, view it on GitHub https://github.com/dkerr64/homebridge-yolink/issues/76#issuecomment-1597229045, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4VNJDW4XVWLASDEAYSGQMTXMBKIJANCNFSM6AAAAAAXGHXEBE. You are receiving this because you authored the thread.

mames13 commented 1 year ago

Hello!

Problem solved!

I realized other accessories from other pluggins (such as my Milight led lightbulbs ) were not controllable from within the Homebridge UI Accessories page.

I tried a lot of things including a Homebridge restore from backup but it didn't fix the issue.

I did a full uninstall and reinstall and then backup restore of Homebridge and still had problems.

Tried making a new test Homebridge on a different MacBook Pro and saw that it was all working perfectly.

I rebooted my original Mac (hosting the Homebridge with the problems) in Command + R / Restore mode and restored the Mac OS and the problem was fixed!

In the end, I think the problem involved Mac OS and or Homebridge software (somehow something got corrupted) and not this Yolink Pluggin.

Thank you David for your help!