Announcement

Collapse
No announcement yet.

Script for "Sunrise clock" that works with HS 2.2?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Script for "Sunrise clock" that works with HS 2.2?

    I've searched the forums up and down, and I've found a few scripts. Like this:
    http://forums.homeseer.com/showthrea...olarclockstart

    But I can't get them to work! It may be me or the script, I don't know...


    Does anybody has a script they know works?
    HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
    Running on Windows 10 (64) virtualized
    on ESXi (Fujitsu Primergy TX150 S8).
    WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

    Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

    #2
    What is a sunrise clock? What are you trying to do?
    Regards,

    Rick Tinker (a.k.a. "Tink")

    Comment


      #3
      I want a light to slowly bright from 0% to 100% during 30 minute.
      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
      Running on Windows 10 (64) virtualized
      on ESXi (Fujitsu Primergy TX150 S8).
      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

      Comment


        #4
        Originally posted by Moskus View Post
        I want a light to slowly bright from 0% to 100% during 30 minute.
        Why not use an event triggered at sunrise with several device actions to brighten your lamp, each one set with more delay until the desired brightness of 100% is reached over the desired time period?

        Brian

        Comment


          #5
          I think that the script you are referring to is a bit complicated for what looks like a rather simple task.

          What I would probably do is write a time triggered script that produces a certain number of commands steps with hs.DelayTrigger to issue, lets says, 10 relative Brighten commands.

          Script would be something like:

          sub main
          time = 5
          for a = 1 to 10
          hs.DelayTrigger time, "Brighten_light"
          time = time + 180
          next
          end sub


          Event "Brighten_light" would only execute a command line script

          &hs.ExecX10byName "Your_light", "Bright", 10, 0

          Mind you, I did not try this but I don't see why it wouldn't work. However, if you use a regular X-10 lamp module, your light could not be OFF to start with, but rather, dimmed to 0 as discussed in the other thread.

          This is related to the way simple X-10 lamp modules respond to dim and brighten commands.

          One solution was to dim the lamp to 0 at night and then getting it slowly back to full ON in the morning with relative or absolute commands.
          Last edited by fran_joel; January 30, 2008, 04:51 PM.

          Comment


            #6
            Originally posted by fran_joel View Post
            I think that the script you are referring to is a bit complicated for what looks like a rather simple task.

            What I would probably do is write a time triggered script that produces a certain number of commands steps with hs.DelayTrigger to issue, lets says, 10 relative Brighten commands.

            Script would be something like:

            sub (main)
            time = 0
            for a = 1 to 10
            hs.DelayTrigger time, "Brighten_light"
            time = time + 180
            next
            end sub

            Event "Brighten_light" would only execute a command line script

            &hs.ExecX10byName "Your_light", "Bright", 10, 0

            Mind you, I did not try this but I don't see why it wouldn't work. However, if you use a regular X-10 lamp module, your light could not be OFF to start with, but rather, dimmed to 0 as discussed in the other thread.

            This is related to the way simple X-10 lamp modules respond to dim and brighten commands.

            One solution was to dim the lamp to 0 at night and then getting it slowly back to full ON in the morning with relative or absolute commands.

            p.s. Hey Brian ! You beat me to it, but mine is more detailed

            Will this be the same for a zwave device?????
            Hector
            ____________________________________
            Win.2003 OS, HS3
            BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
            BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
            MyTrigger,ACRF2,W800,Zwave
            AP800,Honeywell Stat

            Comment


              #7
              hmmm dunno.. I don't have a single Z-wave device...

              Joel

              Comment


                #8
                The way I do this is via one event and delays. Simply setup an event to trigger at the time you want to begin. Then add an event action to set the dim level and then a wait, next dim level, wait, etc.
                💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                Comment


                  #9
                  Originally posted by Rupp View Post
                  The way I do this is via one event and delays. Simply setup an event to trigger at the time you want to begin. Then add an event action to set the dim level and then a wait, next dim level, wait, etc.
                  So if I understand correctly, if you want to increase in 5% steps with a delay of, say, 20 seconds, you actually create 20 "dim" event actions followed 20 delay actions?



                  fran_joel, the scripts looks interessting, but I'm wondering if this script will tie up other events and triggers in HS? Or will HS run as usual with the script running (seeing that it is multithreaded and all)
                  HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                  Running on Windows 10 (64) virtualized
                  on ESXi (Fujitsu Primergy TX150 S8).
                  WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                  Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                  Comment


                    #10
                    Is there any particular reason that you want a script, or will events work OK for you too?

                    If using event(s), then here is what I would do:
                    Create an event called "Sunrise Start", and set it to trigger how you want. For the action, have it run event "Sunrise 1" (I would put all of these events in their own group so you do not have to see them listed with all of the others.)

                    Create the event "Sunrise 1" and keep its trigger type to "Manual". Add an action to Dim your light to 3% after a delay of 1 minute, then save the event. Keep in mind when you add the device action that you need to have a device that can be dimmed to an absolute level, and if you don't, then this event should have an action to Bright 1%, and back in the "Sunrise Start" event, add a device action to dim the light to 0% to start off with.

                    Copy the "Sunrise 1" event so that you have 2 of them, then select them both and copy them both until you have 4, and keep going until you have 30 events.

                    Now here is where you will have to apply some knowledge of your particular setup... Realize that some devices cannot dim from 0 to 100 in increments of 1 percent - many, especially X-10 devices, go in 3, 5, or even 7 percent increments. Figure out how many increments your device can do, and divide that into 30 so that you know how many percentage points to brighten the device by in each minute. If it dims/brightens in 5% increments, then you will only need 20 events and the delay value will have to be more than a minute. Alternatively, you could create 20 copies, and have your sunrise last 20 minutes instead of 30. If you have a very precise dimming device, you can even create 60 events and have each dim be a little less.

                    The next step involves another decision for you to make, and that is how you want these events to be chained together to form your sunrise.
                    Option 1:
                    Edit each of the Sunrise 1 copies and rename them Sunrise 2, Sunrise 3, etc. and modify the dim level, as well as the delay parameter. Sunrise 2 would have a 2 minute delay and would brighten to 2 percent, Sunrise 3 would have a 3 minute delay and would brighten to 3 percent, etc. Now, back in the first event you created (Sunrise Start), add actions to trigger all of the Sunrise events. When this runs, it will create delayed device actions, each a minute later, and you will have your sunrise effect. If you wish to kill the sunrise event (e.g. snooze button), then you simply run an event that has an action to "Remove Delayed Device Action" for your light - that will delete all of the future bright commands for the light.
                    Option 2:
                    Create the 30 events and then modify them to have the incremental light brightening command like in Option 1, but then add another action that runs the next event after a delay of a minute. In the current version of HomeSeer, this has the same effect as Option 1, and you can have an event that removes the delayed events to create your snooze button, but it would have to list all of the Sunrise events to catch them all, so that is not any better than Option 1. This option is different, however, with the current beta version of HomeSeer because in it there is a new trigger called "Manual with Conditions". With that, you can add a condition in each of the Sunrise # events that a virtual device, called say "I am awake" is Off. Now, halfway through the sunrise, let's say you decide that you had enough and you get out of bed - you can press a button that turns ON the "I am awake" device, which causes the sunrise light to come fully on to 100%, and then that would make the conditions stop the rest of the dim/bright events from triggering.
                    There could be 3-4 other options/ways to do this as well, but these two are probably the most common way to go about this.

                    Control is achieved entirely within the "Sunrise Start" event - you can start it whenever you want, even starting it 30 minutes before the real sunrise!

                    If it is a script you want, let me know...
                    Regards,

                    Rick Tinker (a.k.a. "Tink")

                    Comment


                      #11
                      OK, this is weird!

                      If I use HS directly setting the dim to 10% will force bright to 100% and then dim down to 10%. If I then select 20%, the lamp will go up to 100% and then down again to 20%.


                      BUT: If I use Rover and first selects 10%, and then selects 20%, the step from 10% to 20% is taken smootly and the lamp doesn't go up to 100% (and down again).

                      How can I prevent this behaviour with HS? I want it to work like Rover does.
                      HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                      Running on Windows 10 (64) virtualized
                      on ESXi (Fujitsu Primergy TX150 S8).
                      WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                      Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                      Comment


                        #12
                        Originally posted by Moskus View Post
                        OK, this is weird!

                        If I use HS directly setting the dim to 10% will force bright to 100% and then dim down to 10%. If I then select 20%, the lamp will go up to 100% and then down again to 20%.


                        BUT: If I use Rover and first selects 10%, and then selects 20%, the step from 10% to 20% is taken smootly and the lamp doesn't go up to 100% (and down again).

                        How can I prevent this behaviour with HS? I want it to work like Rover does.
                        Use Brighten not Dim...

                        Comment


                          #13
                          The dim/bright options that you are given in the device action depend on the settings for the device you are going to control - this is why after you select a device, the interface redraws itself. What you hope to be able to use with your device is Dim Absolute - this means go to the exact percentage that you specify - do not pass Go, do not collect $200.

                          With a lot of inexpensive X-10 devices, however, you do not have that option - you can either start at 100% and dim down to a level, or start at 0% and brighten to a level. What you have to do if this is the type of device that you have is either A) replace it B) run an event before you go to bed that dims the light down to 0% (effectively it is off) and then your sunrise event should use bright commands. The reason is that the device is probably configured to brighten first to 100% so that the device is starting from a known starting point before HomeSeer calculates how many Dim commands to send to get it where you want.

                          If you have one of these devices, that other type of dimming is called relative dimming -- meaning it dims a percentage relative to where it is currently. If the light is at 50% and you tell it to dim 10%, it will be at 40% instead of 10% because you told it to dim relative, not absolute.

                          Does that make sense?

                          There are a LOT of options! Your best bet if you plan on using this a lot is to spend a little more and get a light switch that supports absolute dimming, as that will allow you to create your sunrise event with the least amount of hassle and without being awakened by a momentary flash of 100% light in your eyes.
                          Regards,

                          Rick Tinker (a.k.a. "Tink")

                          Comment


                            #14
                            Originally posted by Rick Tinker View Post
                            Is there any particular reason that you want a script, or will events work OK for you too?
                            That would do the trick too, I guess. But I would prefer a method that didn't create a lot of unnessesary events...
                            HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                            Running on Windows 10 (64) virtualized
                            on ESXi (Fujitsu Primergy TX150 S8).
                            WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                            Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                            Comment


                              #15
                              Originally posted by fran_joel View Post
                              Use Brighten not Dim...
                              But this is directly from the HS Status screen. I would have thought that HS chose Bright automaticly when the dim is 10% and I select 20% from the combobox. Or perhaps I'm missing an option?
                              HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
                              Running on Windows 10 (64) virtualized
                              on ESXi (Fujitsu Primergy TX150 S8).
                              WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

                              Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

                              Comment

                              Working...
                              X