Jump to content

KPL sync w/o scenes


drich

Recommended Posts

Posted (edited)

I have started doing some of my automation via. Home Assistant (mostly to integrate with HomeKit), and have run into an issue with KPL buttons being out of sync. The problem is primarily with ceiling fans, as in order to get proper support in HA I need to talk directly to the FanLinc, not the scene that contains the KPL buttons and the four FanLinc states.

I was hoping I could just create a program that syncs the button states when the state changes, but I haven't been able to figure out the magic incantation to get that working. Is it not possible to update button states on a KPL (set as the scene controller)?

Here's an example of what I am trying. "Fans / Piano Room Fan" is the FanLinc, "KPL / Piano Room Switch" is the KPL. I have buttons for low, med, and high configured in scenes.

Sync KPL - Fan Low Piano Room - [ID 009D][Parent 0001]

If
        'Fans / Piano Room Fan' Status is Low
 
Then
        In 'KPL / Piano Room Switch / Piano Room Switch Low' Set 'KPL / Piano Room Switch / Piano Room Switch Low' To On
 
Else
        In 'KPL / Piano Room Switch / Piano Room Switch Low' Set 'KPL / Piano Room Switch / Piano Room Switch Low' To Off
 

Anyone have any tips for this other than "don't use KPLs and FanLincs"? :-) (which honestly, is starting to seem like the best choice given the lighting issues I'm having with LED flickering and the FanLinc - I'm waiting to see if the Inovelli fan controller will pair with the ISY and/or work reliably).

Edited by drich
Posted
43 minutes ago, drich said:

I have started doing some of my automation via. Home Assistant (mostly to integrate with HomeKit), and have run into an issue with KPL buttons being out of sync. The problem is primarily with ceiling fans, as in order to get proper support in HA I need to talk directly to the FanLinc, not the scene that contains the KPL buttons and the four FanLinc states.

I was hoping I could just create a program that syncs the button states when the state changes, but I haven't been able to figure out the magic incantation to get that working. Is it not possible to update button states on a KPL (set as the scene controller)?

Here's an example of what I am trying. "Fans / Piano Room Fan" is the FanLinc, "KPL / Piano Room Switch" is the KPL. I have buttons for low, med, and high configured in scenes.


Sync KPL - Fan Low Piano Room - [ID 009D][Parent 0001]

If
        'Fans / Piano Room Fan' Status is Low
 
Then
        In 'KPL / Piano Room Switch / Piano Room Switch Low' Set 'KPL / Piano Room Switch / Piano Room Switch Low' To On
 
Else
        In 'KPL / Piano Room Switch / Piano Room Switch Low' Set 'KPL / Piano Room Switch / Piano Room Switch Low' To Off
 

Anyone have any tips for this other than "don't use KPLs and FanLincs"? :-) (which honestly, is starting to seem like the best choice given the lighting issues I'm having with LED flickering and the FanLinc - I'm waiting to see if the Inovelli fan controller will pair with the ISY and/or work reliably).

I only use the Isy so ai can't speak on integrating the 2 together for your program to work. However, I would recommend using a kpl and fanlinc together (I use them myself) but they are linked and controlled directly by the scene itself. 

You didn't say what specific problems you were having with syncing. One thing I would check would be to ensure the isy itself is receiving the information from HA and is updating itself with the proper status. 

If the statuses are being updated properly then the programming portion would be easy. The main thing that jumps out at me is that there is nothing to trigger your "or else" statement. 

If status of fanlinc is low

And status of fanlinc low is not off

Then set kpl on

Or else turn kpl off

Posted
7 minutes ago, lilyoyo1 said:

I only use the Isy so ai can't speak on integrating the 2 together for your program to work. However, I would recommend using a kpl and fanlinc together (I use them myself) but they are linked and controlled directly by the scene itself. 

You didn't say what specific problems you were having with syncing. One thing I would check would be to ensure the isy itself is receiving the information from HA and is updating itself with the proper status. 

If the statuses are being updated properly then the programming portion would be easy. The main thing that jumps out at me is that there is nothing to trigger your "or else" statement. 

If status of fanlinc is low

And status of fanlinc low is not off

Then set kpl on

Or else turn kpl off

Actually I mentioned that in the first paragraph. If I want to use the fan with proper fan control from Home Assistant, I have to use the FanLinc device directly, not the scene. Therefore I need to control the KPL buttons manually. If I try and update date the scene from the program I can end up in  a race condition where the fan is toggled on and off if someone turns the fan on and then off again from HA.

For a status command you don't need the "is not off" check you use above. The state check will trigger when the FanLinc becomes low or when it goes to some other state. That part is working fine. It's the setting of the KPL status that doesn't work. I have a feeling this is a limitation in Insteon and the only option is to trigger the scene -- which runs the risk I mentioned already.

Posted

The closest thing I have found is four separate programs that turn on/off the four scenes instead of the buttons. If I avoid doing anything in the else clause, it looks like I can avoid the race condition. If there isn't a way to deal with the individual buttons on the keypads, I may be stuck with this.

Sync KPL - Fan Off Piano Room - [ID 00A0][Parent 0001]

If
        'Fans / Piano Room Fan' Status is Off
 
Then
        Set 'Fans / Piano Room Fan Low' Off
        Set 'Fans / Piano Room Fan Med' Off
        Set 'Fans / Piano Room Fan High' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

Sync KPL - Fan Low Piano Room - [ID 009D][Parent 0001]

If
        'Fans / Piano Room Fan' Status is Low
 
Then
        Set 'Fans / Piano Room Fan Low' On
 
Else
   - No Actions - (To add one, press 'Action')
 

and so on - for all four states on each fan and all six fans in the house. 

Posted

In order to update a button state on a KPL, place the button as a responder in a scene.

Then turn the scene on/off in a program (based on the fan state).

Use 4 programs similar to this:

Office Fan High - [ID 0111][Parent 0085]

If
        'Office / Office Fan-Motor' Status is High
 
Then
        Set 'Office / Office Fan High LED' On  <-- scene containing button
 
Else
        Set 'Office / Office Fan High LED' Off
 

 

Posted
Just now, gzahar said:

In order to update a button state on a KPL, place the button as a responder in a scene.

Then turn the scene on/off in a program (based on the fan state).

Use 4 programs similar to this:

Office Fan High - [ID 0111][Parent 0085]

If
        'Office / Office Fan-Motor' Status is High
 
Then
        Set 'Office / Office Fan High LED' On  <-- scene containing button
 
Else
        Set 'Office / Office Fan High LED' Off
 

 

That's what I said I was doing above. I'm looking to see if there is a better or other way. That requires four separate programs for every fan and runs the risk of a race condition that causes the fan motor to cycle on and off if I have the else condition set on anything other than the "Off" rule.

Posted

Just to be clear, I am only referencing scenes that control the button light on the keypad.  (and the next command sent by that button if it is in toggle mode)

It is not a scene that includes the fan motor or any other button / device and will not change the state of the fan.  I have separate scenes for that.

This should not create any race conditions, but yes it is 4 programs x # of fans that you have to write once.

Posted

Do not put the "off" in the else.  You might be causing a race condition in the ISY and messages clobbering each other.

Have just 4 scenes (each with fan and all buttons set appropriately), and 4 programs, each with an "IF" and "Then" (no "Else").

I described my setup here, and it works well for me using Alexa.

Posted (edited)

After re-reading PurdueGuy's method, I agree that would be as good or better of a solution if you already have the complete scenes with the fan control setup.

The OP stated he could not control the fans from an external system via scenes.  (I don't use HA, so I will go on his word here)

He wanted to have the button status follow the fan status (when adjusted externally).

What I am suggesting would operate in addition to the setup you have.

The programs I suggested do that, and I can't see how this creates a race condition (but I could be missing something).

I do see where you would have 4 writes to update the 4 LEDs at roughly the same time.  I would expect the ISY to be able to queue these, but interesting point.

So as an update each program could add an incremental wait to the else condition.  This should minimize/eliminate message clobbering.

program 1) Else: wait 1 sec, set LED 1 off

program 2) Else: wait 2 sec, set LED 2 off

etc.

Edited by gzahar
Posted

I am well aware of what the OP wants, as I do the EXACT same thing with Alexa.  Alexa talks to the fan directly, and a few seconds later the ISY "fixes up the KPLs" - it's the exact same scenario.

It really depends on the scene definition.  You've created 4 scenes, that the ISY tries to commit all 4 scenes (3 offs and 1 on) at once. Who knows if the KPL will be able to see all 4 commands and act on them.  That's a lot of traffic occurring all at the same time.  And if you use the KPL to initiate the change, you've now added even more Insteon traffic at the same instant.

It's always best to have as few number of scenes as needed.

You'd be better off doing what I have listed, and don't include the fan as a responder (but then you need more scenes total instead of just the 4 I have).

Guest
This topic is now closed to further replies.

×
×
  • Create New...