-
Notifications
You must be signed in to change notification settings - Fork 130
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
Rewrite/Rework of Sync_Links and Delete_Orphan_Links #293
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This may fix issue hollie#176
Fix bad typos in coding. Not sure why I was attempting to dereferrence an object. Don't call engine_version on PLM object
Add subaddress to linkkey in low level PLM aldb functions, has_, add_ and delete_link
Plus cleanup spacing/tabs in routine
…utton/Group Should not be the data3 value from the PLM since data3 on PLM is now the PLM scene number
Conflicts: lib/Insteon/AllLinkDatabase.pm
Backwards compatability is just for testing purposes, will be removed eventually.
No need to have two seperate functions.
Plus set data3 to the proper value And clean up perl warnings
It is a simple function, but this calculation is repeated all over the place. Unifying the calculation ensures that it is always consistent. Plus, if changes need to be made in the future, they can be more easily implemented.
…oller This way we don't need to treat BaseObjects and InterfaceControlle objects differently.
…te_link The distinction in the data3 value between i2CS and everything else only applies to repsonder links. Remove any processing from the low level _write_link routine. All processing of the data should occur higher up than this.
Ready to start testing the outputted results.
Data3 on controller links on the PLM should be set to the group. The old code set this to 0 or the responding device's button. It doesn't appear that this error had any major effect. So rather than replace all of these links, simply ignore the data3 value in the linkkey so that old links will be accepted by sync and delete links. The Data3 value of the responder links on the PLM should always be 00. Therefore no concern that a different data3 value makes a link on the PLM unique.
Control Codes for Manage All Link Database entries do not appear to match reality. Did not alter the code to address this, as it doesn't appear that d1-3 matter on the PLM and thus there is no reason to update a link.
Will add the responder/controller link to the other device even if the other device is deaf or unhealthy.
Conflicts: lib/Insteon/BaseInsteon.pm
I made a few more tweaks today. This seems to be working well. |
This enables the same feature that has been available in the scan_all_links function. If an error occurs while attempting to sync_all_links, MH now recovers from the error, and continues to process the remainin objects in Sync_All. At the conclusion of the Sync_All routine a message is displayed identifying the failed objects. Partial Fix hollie#73
Two more issues closed with this request. This adds and solves a rather annoying problem:
Prior to this, any error in either of these routines would have resulted in a stalled queue requiring a restart. |
This way if device is unreachable, we still continue on with the scan
Conflicts: lib/Insteon/AllLinkDatabase.pm lib/Insteon/BaseInsteon.pm
If active message is not cleared, subsequent messages which are cued by the Retry Failure Callback will continue to call the Callback over and over.
When syncing an object if a device is skipped because the device is out of sync, the object will be reported in the failed objects list at the end of the sync process to help identify potentially out-of-sync devices.
Previously, if a single failure occured in a sync_queue, the whole queue was abandoned. This attempts to resume where the queue left off.
If a device is skipped because it was out of sync, it will now appear in the final summary listing the devices for which delete orphans failed.
Condense list of failed devices into a single line in the print log.
krkeegan
added a commit
that referenced
this pull request
Nov 15, 2013
Rewrite/Rework of Sync_Links and Delete_Orphan_Links
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes issues #262, #272, #176, #82, and #73.
The current code is completely stable. In my initial testing the links added and deleted by the respective routines appears to be accurate. But more elaborate testing will be needed to confirm.
One caveat, many of the links involving non_root devices will be recreated by running sync_links and delete_orphans (this is kind of the goal of the whole thing). But as a result, you probably don't want to switch back and forth between master and this.