Open jarfgames opened 5 years ago
Hi,
Same problem here with Homebridge on a synology NAS. to workaround this, I edit the cachedAccessories manually, and then no problem at all after each restart.
[2018-12-1 11:44:31] [NicotpLink] Configuring cached accessory: [Chauffage sdb] 8006A2E02833EB7068EE21D65418829E17A877A2 3de8c4e7-20a6-4d5d-88de-27a1aeadfc93 [2018-12-1 11:44:31] [NicotpLink] Configuring cached accessory: [Chauffage douche] 8006AA75CAD0D0EB4656CA53D68883BA17A85182 2959c9a2-e0b8-4b07-be50-8673b2559f4e [2018-12-1 11:44:31] [NicotpLink] Configuring cached accessory: [TP-LINK_Smart Plug_8628] undefined d0b72f6b-71b1-431f-bcf6-c4b32576c0f6
[2018-12-1 11:44:32] [NicotpLink] New Device Online: [Chauffage douche] plug [8006AA75CAD0D0EB4656CA53D68883BA17A85182] 192.168.1.94 9999 [2018-12-1 11:44:32] [NicotpLink] Adding: [Chauffage douche] plug [8006AA75CAD0D0EB4656CA53D68883BA17A85182] [2018-12-1 11:44:32] [NicotpLink] New Device Online: [Chauffage sdb] plug [8006A2E02833EB7068EE21D65418829E17A877A2] 192.168.1.49 9999 [2018-12-1 11:44:32] [NicotpLink] Adding: [Chauffage sdb] plug [8006A2E02833EB7068EE21D65418829E17A877A2] [2018-12-1 11:44:32] [NicotpLink] New Device Online: [Prise volante] plug [8006182F821C0D2BFEEB8530056B92B91A8C0091] 192.168.1.53 9999 [2018-12-1 11:44:32] [NicotpLink] Adding: [Prise volante] plug [8006182F821C0D2BFEEB8530056B92B91A8C0091] HAP Warning: Characteristic 00000053-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000003E-0000-1000-8000-0026BB765291. Adding anyway.
I checked with the current sources in debug, and cannot reproduce the problem . I noticed that npm package is not up to date with current sources, @plasticrake maybe you could do an updated release ?
Thanks - I wish I was more technical. When you say to edit the cached accessories manually, how do I go about that and what exactly do I edit / manually add? Sorry for the lack of technical knowledge. I appreciate your help.
@nicoduj The backend api version has been updated in this package now. However I don't think that will make a difference here.
@jarfgames / @nicoduj in both your output I see undefined
where the deviceId is. I imagine that is the root cause. I think I may have seen this behavior before, and it may be a homebridge bug, but I'm not sure. I do recommend removing the accesssories and persist folder so the cached data can be rebuilt correctly. See the bottom of the README. You may also need to remove and re-pair homebridge to your homekit
[2018-11-14 20:59:57] [TplinkSmarthome] Configuring cached accessory: [Gar Light] undefined 438c31c1-ccf2-4a5c-b2af-17212653858e
[2018-12-1 11:44:31] [NicotpLink] Configuring cached accessory: [TP-LINK_Smart Plug_8628] undefined d0b72f6b-71b1-431f-bcf6-c4b32576c0f6
Hi all,
@plasticrake I updated the plugin, since my cached file is ok now I can't be sure it solves the issue.
@jarfgames you have to manually edit the file "cachedAccessories" which is in accessories folder in your homebridge directory.
In my case, a whole section was missing for the last device. I checked the UUID that was logged on homebridge startup, and created a new section in the json file based on the last one which was correct..
If you want, you can send me your cachedAccessories file with the log of your homebridge starting and I will try to take a look at it .
I also checked by deleting my cachedAccessories files and restarting twice homebridge : the file was created successfully ansd I don't have the undefined log I had with the older version of the plugin. @jarfgames let us know if it is ok for you !
Hello all and thanks for the help.
I have tried the following but it has not seemed to correct the issue:
1) For good measure, did a sudo apt-get update and upgrade 2) Ran npm update -g homebridge-tplink-smarthome 3) Rebooted my Pi... Confirmed the issue was still occurring 4) Ran rm -rf ~/.homebridge/accessories 5) Rebooted my Pi... Confirmed the issue was still occurring 6) Ran rm -rf ~/.homebridge/accessories and rm -rf ~/.homebridge/persist 7) On my iPad, removed the Homebridge accessory 8) Rebooted my Pi and re-added the Homebridge 9) Restarted the Pi again... Confirmed the issue was still occurring
Of note, it seemed to me that after running step 6 and restarting the Homebridge application, on the first boot up of the application I was not seeing the message:
[TplinkSmarthome] Adding: [Gar Light] plug [8006765914316EC753E39C9F45AB4A4619BC6563] HAP Warning: Characteristic 00000053-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 0000003E-0000-1000-8000-0026BB765291. Adding anyway.
However, on subsequent reboots the above message was re-appearing and my Gar Light was "re-added" as a new accessory in HomeKit.
I copied the cachedAccessories file to my Mac and opened it in TextEdit... Here is what I believe to be the section related to the light that is causing the issue (it's the last one in the file, not coincidentally I presume):
{"plugin":"homebridge-tplink-smarthome","platform":"TplinkSmarthome","displayName":"Gar Light","UUID":"438c31c1-ccf2-4a5c-b2af-17212653858e","category":8,"context":{},"services":[{"UUID":"0000003E-0000-1000-8000-0026BB765291","characteristics":[{"displayName":"Identify","UUID":"00000014-0000-1000-8000-0026BB765291","props":{"format":"bool","unit":null,"minValue":null,"maxValue":null,"minStep":null,"perms":["pw"]},"value":false,"eventOnlyCharacteristic":false},{"displayName":"Manufacturer","UUID":"00000020-0000-1000-8000-0026BB765291","props":{"format":"string","unit":null,"minValue":null,"maxValue":null,"minStep":null,"perms":["pr"]},"value":"Default-Manufacturer","eventOnlyCharacteristic":false},{"displayName":"Model","UUID":"00000021-0000-1000-8000-0026BB765291","props":{"format":"string","unit":null,"minValue":null,"maxValue":null,"minStep":null,"perms":["pr"]},"value":"Default-Model","eventOnlyCharacteristic":false},{"displayName":"Name","UUID":"00000023-0000-1000-8000-0026BB765291","props":{"format":"string","unit":null,"minValue":null,"maxValue":null,"minStep":null,"perms":["pr"]},"value":"Gar Light","eventOnlyCharacteristic":false},{"displayName":"Serial Number","UUID":"00000030-0000-1000-8000-0026BB765291","props":{"format":"string","unit":null,"minValue":null,"maxValue":null,"minStep":null,"perms":["pr"]},"value":"Default-SerialNumber","eventOnlyCharacteristic":false},{"displayName":"Firmware Revision","UUID":"00000052-0000-1000-8000-0026BB765291","props":{"format":"string","unit":null,"minValue":null,"maxValue":null,"minStep":null,"perms":["pr"]},"value":"","eventOnlyCharacteristic":false}]}]}]
I will look more closely tomorrow, but at a glance it appears to be missing some data that the other sections for other accessories have. I am assuming that is the issue. If that is correct, can I simply edit this file on my Mac in TextEdit and then copy it back to the Pi? Or do I need to use different text editing software to not corrupt the file?
Thanks again!
I did exactly that, by replacing this section with the one of a device that worked (the one before), and then replaced the name and UUID of the device .
I used VS code to do that, and put it back on my synology (I use a homebridge docker on my synology)
I did exactly that, by replacing this section with the one of a device that worked (the one before), and then replaced the name and UUID of the device .
I used VS code to do that, and put it back on my synology (I use a homebridge docker on my synology)
Just playing around right now. I am able to find the necessary data with one exception: the "deviceID" of the Gar Light. Any idea how to find the DeviceID for that specific switch?
EDIT: I tried using a fake/made up DeviceID and then pasted in everything else properly. After restarting my Raspberry Pi, it appears to be working. I was able to test that the Gar Light was now showing up in HomeKit properly (i.e. - not re-added as new) and the Scenes/Automations in HomeKit attached to Gar Light were still intact. I tried rebooting the Raspberry Pi again and it still appears to be working. I will report back if it stops working but as of right now, this appears to be a good temporary solution/workaround proposed by @nicoduj .
The only real issue with this is that if I add another TP Link switch to my home, I assume it will give me the same issue and I will have to implement the workaround for it (unless someone can confirm otherwise). Assuming this is true and what we've got here is just a workaround, should I leave this issue Open for further investigation/resolution?
Thanks again!!!
Hi, I will check tomorrow but the device id is the uuid listed when you start your homebridge . In your case it is this one I think : UUID":"438c31c1-ccf2-4a5c-b2af-17212653858e"
Hey everyone,
Any updates on this issue or suggestions for a workaround for the less technically-inclined users?
Thank you!
@GeorgeeNico See the bottom of the README
I'm having the exact same issue. Have tried the step in README and it doesn't work.
One of my two switches goes back to default (outlet, icon and name) every time my homebridge restarts.
Expected Behavior
When I restart my Raspberry Pi (and thus restart the Homebridge application), all previously added HS200, HS210 and HS105 units should still be in HomeKit with all automations/scenes intact.
Current Behavior
When I restart my Raspberry Pi (and thus restart the Homebridge application), all of my many TP Link switches appear properly in HomeKit except for the last switch that I installed in my house (an HS200 - named "Gar Light" below). The most recently installed switch essentially re-adds itself to HomeKit like it was never there and any Scenes or Automations related to that switch are removed (all other HS200, HS210 and HS105 units remain set up with automations/scenes intact). The strange thing is before I added the latest HS200 to my collection of TP Link units, the most recently added one was an HS105 which exhibited the same behaviour. Now, the most newly added HS200 causes the problem but the HS105 which previously removed/re-added itself upon each reset is fine.
I apologize in advance if I am missing something - I am a somewhat novice Homebridge user!!
Steps to Reproduce (for bugs)
Restart Raspberry Pi/HomeBridge
Versions
Configuration
Homebridge Log / Command Output