Added support for FanLinc module, model number 2475F. #3139
Conversation
Brian, Thank you for your contribution. By and large looking good, but I need to make a few comments to feel important....
|
Hi Bernd, I'm traveling this week without access to a suitable development machine. I'll knock out your suggestions this weekend. Thanks again! On Sep 8, 2015, at 12:40 PM, Bernd Pfrommer <notifications@github.commailto:notifications@github.com> wrote: Brian, Thank you for your contribution. By and large looking good, but I need to make a few comments to feel important....
Reply to this email directly or view it on GitHubhttps://github.com//pull/3139#issuecomment-138679105. |
Thanks guys for taking over! |
…l feature. Fixed defect in FanLincControlReplyHandler erroneously reporting fan speed. Cleaned up commented code.
Hi Bernd, Now on to 3! 3 messages are received from the FanLinc controller, though I don't think the DefaultDispatcher is invoking a MessageHandler for them (preferably the existing FanLincFanControlReplyHandler). I suspect they key used to lookup the MessageHandler isn't getting set appropriately since these messages are not considered 'MyDirectAck' messages. Since I know little about Insteon communication, I thought it better to ask before marching down the path of adding a new Dispatcher class for FanLinc. Also, my development environment resides on a physically separate machine from the machine running OpenHab. Do you have a recommended approach to debugging live? -- I'm adding log statements, compiling, exporting the plugin to the OpenHab machine, and restarting my (production) OpenHab instance. Tedious! Thanks again for the feedback and direction! Log Data!
I'm thinking we need a method to differentiate the 2nd and 3rd message (perhaps order/iteration), then invoke the existing Fan Linc Message Handler.
|
Adding the log data inline with the comment didn't work very well... Here's a pastebin link: http://pastebin.com/qHMSp1G1 |
Brian,
I assume the first message the hub sent out was cmd1 = 0x11 cmd2 = 0x55. What you are seeing is the reply from the fanlinc, echo'ing the command received (Hub)|messageFlags:0x2F=ACK_OF_DIRECT:3:3|command1:0x11|command2:0x55| Next thing, the Hub queries the dimmer with 0x19/0x00 (see page 1), no idea why The reply is the dimmer on level: Finally, it queries the fanlinc status with 0x19/0x03, and we get back (Hub)|messageFlags:0x25=ACK_OF_DIRECT:1:1|command1:0x19|command2:0x55| Now that is a bit strange, because I would not have expected cmd1=0x19, because per spec it should be cmd1=db_delta, i.e. a random number. Could just happen to be 19, but small chance. Hmm. Long story short: will be a headache supporting simultaneous openhab/hub app coexistence. As it is right now it will sorta work most of the time, and polling will eventually fix the state differences. What messages do you see when you get out of your chair, walk over, and operate the fan switch directly? I'd expect some broadcast messages to come in... |
Ah hah! I see where we missed each other with manually operating the fan: The FanLinc 2475F controller is an in-ceiling unit. There is a physical button on the controller to operate the fan, however it isn't intended for normal use, it's in the ceiling. It also doesn't offer control via an external switch like the Aeotec Z Wave dimmers. http://cache.insteon.com/documentation/2475f-en.pdf For my specific use, I'll be operating the fan based on data from Z Wave motion and temperature sensors via OpenHab automation rules. I personally don't see much value to sorting out simultaneous control from OpenHAB and the Hub app. If someone happens to use the Hub app, OpenHab will sync state on next polling interval. I think we're done :) If you're still interested in the messages sent when the physical button is pressed I'll get them over to you next time I install a unit. Thanks again for your help! I'm glad we've got this working! |
so can you give me a sign when you thing this PR is ready to be merged? Thanks, Thomas E.-E. |
Sorry, I dropped the ball on this. |
great @BrianTillman could you please squash your commits into one. The PR can then be merged soon. |
@teichsta I goofed and merged several other changes in addition to squashing the two commits as you requested. I've reverted the accidental merge, however, it makes this pull request really ugly. Would you prefer that we close this pull request and I open another, or do you know of a clever way to un-goof this pull? I probably should have branched before making my changes. Apologies for the rookie mistake! |
better create a new one (and close this one). And yes it is definitely good practice to create a new branch for each new feature/pr you are going to send … |
@teichsta Thanks! Closing this PR and will open a new one! |
Added support for the Insteon FanLinc module, model number 2475F.
My OpenHAB .items file:
Dimmer ManCave_Light_Overhead "Man Cave Fan Light" (ManCave) {insteonplm="xx.xx.xx:F00.00.1C#lightdimmer"}
Number ManCave_Fan_Overhead "Man Cave Fan" (ManCave) {insteonplm="xx.xx.xx:F00.00.1C#fancontrol,group=2"}
My OpenHAB .sitemap file:
Switch item=ManCave_Fan_Overhead mappings=[1="Off",2="Slow",3="Medium",4="High"]