Jump to content

Detect any command to/from an Insteon Dimmer


John Vickers

Recommended Posts

So here is what I am trying to set up. In a garage I have the following currently set up:

  • An overhead light that has 4 dimmers to control it (4 entry ways).
    • All 4 dimmers are in a scene so 3 are slaves and one is the master connected directly to the light.
  • 2 garage doors with state sensors
  • I have some automations that do the following actions:
    • when either door shuts (if they are both shut at that time), a 5 minute timer will start. At the end of the timer the overhead light is turned off.
    • When either door opens, it turns the overhead light on, and stops the turnoff timer

The last piece that I want to implement is detect if any manual intervention with the light happens during the 5 minute timer, disable the timer. I am not finding a good way to detect any action on any switch, or any remote command from my home automation stuff. Does anyone know a concise way to do this?

Thanks!

John Vickers 

Link to comment

Set the command you want with the end result you want. 

If lights are switched on or fade on 

Then stop lights program.

You'll also want to be able to ree able the program. This can be done automatically after a certain time period or once you turn the lights off

 

 

Link to comment
1 hour ago, John Vickers said:

An overhead light that has 4 dimmers to control it (4 entry ways).

  • All 4 dimmers are in a scene so 3 are slaves and one is the master connected directly to the light.

 

Are these insteon or z-wave switches?

 

1 hour ago, John Vickers said:

2 garage doors with state sensors

And these are insteon?

-----

Assuming Insteon, these 5 programs should get you started...

Program GarageLightOn

If

     GarageSensor1 status is on 

OR GarageSensor2 status is on

then

     Stop Program GarageLightOff

     Set GarageLightScene on

 

-----

Program GarageLightOff

If

       GarageSensor1 status is off

AND GarageSensor1 status is off

then

     Enable Program ManualOverrideStayOn

    Wait 5 Minutes

    Set GarageLightScene off

    Disable Program ManualOverrideStayOn

   

--------

Program ManualOverrideStayOn  (disabled)

If

    Switch1 is switched on (Control menu, not status)

or Switch2 is switched on

or Switch3 is switched on

or Switch4 is switched on

then

      Disable Program GarageLightOn

      Disable Program GarageLightOff

      Enable Program CancelOverride

----

Program CancelOverride  (disabled)

If

         Switch1 is switched off (Control menu, not status)

    or Switch2 is switched off

    or Switch3 is switched off

    or Switch4 is switched off

then

    enable program GarageLightOn

    enable program GarageLightOff

    disable Program ManualOverrideStayOn

    disable Program CancelOverride (this MUST BE LAST, because its disabling itself)

----

Program InitializeGarageLightPrograms (Disabled) (Run at Startup)

if

  (nothing)

then

    enable Program GarageLightOn

    enable Program GarageLightOff

    disable Program ManualOverrideStayOn

    disable Program CancelOverride

 

    

 

Link to comment

MrBill,

Yes everything is Insteon, sorry I forgot to put that in my first post.

You tackled this in a different way than what I was thinking. Your programs are centered around not even starting the timer if the lights were on in the garage when it was first opened. In this scenario if someone was working in the garage and manually turned on the lights from any switch, people could come and go through the garage door without changing the light state.

That isn't what I was trying to do, but an interesting thought. I may end up using that.

What I was trying to do however was to detect any intervention in the light state when the countdown is active to cancel it. IE if someone is in the garage working on something, they can keep the lights on by hitting any switch in the garage within 5 minutes of both doors being closed. Since my current garage isn't really a work space for anything (just storage) I was prioritizing making sure the lights were not left on accidently since they are power hogs (high bay garage so I have 200W of LED lights just to get semi-decent light in there!). 

The problem I am having was finding a way to activate a program anytime any switch was pressed, or remotely controlled through the ISY. If you set the IF clause to "Control is ON", that will only respond if it was not ON before. IE if it was ON and you press the up paddle, nothing happens. It also doesn't trigger when the light is controlled remotely.

I tried using "Dimmer is Responding" line by itself as I would think that event would fire regardless of what is happening at the switch, but it doesn't.

If anyone has any ideas on how to get an ISY program to run anytime something happens to an Insteon dimmer, even if it ends up not changing its state, I would love to hear it!

 

John Vickers

Link to comment
2 hours ago, John Vickers said:

What I was trying to do however was to detect any intervention in the light state when the countdown is active to cancel it.

That is exactly what this does.  The only time "Program ManualOverrideStayOn" becomes enabled is during the 5 minutes timer, otherwise it's disabled.

 

2 hours ago, John Vickers said:

Your programs are centered around not even starting the timer if the lights were on in the garage when it was first opened.

That is not true. 

Program GarageLightOff

If

       GarageSensor1 status is off             <<<---When both doors close.

AND GarageSensor1 status is off

then

     Enable Program ManualOverrideStayOn    <---- Start listening for someone to hit the switch to On

    Wait 5 Minutes

    Set GarageLightScene off   <---- If the timer times out turn the light off.

    Disable Program ManualOverrideStayOn    <---quit listening for someone to hit the switch

 

Program ManualOverrideStayOn  (disabled)  <-- becomes enabled only during the 5 minute timer period

If

    Switch1 is switched on (Control menu, not status)  <-- when enabled during the delay someone can

                                                                                                press the switch ON

or Switch2 is switched on

or Switch3 is switched on

or Switch4 is switched on

then

      Disable Program GarageLightOn    <--the light is already don't listen for door opens

      Disable Program GarageLightOff     <--- the light is on in override and we don't want to restart the timer at this point

      Enable Program CancelOverride     <--- Starts listening for the light to be turned off via switch,

                                                                            at which time the light will go off and normal opartion of the

                                                                            automation will resume because that program runs

2 hours ago, John Vickers said:

If you set the IF clause to "Control is ON", that will only respond if it was not ON before. IE if it was ON and you press the up paddle, nothing happens.

That is not Correct.   the switch can be on and "Control" is switched on, DOES send an ON that the ISY will see and cause the program to run.  When "Control" is used it doesn't matter if the light is already on.  Use a program like this to test for yourself:

aaa Test - [ID 00E6][Parent 0001]

If
        'Kitchen Recessed#' is switched On
 
Then
        $stemp_test += 1
 
Else
   - No Actions - (To add one, press 'Action')
 

the variable will increment each time you press the up paddle regardless of the state of the switch.

2 hours ago, John Vickers said:

If anyone has any ideas on how to get an ISY program to run anytime something happens to an Insteon dimmer, even if it ends up not changing its state, I would love to hear it!

Check the programs again... they do EXACTLY what you asked for, and are very similar to what I use in my own garage, the biggest differnce is my lights will turn off anytime they are on, but will on turn on via automation during the period Sunset to Sunrise (next day).  (We don't need light during the day because the overhead doors have frosted glass windows for natural light.)

Link to comment

OK, what the hay.... I had a test program very similar to this except I was turning off the fan switch right beside the dimmer instead of changing a variable so I could immediately see if it was being triggered. It was not at that time, but is now. I can only assume I didn't save the program or something stupid like that....

One note with the "Control is on" option, it does not fire when another controller in the scene turns on. IE if the Master is on, and one of the slaves turns on, it will not detect that if you only have the Master is On programmed. If you have all the switches with an "control is on" and all of them with Ors, that will work as MrBill stated.

New Program - [ID 0029][Parent 0038]

If
        'Hallway / Hallway Dimmer' is switched On
     Or 'Hallway / Hallway Dimmer Slave 1' is switched On
     Or 'Hallway / Hallway Dimmer Slave 2' is switched On
     Or 'Hallway / Hallway Dimmer Slave 3' is switched On
     Or 'Hallway / Hallway Dimmer Slave 4' is switched On
 
Then
        $GarageLightLastLevel += 1
        Set 'Bedroom 2 / Bedroom 2 Fan' Off
 
Else
   - No Actions - (To add one, press 'Action')
 

I had misunderstood the logic of the programs first read through. I missed that the overrides are disabled until one of the doors is opened. My thought before was also predicated on not thinking the "control is on"s would fire if the light was already on.

The last piece of the puzzle that doesn't seem to be working is remote control triggering this program. If the dimmer is already at 100%, none of the options you can send from ISY will trigger the program (on, fast on, dim up, fade up). If the dimmer is off when a remote command is sent, that will trigger the program, just not when it is already at 100%.

Any thoughts on that piece?

John Vickers

Link to comment
15 minutes ago, John Vickers said:

If the dimmer is off when a remote command is sent, that will trigger the program, just not when it is already at 100%.

depends on the remote platform.   From UD mobil you could just add a button to favorites that run the Then block of Program ManualOverrideStayOn.  the problem is that would work anytime. 

Can probably be more help if you say what you're using for the remote platform... I've had them all.. mobilinc, ekeypad, agave, Home Assistant and UD mobile  is what I currently use.

Link to comment

ISY is controlling the Insteon devices directly. I am using Home Assistant with the ISY integration, and then using the HomeKit bridge to allow Siri to control lights as well.

So even the first bridge when I use the ISY interface from my computer to send any of the on commands (on, fast on, fade on, brighten) when the dimmer is already in the 100% state, the program doesn't fire.

John Vickers

Link to comment
16 hours ago, John Vickers said:

ISY is controlling the Insteon devices directly. I am using Home Assistant with the ISY integration, and then using the HomeKit bridge to allow Siri to control lights as well.

So even the first bridge when I use the ISY interface from my computer to send any of the on commands (on, fast on, fade on, brighten) when the dimmer is already in the 100% state, the program doesn't fire.

John Vickers

From Home Assistant there are many solutions.  You could use Custom Devices created with ISY Programs,

 

However i would probably write this program on the ISY side

Program RemoteGarageLightOverride

If

   (none)

then

      Set Set GarageLightScene on

      Disable Program GarageLightOn

      Disable Program GarageLightOff

      Enable Program CancelOverride

Else

      Set Set GarageLightScene off

      Disable Program GarageLightOn

      Disable Program GarageLightOff

      Enable Program CancelOverride

Then create two button cards one to run_then and one to run_else

type: grid
cards:
  - type: button
    name: Garage Light Override On
    icon: mdi:lightbulb
    tap_action:
      action: call-service
      service: isy994.send_program_command
      service_data:
        command: run_then
        name: RemoteGarageLightOverride
        isy: ISY
      target: {}
  - type: button
    name: Garage Light Override Off
    icon: mdi:lightbulb
    tap_action:
      action: call-service
      service: isy994.send_program_command
      service_data:
        command: run_else
        name: RemoteGarageLightOverride
        isy: ISY
      target: {}

Into that same grid I'd add button for the switch.garagelight to show the status. You could also change tap_action: to hold_action: if you want to make the button slightly harder to press or even add confirmation: with a text: field below it.

There's also a way to do this with a single button card except it would also require an HACS add-in called Lovelace State-Switch which I use alot. with custom buttons for the ISY.

 

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...