Announcement

Collapse
No announcement yet.

Event: If a device's value is in the range....

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

    Event: If a device's value is in the range....

    I guess I've never done this before, but I'm trying to get my living room lights to come on if it gets really dark out during the day. I already have a scene that works at sunset, I'd like it invoke it if there's a dark cloud, an eclipse, whatever. So I'm using the Light Level channel of my front porch MS II. But I really don't understand the event inputs. I'd like to trigger the event if the Light Level is in the range 0 - 150. What are my field inputs? The prompts do not make sense to me.

    Click image for larger version

Name:	ScreenShot_20200811180629.png
Views:	171
Size:	144.3 KB
ID:	1410536

    Attached Files


    Jim Speiser
    35-year veteran of Home Automation
    Still don't know squat

    #2
    I never use "This device has bee/for at least..." but this device changes and has the value (or something like that). Your selection seems more appropriate, though as you don't want the event to kick in just because a cloud passes by. So it doesn't work if you enter 150?

    In any case, the real reason I am answering is because I want to do exactly the same. What sensor are you using? I am not familiar with "MS II". Do you have a link to it? Is it water proof (not that we have much rain...)

    Comment


      #3
      I'm not familiar with the MS II device myself but I use the "has been/for at least" trigger on hundreds of my events and I wanted to warn you about upgrading to HS4. For some reason this most recent HS4 release no longer lets you create events with the "has been/for at least" trigger. The trigger is available in the drop down to select but as soon as you select it, you are given a message that the trigger is no longer valid and that you should instead use the trigger "has been/for exactly" which of course behaves differently. Any old events that you have out there with the "has been/for at least" trigger still seem to be respected in HS4.1.3.0 but you cannot create new ones or edit existing ones. I've put in a helpdesk rant regarding this sudden and without-warning apparent deprecation of this highly used functionality but you may want to steer clear of HS4 until (if?) they fix this.

      Comment


        #4
        Could you screen shot the MS II device's Status/Graphics tab? Usually when I use this trigger, the values presented in the event are the values from this tab. Perhaps you're Status/Graphics values need updating.

        My guess though is that the device has a range of light values from 0 (dark) to 255 (bright) and that you will need to supply a range in the event....so whatever range you consider dark enough to require lights on...0 to some value you may have to test using that sensor. Then whenever your sensor value is within that range for the 5 minutes you indicated, the event is triggered. Be sure to include an advanced option on there to prevent the event from running again for a few minutes so that you don't get into a situation where your light levels being stuck in that low range for hours on end 'cause your event to trigger over and over again...it'll slow your system down....either that or put another condition in your if statement to check that the light isn't already on.

        Comment


          #5
          IKUS do you have a link to this device.

          Comment


            #6
            Originally posted by mulu View Post
            IKUS do you have a link to this device.
            Hi Mulu. No, this isn't a device I use...I was just trying to help out. I personally use the luminance sensor onboard the HSM200's.

            P.S I too am in Cali...socal so not alot of rain. I have HSM200's plugged in outside in GFCI protected sockets under eaves on the house and they work great. On the occasional 105+ day, they begin to lose their sensitivity to smaller people and animals but other then that...no issues using them outside here.

            Comment


              #7
              IKUS got it. I looked at the HSM200 but it's for indoor. There are the Aeon Labs devices but there are no good reviews and I don't have a good experience with an older version. I am thinking of putting photodiodes in some windows but it's kind of a pain with the cabling, hooking up an Arduino board, etc.

              Comment


                #8
                Originally posted by mulu View Post
                IKUS got it. I looked at the HSM200 but it's for indoor. There are the Aeon Labs devices but there are no good reviews and I don't have a good experience with an older version. I am thinking of putting photodiodes in some windows but it's kind of a pain with the cabling, hooking up an Arduino board, etc.
                HSM200's are indoor indeed, but with the easy so-cal weather (ie no freezing) they work fine outside as long as they are protected from rain.

                Comment


                  #9
                  Originally posted by mulu View Post
                  IKUS got it. I looked at the HSM200 but it's for indoor. There are the Aeon Labs devices but there are no good reviews and I don't have a good experience with an older version. I am thinking of putting photodiodes in some windows but it's kind of a pain with the cabling, hooking up an Arduino board, etc.
                  Mulu, if you don't need a hardwired sensor, check out Zooz. They have an outdoor battery operated motion sensor with a luminance sensor onboard. Zooz devices play best with the S2 enabled version of the z-wave plugin though.

                  Comment


                    #10
                    IKUS those sensors from Zooz look interesting and it seems they are even made for outside. I might get one of those and try it out assuming they work with HS4.

                    Comment


                      #11
                      Mulu, you're absolutely right, I want it to kick in only if it's a BIG cloud. So I don't want it to kick in instantly, or for a bunch of little clouds, my lights would be flashing on and off.

                      And no, I don't think it would work with a value of just 150, because it would have to be exactly that, and stay that for a couple of minutes, which may not happen within the event's time limit.

                      The MS II, as you've no doubt learned, is the Inteon Motion Sensor II. They work just fine, I don't need to hardwire sensors or anything like that. this one's been under the roof of my front porch for about 2 years, and has kept working through heat waves and freezes.

                      (And once again, I feel like Insteon is fading away like the photograph of Marty McFly in "Back to the Future." An experienced HA person has never heard of an MS II?)



                      Jim Speiser
                      35-year veteran of Home Automation
                      Still don't know squat

                      Comment


                        #12

                        Mulu, you're absolutely right, I want it to kick in only if it's a BIG cloud. So I don't want it to kick in instantly, or for a bunch of little clouds, my lights would be flashing on and off.

                        And no, I don't think it would work with a value of just 150, because it would have to be exactly that, and stay that for a couple of minutes, which may not happen within the event's time limit.

                        The MS II, as you've no doubt learned, is the Inteon Motion Sensor II. They work just fine, I don't need to hardwire sensors or anything like that. this one's been under the roof of my front porch for about 2 years, and has kept working through heat waves and freezes.

                        (And once again, I feel like Insteon is fading away like the photograph of Marty McFly in "Back to the Future." An experienced HA person has never heard of an MS II?)




                        Jim Speiser
                        35-year veteran of Home Automation
                        Still don't know squat

                        Comment


                          #13
                          Originally posted by IKUS View Post
                          Could you screen shot the MS II device's Status/Graphics tab? Usually when I use this trigger, the values presented in the event are the values from this tab. Perhaps you're Status/Graphics values need updating.

                          My guess though is that the device has a range of light values from 0 (dark) to 255 (bright) and that you will need to supply a range in the event....so whatever range you consider dark enough to require lights on...0 to some value you may have to test using that sensor. Then whenever your sensor value is within that range for the 5 minutes you indicated, the event is triggered. Be sure to include an advanced option on there to prevent the event from running again for a few minutes so that you don't get into a situation where your light levels being stuck in that low range for hours on end 'cause your event to trigger over and over again...it'll slow your system down....either that or put another condition in your if statement to check that the light isn't already on.
                          And therein lies the problem. Yes, I very much WANT to input a range, but how can I, when the prompt is, "...has been a value in the range," but the drop-down does not allow for a RANGE. The choices are, [blank], (Enter a custom value), An invalid or error state, (value), Unknown. First, wherein do I enter a RANGE? (And second, what the heck is the difference between (value) and (Enter a custom value)?

                          And the next prompt is even more confusing: "The value, using values from 0-255, is..."

                          What am I missing?

                          [See attached for requested screen shot....for what its worth]
                          Attached Files


                          Jim Speiser
                          35-year veteran of Home Automation
                          Still don't know squat

                          Comment


                            #14
                            I just tried this myself on HS3 and it looks like you can set the "has been/for at least" trigger to watch for a single specific valuebut you can't set it to watch for a range.

                            Comment


                              #15
                              Here's a proposed solution...

                              Create a virtual device called "gloomy outside" with binary values of ON & OFF or TRUE & FALSE, whichever works best for you...you can even set the icon values for these as a cloud and a sun using the HS delivered icon packs or something you find from google. Then create two events on your luminance device using the triggers "device had it's value set and is less than" and "device had it's value set and is greater than". The two events would toggle the virtual "gloomy outside" device on and off based on the luminance value you decide upon as the boundary between bright enough and not bright enough outside. Hopefully this isn't a battery operated luminance sensor and you can increase your reporting interval. This will let your events react quicker.

                              Then create a third event that uses the "has been/for at least" trigger on your "gloomy outside" device, which you can set at 5 minutes or however long you want that "gloomy outside" to have to be on before turning the lights on. You should also *AND* this with an "the time is daytime" trigger so that it doesn't even attempt to trigger at night. You can further limit event triggering if you *AND* that with a check that the light you're about to turn on isn't already on.

                              You'll likely want a fourth event out there to turn those lights off when "gloomy outside" returns to OFF/FALSE.

                              Depending on how often you have huge changes in lighting due to clouds and eclipses or whatever you want your lights to react to, play with the "Can Not Re-Run For" advanced option on the events to keep the light on/off changes throughout the day from becoming annoying.

                              Comment

                              Working...
                              X