iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
395 stars 165 forks source link

Update to 3.1.0 removed every device from Apple Home #448

Open justdun opened 7 months ago

justdun commented 7 months ago

Thanks for all the work in updating the plugin, however, I just updated to release version 3.1.0 from 2.0.1 and it removed every Tuya device from my Apple Home, and subsequently created all new devices. This broke every re-naming, goruping and automation in my Apple Home.

I attempted to restore from a Homebridge backup that I took immediately before the update, and I am still left with all new devices and no functioning automations.

I checked the change log, discussions and issues section before doing the update, and did not see any mention of this issue.

I appreciate all the work that has been done to update the plugin, but can we please do some testing before releasing production updates, and include any warnings in the change log.

I now have several days of re-configuring my lighting, fans and powerpoints and related automations ahead of me.

05TEVE commented 7 months ago

Hi @justdun. Apologies for any inconvenience caused. On the setup i tested the changes with I did not encounter this issue. There was a similar concern raised in https://github.com/iRayanKhan/homebridge-tuya/issues/445, though upon a re-install the devices did re-appear after a few minutes. I can however only test with the devices that I have on hand and work with feedback raised on the beta versions.

Unfortunately, once the devices have been unregistered from Apple Home, the only way forward is to reconfigure them. I will be looking to ensure that this sort of thing does not happen again in future updates as it is rather inconvenient.

Between this version and the previous live release there has been a large number of changes with the master branch which i based the 3.1.0 version on. Many of the recent issues raised come from changes introduced in the merged PRs that never made a live release. I am working with others to try get these resolved, but I need the help with making changes and testing devices i don't physically have.

gonzaechev commented 6 months ago

I just updated to release version 3.1.0 and I had the same behavior you describe @justdun . I had to redo many automations and change names for more than 90 of my devices

chrisjshull commented 6 months ago

per semver, what's the actual expected breaking change expected in v2->v3? The release notes aren't clear what's expected to break

05TEVE commented 6 months ago

Hi @chrisjshull, the reasoning for incrementing a major version was due to the number of changes added since the last release 2.0.1. In this case, main had many changes ahead of the release without any evidence of testing on those.

I incremented the version to 3.1.0 to start clear of any previous beta releases of the plugins. As for the behaviour that we are seeing here. I have seen reports of it, but i am unable to replicate them on my end with the upgrades. The change for 3.1.0 is actually a much easier upgrade than the originally planned "2.1.0" that would changed the name of the plugin internally and would definitely have required repairing of devices in HomeKit.

For the 3.1.1 release (currently in beta) I am looking for testers to help ensure these sorts of issues are found early.