-
Notifications
You must be signed in to change notification settings - Fork 44
0.9 #90
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
Merged
Merged
0.9 #90
Conversation
This file contains hidden or 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
Modified the event callback mechanism to support callbacks with a message argument. This is a breaking change to the event callback signature. The benefit of providing the full message to the event callback is that it's no longer necessary to poll all node sensors when a single sensor value changes or when a node event, like a battery level update, occurs. The Message class was also modified to include a reference to the gateway so the handler can use that information for comparing gateway-specific constants (message types, etc.).
Event callback extensions
* Add discover * REMOVED FEATURE: Remove debug attribute on Gateway. Let log level setting control logging. * Remove references to gateway attribute debug. * Add check of internal message I_GATEWAT_READY. When this is received, broadcast I_DISCOVER internal message. * Add check of internal message I_DISCOVER_RESPONSE. Check if sensor exists, which will in turn send presentation request if sensor is missing. * Clean up pylint disable codes. * Refactor _handle_internal to avoid too many branches. * Add dictionary to lookup actions to take in _handle_internal method. * Add property and setter for batter_level to set value as integer. * Update JSON persistence to cater for changed attribute name for battery level. * Add and update tests.
* tcp_check to reconnect in case of connection lost tcp_check is trying to send an internal message every 10 seconds to test the connection even if there is no activity. * main set back to the original * mysensors updated with the tcp_check * main.py modified to match the original version * Spaces added on the comments to align with the original version * Code updated to fix the errors detected by the Travis code checker. * More changes to fix the Travis code checker * Another change to fix the Travis code checker * Another change to fix the Travis code checker * _check_connection method created and called from run loop. The timer is inside the _check_connection method. * check socket status before shutdown * check socket status before shutdown from gtortone (with some modifications to pass the David check) * check socket status before shutdown (from gtortone) * Added the I_VERSION receivig timeout at 2*reconnect_timeout * _handle_internal moved to the parent called with super() * Added "return" in the super() call
* Return local time instead of UTC time from Controller * Fix mock of localtime return value
* Import gateways into mysensors module for backwards compatibility.
* Also enable travis pip cache.
* Use modify to change a message attribute and return the same message instance. * Ensure value_type is correct type when setting.
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.
BREAKING CHANGES
were a fixed string 'sensor_update' and an integer for node id, from the node
that was updated. Now only the message instance is passed as a single
argument. The message instance has the following attributes:
level.
controller, with an internal message. This change is done in accordance to
the official MySensors API.
All changes