Announcement

Collapse
No announcement yet.

how to dim lights on initial vacancy and then off later

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to dim lights on initial vacancy and then off later

    i would like to have the lights in a room dim when blradar first senses vacancy (ie an Active Zone sensor goes Off)

    Then after another 5 minutes turn the lights off if the room is still vacant (ie no motion within that next 5 minutes)

    if there is motion within that 5 minutes, the turn the lights back up

    anyone have suggestions on how to handle this via UDMC?
    Mark

    HS3 Pro 4.2.19.5
    Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
    Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
    Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

    #2
    I think this would be great to have as well. Interested if someone can help out with some ideas.

    Comment


      #3
      Interesting... let me see if I can be done or I would have to make changes
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        Originally posted by mnsandler View Post
        i would like to have the lights in a room dim when blradar first senses vacancy (ie an Active Zone sensor goes Off)

        Then after another 5 minutes turn the lights off if the room is still vacant (ie no motion within that next 5 minutes)

        if there is motion within that 5 minutes, the turn the lights back up

        anyone have suggestions on how to handle this via UDMC?

        Can you try 2.0.80 in the HS3 updater

        I have added a new scripting call named "DelayedEventExists"

        So you should be able to do this:
        This is just a sample!

        In your active zone OFF code:

        1. Dim your light to 50%
        2. Use NewDelayedEventForNoEcho to create a delayed event for 5 minutes to turn light off

        In your sensor ON code:

        1. Use the DelayedEventExists call to check if your delayed event exists to turn off light
        2. If it exists then use the RemoveDelayedEvent call to remove it (that way your light will not go off)
        3. Dim light back up to where you want


        Will this help?
        Cheers,
        Bob
        Web site | Help Desk | Feature Requests | Message Board

        Comment


          #5
          Originally posted by Blade View Post
          Can you try 2.0.80 in the HS3 updater

          I have added a new scripting call named "DelayedEventExists"

          So you should be able to do this:
          This is just a sample!

          In your active zone OFF code:

          1. Dim your light to 50%
          2. Use NewDelayedEventForNoEcho to create a delayed event for 5 minutes to turn light off

          In your sensor ON code:

          1. Use the DelayedEventExists call to check if your delayed event exists to turn off light
          2. If it exists then use the RemoveDelayedEvent call to remove it (that way your light will not go off)
          3. Dim light back up to where you want


          Will this help?
          Bob,
          thanks for the quick turn around. I'll give it a try and report back.
          Mark

          HS3 Pro 4.2.19.5
          Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
          Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
          Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

          Comment


            #6
            i getting the following in the hs log

            BLRadar error Method NewDelayedEventForNoEcho does not exist in this plugin.

            Here is my call

            Code:
            hs.PluginFunction("BLRadar", "", "NewDelayedEventForNoEcho ", New Object(){"Office Lights Off","Office Lights:off",5, ""})
            i'm not sure what the 4th parameter (script name) is for?
            Mark

            HS3 Pro 4.2.19.5
            Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
            Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
            Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

            Comment


              #7
              If you are calling that from within the UDMC then try this format:

              Code:
              blradar.PluginFunction("NewDelayedEventForNoEcho", new Object(){"Master Bathroom Sink Control", "Master Bathroom Sink Light:off", 5, ""})
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #8
                Ok, it seems to be working. thanks.

                for anyone interested here is what I did:

                "Office Lights Off" is the Delayed Event name. this can be whatever you want.

                in the On script of the Motion Sensor:

                if blradar.pluginfunction("DelayedEventExists", new object(){"Office Lights Off"}) then
                blradar.pluginfunction("RemoveDelayedEvent", New Object(){"Office Lights Off"})
                end if

                ...your code to Turn the lights On to whatever level you want
                In the Off script of the Active Zone device:

                Code:
                blradar.PluginFunction("NewDelayedEventForNoEcho", New Object(){"Office Lights Off", "Office Lights:off", 5, ""}) ' Off in 5 minutes 
                
                ...your code to dim the lights to whatever level you want
                Mark

                HS3 Pro 4.2.19.5
                Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
                Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
                Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

                Comment

                Working...
                X