tonesto7 / homebridge-smartthings

SmartThings Homebridge Plugin
384 stars 768 forks source link

Devices revert to default room #158

Closed mick-shaw closed 4 years ago

mick-shaw commented 7 years ago

Since I've upgraded from 5.1 it seems my devices continuously revert back to the default room. I haven't any details to share as of yet, but wanted to see if this is simply a config parameter I may have overlooked since I don't see this being reported as of yet.

pdlove commented 7 years ago

I've had this report on another plugin I've been working with, but I recently made massive changes to that one and assumed that was the issue. I made very minor changes to this plugin in the HomeKit interface so this may be a homebridge issue. I'll file all of my devices into rooms and see if I lose it. Is it all devices reverting back or just some of them? How often does it appear to happen? Is it happening only after homebridge reboots?

brendanjerwin commented 7 years ago

I ran into this as well. (I think.) I had a few "orphan" devices which were in the default room, did nothing, shared the same name with the real devices, and could not be deleted. The error I got when trying to delete them was something along the lines of "can't delete items not associated with a bridge".

It happened after I added a new device to ST, exposed it to HomeKit, and restarted homebridge. I ended up deleting my home in HomeKit and rebuilding it to get rid of them.

It seemed to me to be some sort of corruption of the item in the HomeKit database...

I have a number of other devices to add over the next few weeks. Anything I should look at if it happens again?

brendanjerwin commented 7 years ago

I added some more devices last night and this problem didn't happen. So that's good. I'll keep an eye out for it. Are there any tools out there that can give a deeper view into my HomeKit database for when it happens again?

pdlove commented 7 years ago

Is anyone still experiencing this? If so, I want to see if I can get a copy of your accessories folder. The Samsung UUID for the devices should be unique per device and never changing, but maybe it is.

JDogg016 commented 7 years ago

Good Morning,

This happens to me where my devices revert back to their default room. It happens after a reboot but only after homebridge has been offline for a substantial period of time (ie. a power outage).

I need to update HB to see whether I am on the latest version or not, but I will be more than happy to provide what you would need to see to correct this issue going forward.

JDogg016 commented 7 years ago

For some odd reason, the rooms reset last night.

I performed an update this morning and moved the devices to the correct room. I will update on whether the devices eventually default back to the default room

pdlove commented 7 years ago

Thank you. I'll get the plugin updated to the version 2 API. I think that Homebridge is freaking out and re-assigning the Accessory IDs. I haven't seen this problem on my install with only the smartthings plugin running.

JDogg016 commented 7 years ago

Would you like anything (ie. my config.json) to help you diagnose the issue further?

AndrewVIsh commented 7 years ago

Any way linking ewelink to homebridge?

JDogg016 commented 7 years ago

Morning. So it seems the cause (non-technical) occurs whenever I add/remove the device from JSON and restart homebridge. Just as an FYI.

JDogg016 commented 6 years ago

I think when the problem described by @jawn101 on the ST message board occurs, this (in conjunction with a restart of homebridge) causes the ST devices to reset in HomeKit to the default room and default name.

So, if you add a device using the JSON API an error message gets thrown. If you then restart homebridge all the devices reset.

pdlove commented 6 years ago

@JDogg016 Can you give a link to the post on the ST message board?

JDogg016 commented 6 years ago

https://community.smartthings.com/t/hello-home-homekit-and-siri-control-via-homebridge/16701/573

Justin Bennett, Esq.

Personal E-Mail Account. Although this was sent from my personal e-mail this communication may contain privileged or other confidential information. If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information contained herein. Also, please notify sender that you have received this communication in error, and delete the copy thereof you have received. Thank you.

On Oct 10, 2017, 4:54 PM -0400, pdlove notifications@github.com, wrote:

@JDogg016 Can you give a link to the post on the ST message board? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

JDogg016 commented 6 years ago

Any update on this?

cnnn commented 6 years ago

Having the same issue here. https://github.com/nfarina/homebridge/issues/874#issuecomment-272702806 suggest this issue might happen on plugins that

JDogg016 commented 6 years ago

Has there been any further development on this? It seems all other HomeKit devices not run through the ST plug-in work fine and are very responsive. In addition, devices always report back as unresponsive and are very slow to load. I am hoping someone knows of a fix.

davispw commented 6 years ago

I have two Raspberry Pis running homebridge-smartthings with different subsets of my devices. One of them always resets devices to the default room every time the RasPi was rebooted, but not the other; the main difference between the two is that the one which resets is on WiFi, while the one which works OK is wired.

It seems I've worked around the issue (fingers crossed!) by adding ExecStartPre=/bin/sleep 30 to the [Service] section in my /etc/systemd/system/homebridge.service file -- an Avahi/Bonjour or WiFi timing issue?

FWIW homebridge devices also become unresponsive whenever I reboot my WiFi router (Avahi issue?).

Looking forward to any word towards a permanent fix.

JDogg016 commented 6 years ago

I like the prior post, but my home bridge-smartthings setup is a wired connection and this happens.

From my experience rebooting the RPI doesn't necessarily remove the room config BUT adding/removing a device in the smartthing app will most certainly cause the rooms to reset.

cnnn commented 6 years ago

I have the same issue. It seems to happen very time the bridge device disconnect from network either from rebooting or power loss.

sesykes71 commented 6 years ago

I am having the same issue. Using a Raspberry Pi as the homebridge which talks to a Pi running Homeseer.

cnnn commented 6 years ago

I'm getting more frequent reset now. In accessories/cachedAccessories, I don't see smartthings in there.

pdlove commented 6 years ago

homebridge-smartthings hasn't been upgraded to use the version 2 API which is why it doesn't have cachedAccessories. I think that's part of the problem with this item. I also learned a few days ago that homebridge is using the name even though I'm submitting a UUID to use for the id. I'm correcting that in my test version right now.