Jump to content

Programmatically Adjusting Dimmer "On Level" of a Motion Sensor II Controlled Scene


Recommended Posts

Posted

ISY Version: 5.30
Motion Sensor is set to only report ON and timeout is set to 20 seconds. it is battery powered.
All other devices are hardwired insteon paddle/keypad dimmers.

I have an Insteon Scene consisting of a Dimmer Switch (resp) and a Motion Sensor II (cont) to get low latency "on" when I walk into a bathroom.

I have a routine to set the house to "night mode" when I push a button on a different keypad. Routine turns off a scene containing all common area lights, sets the "on level" of several lights to a value defined in a variable. it also sets the "on level" of the Bathroom motion scene.

The goal is instant on to the correct light level when walking into this bathroom.

I am noticing the following;

  1. Programmatically setting the on level of the individual dimmers works fine
  2. In testing, Programmatically setting the scene on level would only work if the Admin UI was set for automatic device writes for both hardwired and battery devices. This was also true with the Admin console closed which seems odd.
  3. I tried issuing a "write changes" command via my program, but it didn't seem to have any effect.

My questions are;

  1. Is there a better/efficient/faster way to do this?
  2. Is it possible to dynamically adjust the on level of a scene with a battery powered device?
    1. and if no, would plugging into USB help?
  3. In leu of finding a definitive answer, I am treating the "timeout" option on the motion sensor to define the time between possible ON reports from the Sensor to the ISY.
  4. Do the "Automatic Writes" settings in the Admin UI have an effect on programs being able to write to either wired or battery powered devices?
  5. What is the Proper/Intended use of the "Write Changes" action within a given program?

 

Set Light Levels - [ID 0013][Parent 0003]

If
        $SleepMode_Bool is 1
 
Then
        Set 'Bath.M / Nw-R-Lights' On Level '$Sleep_Mode_Light_Levels %'
        Set 'Kitchen / KitchenN-Peninsula Lights' On Level '$Sleep_Mode_Light_Levels %'
        Set 'Hall / Hall.N-Lights (3W)' On Level '$Sleep_Mode_Light_Levels %'
        In 'Bath.S / Sensor' Set 'Bath.S / Sw-L-Lights' To On Level '$Sleep_Mode_Light_Levels %'
 
Else
        Set 'Bath.M / Nw-R-Lights' On Level 100%
        Set 'Kitchen / KitchenN-Peninsula Lights' On Level 100%
        Set 'Hall / Hall.N-Lights (3W)' On Level 100%
        In 'Bath.S / Sensor' Set 'Bath.S / Sw-L-Lights' To On Level 100%
        Set 'Bedroom Master / MasterBed-Lights' Backlight On 15 / Off 0


Thank you for any assistance you can give. I swear i've googled to the best of my abilities, and have read manuals (though I have ADHD).
 

Posted (edited)
30 minutes ago, SForma said:

Thank you for any assistance you can give.

I would use the "adjust scene" functionality, which is what I think you're asking for.  Here's an example program that uses it:

West Hall On-Level - [ID 00B7][Parent 000A]

If
        From    Sunset  +  1 hour 
        To      Sunrise (next day)
 
Then
        In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallEntrance' To 25% in 0.5 seconds, 1 retry
        In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallLaundry' To 25% in 0.5 seconds, 1 retry
        In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallOffice' To 25% in 0.5 seconds, 1 retry
 
Else
        In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallLaundry' To 50% in 0.5 seconds, 1 retry
        In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallEntrance' To 50% in 0.5 seconds, 1 retry
        In 'Devices / dirWestHall / msWestHallNorth-Sensor' Set 'Devices / dirWestHall / sldWestHallOffice' To 50% in 0.5 seconds, 1 retry
 

EDIT: A screenshot might help you find the "adjust scene" functionality.  ISY firmware and UI at version 5.3.2.

 

Screen Shot 2021-01-31 at 12.44.35 PM.png

Edited by Bumbershoot
  • Like 1
Posted

I didn't actually answer your questions.  Answers in red.

1 hour ago, SForma said:

My questions are;

  1. Is there a better/efficient/faster way to do this?  Yes. Use the "adjust scene" functionality in programs.
  2. Is it possible to dynamically adjust the on level of a scene with a battery powered device?  Same answer as above.
    1. and if no, would plugging into USB help?
  3. In leu of finding a definitive answer, I am treating the "timeout" option on the motion sensor to define the time between possible ON reports from the Sensor to the ISY.  Sorry, but I don't know.  I usually have my motion sensors set to "ON only" and let the ISY figure out when to turn off the associated scene.
  4. Do the "Automatic Writes" settings in the Admin UI have an effect on programs being able to write to either wired or battery powered devices?  If there are changes pending, then yes.
  5. What is the Proper/Intended use of the "Write Changes" action within a given program?  Probably to programmatically effect changes to device behavior.  You can use "Write Changes" effectively if you place it in the "then" stanza of a program that has the activation of the device in the "if" stanza.  Sample below (the motion sensor is the device that would have turned the device 'sldWestHallLaundry' switchLink on, so the motion sensor was activated by motion).

MS West Hall Write - [ID 0084][Parent 0004]

If
        'Devices / dirWestHall / sldWestHallLaundry' Status is not Off
 
Then
        Set 'Devices / dirWestHall / msWestHallNorth-Sensor' Write Changes
 
Else
   - No Actions - (To add one, press 'Action')
 

 

 

  • Like 1
Posted

@Bumbershoot Thank you for your replies!

Regarding Reply 1: While I was already using the "Adjust Scene" action, I was using the "Command" where you are using the "Insteon" portion of that action type. It looks like they do similar things, but I suspect there is some difference. Can you clue me in?

I made the change from "Command" to "Insteon" and it seems like it worked. Proof shall be in the pudding :)

Regarding Reply 2: 
Answer 1 & 2: My first question in this post is seeking some clarification if you have it.
Answer 3: Mine are setup the same way. I have my timeout set so low so that every after <timeout value> seconds of the last motion report sent to the ISY the motion detector will, assuming it senses motion, send another report thus starting my off timer program over again. I'm just curious if that's an accurate assessment of how the "timeout" option functions.
Answer 4: Even if the Admin UI is closed?
Answer 5: Thats kinda how I was using it, but it didn't have the desired effect. The only way I got things to work is to set both "Automatic Writes" options to enabled. Though it didn't work outside of testing so maybe I missed something.

Thanks Again.

 

 

 

Posted
2 hours ago, SForma said:

@Bumbershoot Thank you for your replies!

Regarding Reply 1: While I was already using the "Adjust Scene" action, I was using the "Command" where you are using the "Insteon" portion of that action type. It looks like they do similar things, but I suspect there is some difference. Can you clue me in?  Sorry, I set these up so long ago I forget!

I made the change from "Command" to "Insteon" and it seems like it worked. Proof shall be in the pudding :)

Regarding Reply 2: 
Answer 1 & 2: My first question in this post is seeking some clarification if you have it.
Answer 3: Mine are setup the same way. I have my timeout set so low so that every after <timeout value> seconds of the last motion report sent to the ISY the motion detector will, assuming it senses motion, send another report thus starting my off timer program over again. I'm just curious if that's an accurate assessment of how the "timeout" option functions.  As far as I know, yes.  I see multiple "DON" events in the Event Viewer from the MS before the lights turn off.
Answer 4: Even if the Admin UI is closed?  I think the real purpose of this is to prevent multiple writes to every event while large scenes are being set up.  Turn off "Automatic Writes" and the process will go a lot quicker.  The AC would be open while doing this.
Answer 5: Thats kinda how I was using it, but it didn't have the desired effect. The only way I got things to work is to set both "Automatic Writes" options to enabled. Though it didn't work outside of testing so maybe I missed something.

Thanks Again.

 

 

 

 

Posted
5 hours ago, Bumbershoot said:

 I think the real purpose of this is to prevent multiple writes to every event while large scenes are being set up.  Turn off "Automatic Writes" and the process will go a lot quicker.  The AC would be open while doing this.

That was my understanding as well, but it seemed like it had some bearing in the background. Anyone want to chime in and tell me I'm crazy? please :)

 

 

Posted (edited)
On 1/31/2021 at 2:35 PM, SForma said:

@Bumbershoot Thank you for your replies!

Regarding Reply 1: While I was already using the "Adjust Scene" action, I was using the "Command" where you are using the "Insteon" portion of that action type. It looks like they do similar things, but I suspect there is some difference. Can you clue me in?

I made the change from "Command" to "Insteon" and it seems like it worked. Proof shall be in the pudding :)

Regarding Reply 2: 
Answer 1 & 2: My first question in this post is seeking some clarification if you have it.
Answer 3: Mine are setup the same way. I have my timeout set so low so that every after <timeout value> seconds of the last motion report sent to the ISY the motion detector will, assuming it senses motion, send another report thus starting my off timer program over again. I'm just curious if that's an accurate assessment of how the "timeout" option functions.
Answer 4: Even if the Admin UI is closed?
Answer 5: Thats kinda how I was using it, but it didn't have the desired effect. The only way I got things to work is to set both "Automatic Writes" options to enabled. Though it didn't work outside of testing so maybe I missed something.

Thanks Again.

 

 

 

For the record, for anyone else reading, changing the program from "command" to "insteon" resolved my issue.

Edited by SForma
  • Like 2
Guest
This topic is now closed to further replies.

×
×
  • Create New...