-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[insteon] Rewrite with backward compatibility #17146
Conversation
41db1f9
to
f096ded
Compare
I thought you would wait for me to comment on the other PR, but youre going fast. I'll try to look at this and the other PR (might close that one) next week. |
56505e5
to
70b99f3
Compare
As I mentioned in the other PR, I wanted to make sure that the binding would be maintainable by having the legacy classes use the updated folder structure with minimal redundancy. Anyway, I think the way I structured this PR might be easier to review. |
7dfc222
to
c45173e
Compare
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/insteon-binding-beta-4-1-0-5-0-0/154128/1 |
Spend some time looking at this PR. Pretty impressed by the documentation. On a high level i think this is the way forward. There also seem to be changed in the legacy part that i can't directly link as essential to integrating. They also don;t seem wrong, but with a large rewrite as this regressions are expected. |
I did test the legacy code with my own setup without any issue. There are no change in behavior for existing users. As far as the new changes, I have been solely using my implementation for couple years now to test and fix any issues.
Yes, it is available in the marketplace as beta version.
I have had several test results for the new changes from others over the previous PR comments and community forum posts. I have reached out to several of them asking for feedback and if possible to test the backward compatibility support. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/insteon-binding-beta-4-1-0-5-0-0/154128/8 |
Can you try not to force push as then it is hard to review / track changes. |
@lsiepel I did some refactoring around the transport message code improving the separation between a |
Let us first finish this PR before we do further refactoring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not covered everything yet (114 / 157 files), but made some progress revieweing this PR and don't want to hold it back.
bundles/org.openhab.binding.insteon/src/main/resources/OH-INF/thing/legacy-thing-types.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.insteon/src/main/resources/OH-INF/thing/legacy-thing-types.xml
Show resolved
Hide resolved
...nsteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java
Outdated
Show resolved
Hide resolved
...nsteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/CommandHandler.java
Outdated
Show resolved
Hide resolved
...on/src/main/java/org/openhab/binding/insteon/internal/discovery/InsteonDiscoveryService.java
Outdated
Show resolved
Hide resolved
...on/src/main/java/org/openhab/binding/insteon/internal/discovery/InsteonDiscoveryService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/openhab/binding/insteon/internal/discovery/InsteonLegacyDiscoveryService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jsetton <[email protected]>
* introduced device configuration automated determination * converted mode-based number items to string type with descriptive states * added number items uom support * added scenes and x10 device things * added distinct bridge things for supported hub/plm devices * added button event trigger channels * added device products configuration layer * added device link database support * added device cache storage * added device operating flags controls * added modem configuration flags controls * added related devices synchronization feature * added heartbeat timeout monitor * added ability to link/unlink a device to the modem * added ability to add missing default links * added link database & scene management support * added scene state support * added new i3 devices basic support * added ezrain sprinkler device support * revamped console commands with auto-completion support * improved discovery service * improved thing status Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
Sorry again about the force push, I had to rebase my changes to clear another upstream merge conflict. All the changes I made related to your code review starts from 2f25a14. |
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the remaining files and looked back at the previous round. That was a lot to digest. Initialy my intention was to have a less integrated binding with old/new behaviour to prevent regression and make review easier. Hopefully i have not missed anything. Once these comments are finished, i strongly advice to get some more users to test this binding with the workflow of 1. use it 'as is' for one week, 2. migrate and 3. use it for another week with the new thing types.
Unfortunately it won't be in todays milestone release, but hopefully in the next to get some more test milage before the stable release around christmas.
...on/src/main/java/org/openhab/binding/insteon/internal/device/feature/BaseFeatureHandler.java
Outdated
Show resolved
Hide resolved
....insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/HandlerEntry.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/openhab/binding/insteon/internal/device/feature/LegacyFeatureTemplate.java
Outdated
Show resolved
Hide resolved
...binding.insteon/src/main/java/org/openhab/binding/insteon/internal/InsteonLegacyBinding.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/org/openhab/binding/insteon/internal/handler/InsteonLegacyDeviceHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: jsetton <[email protected]>
Signed-off-by: jsetton <[email protected]>
I had one user test both already. Another one has been focused on first testing new thing on the side and am working with him to test the migration portion. |
Signed-off-by: jsetton <[email protected]>
Thanks for your patience and the work you put in this PR. While it is more integrated then I initially aimed for, it seems pretty clean and a lot has been done to prevent regressions. |
* [insteon] Restructure legacy code for rewrite Signed-off-by: jsetton <[email protected]>
* [insteon] Restructure legacy code for rewrite Signed-off-by: jsetton <[email protected]>
This is a rewrite of the Insteon binding adding some much needed improvements while keeping some of its core code refactored. Apart from simplifying the user experience by retrieving all the configuration directly from the device when possible, and improving the way the Insteon things are configured in MainUI, here is an exhaustive list of the changes:
Since the configuration process was revamp, this would require existing users of the binding to reconfigure their Insteon setup.
However, backward compatibility is provided as some of the legacy code was kept with some adaptation to interface with updated core components. Existing
device
legacy things connected to anetwork
legacy bridge will be migrated to thelegacy-device
thing type while still keeping the same ids to prevent any breakage.