-
Notifications
You must be signed in to change notification settings - Fork 44
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
PR 235 Rebased off of Dev #252
Closed
Closed
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
Significant improvements to the IOLinc: - Tracks the state of both the sensor and the relay. - Changes the MQTT Payload to contain the sensor and relay states by default. - Enables the writing of flags to the device. This design matches how it is defined in the Insteon Documentation and also matches how the Insteon App handles this. The old code did not set any flags for me. I would be surprised if it worked on any device. - Tracks the flags in persistent storage. This enables things like momentary changes and linked to relay to be enabled by future work.
Relatively simple design. Does not guarantee accuracy. Only that the call will not be made prior to the scheduled time.
Turns off the relay after momentary_secs if momentary mode is enabled. There is a slight delay, as the TimedCall feature is not a true asynch system, but it is very close and I think within reasonable expectations. Only turns on the relay if the proper Momentary conditions are met. Turn on relay if relay_linked is set and sensor is activated. I believe this completes the modeling of the IOLinc in software. With the exception of the "Set Button" all interactions accurately track the IOLinc.
I don't think hijacking the simulated scene call and translating it into a modem scene was a good idea. - It required creating a scene that would get picked up by import_scenes and could confuse users. - It was unnecessary for many use cases. - It still didn't properly reflect all use cases as it didn't allow the user to specify the on_level for D1 and so therefore Momentary_A and Momemtary_C uses may not have been correct. I think it is better to redirect users to create a proper scene for their device and to provide them with the documentation on how to do that.
I have really never done unit tests before this project. I am starting to get a better idea of the tools available. I believe these are more thorough and less duplicate code than my prior work. However, still never sure if I am "fully" testing the appropriate aspects.
If a label can be found for a device in the entry use it, otherwise will default to just the addr. Fix the group spacing on Modem Entries to be consistent. Add coverage tests for Entry label
Everything should send through Device.Send for two reasons: 1.In order to properly calculate outgoing hop counts. (This change may fix some latent errors we had not noticed.) 2. In order to enable caching outgoing messages for battery devices Add a send() function to the Modem device for consistencey with devices.
This was a proposed function for use by the Scene Sync feature, we ended up using a different function.
No need to pass protocol or device as the database object already has the device object
This way device can properly set hop counts and the device can queue messages for battery devices.
Queue messages to battery devices. Start sending them when the device sends a broadcast. Add a search function to protocol so that we only try and send one message at a time to the battery devices.
Need to check response is an ACK or NAK otherwise the handler may unintentionnaly handle a broadcast command with bad results.
Queue for when the device is awake, which is assume to be right after it sends a message.
This is necessary to enable the awake functionality. Generally just required minor changes the handle_broadcast to accomidate this.
Adds a signal to Protocol that emits on a write_msg Msg.FINISHED after the message has been removed from the _write_queue Battery device listens to Msg_Finished signal and dequeues a msg from _send_queue if necessary. This is cleaner than injecting into the on_done and actually works. The on_done method doesn't work correctly with handlers and sequences that do not call on_done until a series of messages have been transmitted.
This is weird this has been working fine, and certainly passed the tests previously.
IOLinc Improvements
Add a Queuing System for Messages Sent to Battery Devices
Increment Database Delta on Writing
Add support for EZIO4O
History Update for EZIO4O
Print Device Names When Printing a Device's Database
Check the Remote Battery Periodically and Report to Low Battery Topic
The keypad and dimmer support a default ramp rate to be set.
Co-authored-by: tstabrawa <59430211+tstabrawa@users.noreply.github.com>
Co-authored-by: tstabrawa <59430211+tstabrawa@users.noreply.github.com>
Co-authored-by: tstabrawa <59430211+tstabrawa@users.noreply.github.com>
The rate is now passed in as float in seconds ranging from 0.1 to 540
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.
Fixing a PR based off of master.
#235