Announcement

Collapse
No announcement yet.

Simple question i should know the answer to...

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

    Simple question i should know the answer to...

    Hi,

    I have the attached script to switch the heat/cooling on in my daughters bedroom. It currently activates at 'night' between sunset and sunlight. I want to actually have it activate between 7pm and 9am, but every combination of the logic on the 'before and after' script doesn't do what I want.

    I am sure I am missing something obvious - but can't grasp it.

    How do I get this to work?

    Thanks

    Jon
    Attached Files

    #2
    I have found that HS time conditions do not cross midnight all that well.

    In your conditions you will want something like:

    Home: On AND Away: Off AND Time After 7pm AND time before 11:59pm

    OR

    Home: On AND Away: Off AND Time After 12am AND time before 9am

    Comment


      #3
      Originally posted by nojstevens View Post
      Hi,

      I have the attached script to switch the heat/cooling on in my daughters bedroom. It currently activates at 'night' between sunset and sunlight. I want to actually have it activate between 7pm and 9am, but every combination of the logic on the 'before and after' script doesn't do what I want.

      I am sure I am missing something obvious - but can't grasp it.

      How do I get this to work?

      Thanks

      Jon
      So I think I see your point; you want to activate the script before 9 AM OR after 7 PM. Problem is they are different days.

      I think the best thing to do would be to have two events which do the same thing.

      If you could change it to an "OR" condition; that would be what you want to do. I am playing around here and I cannot seems to change the conditional boolean operator. I tried searching for "OR" with numerous results.

      The other answer is to use DeMorgan's theorem to convert your OR condition into an AND condition; but that makes things unreadable.
      HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

      Plug-Ins Enabled:
      Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
      weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

      Comment


        #4
        Ahh; you can add OR conditions by adding groups; my bad.

        729 for a temperature; damn that is hot. <g>

        You could have a virtual device that comes on at 7PM and shuts off at 9AM and then use that.
        HS3 Pro Edition 3.0.0.435 (Windows Server 8.1 on ESXi box)

        Plug-Ins Enabled:
        Z-Wave:,RaspberryIO:,AirplaySpeak:,Ecobee:,
        weatherXML:,JowiHue:,APCUPSD:,PHLocation:,Chromecast:,EasyTr igger:

        Comment


          #5
          Thank you both for your help. I was too deep into the problem to see the obvious - an OR statement works great - I knew I would kick myself when I got to the solution.

          729 is the temp I get from my RFXCOM for 72.9 - took me a while to figure that one out too - why it never turned the cool on if >73

          Jon

          Comment


            #6
            an easy way to cross midnight is to create a virtual device then have 2 events that trigger on absolute time, one to turn the virtual on, the other to turn the virtual off, then use the virtual as a single condition or as a trigger for your event
            Over The Hill
            What Hill?
            Where?
            When?
            I Don't Remember Any Hill

            Virtualized Server 2k3 Ent X86 Guest on VMWare ESXi 4.1 with 3 SunRay thin clients as access points - HSPro 2.4.0.48 - ZTroller - ACRF2 (3 WGL 800's) - iAutomate RFID - Ledam - MLHSPlugin - Ultra1wire - RainRelay8 - TI103 - Ultramon - WAF-AB8SS - jvESS (11 zones) - Bitwise Controls BC4 - with 745 Total Devices - 550 Events - 104 scripts - 78 ZWave devices - 42 X10 devices - 76 DS10a's 3 RFXSenors and 32 Motion Sensors

            Comment

            Working...
            X