-
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
Add Support for "Fast On" & "Fast Off" #478
Conversation
Looks good to me, but I don't have Insteon hardware to test on. Can other testers verify this change please? Regards, |
The code is likely fine, although it adds the on/off_fast commands to nearly every device, so we should keep an eye out for obscure devices acting strangely. My concern is that this goes to the issues raised in #438 without really solving them. It would allow a Relay device to appear as "on_fast" even though the Relay device has no ramp rate capabilities on the Load. We are likely to end up back here again, when the next user realizes that a remotelinc can be used as a dimmer controller, but does not itself report anything other than on/off. |
Right now some on_fast/off_fast command are sent in the insteon protocol and misterhouse is changing that to on/off. With my fix at least we get the actual insteon command in misterhouse. I'm not sure I understand everything from the #438 request but it seems about tracking the effect of the command sent on other devices, which sounds like a different issue to me. I suspect that getting the real insteon command should help but I'm not mastering misterhouse so I can't argue on the effect of the change. The only thing I can assess is that it's working fine for me so far. |
Let me try and explain. This commit adds on_fast and off_fast states to nearly every Insteon device, so we are not just talking about the RemoteLinc. However, it does not add the dimming (1-99%) commands to the RemoteLinc. A SwitchLinc Relay (on/off only variety) has a single "state" in MH. But in reality, the device has 2 distinct states, the Light-State and the Switch-State. The Light-State, representing the light controlled by the device, can only ever be ON or OFF. The Switch-State, representing the command most recently received from the device, can be ON, ON_FAST, 1-99%, OFF, or OFF_FAST. Historically, the state in MH has always been strictly tied to the Light-State. #438 discusses various options for how to incorporate the Switch-State. Since the RemoteLinc has no Light-State, the short term solution may be to classify it as a Dimmable_Device, this would add the FAST states and DIM states to the RemoteLinc only. |
This is an alternative solution to hollie#478
I have attached a commit that matches my comments. |
Thanks for the clarification, now I understand much better. |
For some reason your fix doesn't work for me, I'm still getting only on/off. |
Yes is does work for me but I had to copy part of the code from the Dimmable_Device which doesn't seem optimal. |
Howdy, So reading over the patch/code, I get the impression that this just "smerges" the on & on_fast and off & off_fast into on or off state. Is there a way for user code to determine that an "on" was just an on vs an on_fast? i.e. if ($myLight->state_now eq "on_fast") { do something on a double click } Gerry |
I had an alternate implementation that I did ages ago, but it didn't Rather than try to keep refitting it, I have stopped pulling, and I'm So to the powers that be. Please make sure that we can get and process Thanks, On 08/28/2015 04:07 PM, gduprey wrote:
|
@gduprey : I've done this patch exactly to be able to use code as in your example. |
Sorry to keep dragging this on. I'm up for applying the patch, but how do you write code to take advantage of a double tap/on_fast command? Right now, I have ,pl code like if ($mylight->state_now eq 'on'). With Georges patch, would I just use if ($mylight->state_now eq 'on_fast') ? Thanks! Gerry |
I do things like: Konsole output and Konsole output George On 08/30/2015 11:13 AM, Gerry wrote:
|
I looked int he code base and it appeared that there is already some logic for on_fast and off_fast. The above patch seemed to only be to enable that for the RELAY switch linc device too. Is that correct (i.e. all other non-RELAY devices already support on/off_fast?) Sorry -- trying to merge several different issues, threads and messages I'm finding on this topic and all seem slightly different. Gerry |
I finally got it to work as krkeegan suggested. |
Yes Gerry, my goal was to get on_fast on the remotelinc. |
DoumP, so if I read it right, you were able to use this existing FastOn/FastOff code and his patch is not needed anymore? |
My patch referenced above - gac410@8148328 adds *_fast command support to the relay type devices. I think that's different than the remote_link support. I did a pull request ages ago that was rejected, so I just live with my local modifications. |
Marc, I have fixed my patch so it's now clean and simple. |
@DoumP the problem is that your tree is not up to date, maybe it wasn't a checkout of master? |
This conflict is a result of the changes that were created by the perltidy pull request. Please see #566 on how to fix this. Best regards, |
It's not showing conflict anymore, I hope I did that the right way, if not I can just do a new pull request. |
something is off though |
I've created a new pull request #572 |
This has been superseded by a revised pull request. |
Allow the state_now command to recognise fast on and fast off command.