Announcement

Collapse
No announcement yet.

Ambient Weather Re-Development

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

    #16
    Originally posted by simplextech View Post

    What is the device change time? It may have been 0 all night but if it was zero when the event was created then it never changed and wouldn't have triggered the event.
    The event was created months ago, it was edited days ago (7-22-19). You can see from the tests that I created both at the same time...... One fired/triggered and one didn't.

    It must be some issue with HS not seeing it sit at zero straight threw.

    Comment


      #17
      Originally posted by integlikewhoa View Post

      The event was created months ago, it was edited days ago (7-22-19). You can see from the tests that I created both at the same time...... One fired/triggered and one didn't.

      It must be some issue with HS not seeing it sit at zero straight threw.
      I understand the events were created a long time ago. Look at the Illuminance device Advanced tab and verify there's a value and then look at the device change time to see when the last time the device updated. If the device is not updating I can look into that.

      Have you tried creating a new event and see if maybe the event itself is corrupted in some way?

      Comment


        #18
        Originally posted by simplextech View Post

        I understand the events were created a long time ago. Look at the Illuminance device Advanced tab and verify there's a value and then look at the device change time to see when the last time the device updated. If the device is not updating I can look into that.

        Have you tried creating a new event and see if maybe the event itself is corrupted in some way?
        Yes we have fixed the updating (see a few post back). It's updating correctly.

        I don't think you saw my pictures I attached on post 14 (that would anwser both your questions). if the device was not updating then how does one event run but not the others? Also besides the original event I have created two test events. So I 3 events now. 2 with Time are not working. So can't be that original event is corrupt as a new test one is also not working.

        Also this same device is running a Day time (when lux is greater then zero) and it is working, but again it doesn't have a period of time in it. This also confirms that the lux is updating as it should.

        Comment


          #19
          The events with time not working is what has me curious to know what the absolute value is being set at. It may be a rounding issue of the actual value and not the display so please look at the advanced tab and provide the value when it's showing 0 it may be 0.000001

          Comment


            #20
            I've created a test event matching yours as well to try and see what is not happening correctly.

            Comment


              #21
              Thanks. Here are my concerns.

              If the issue is rounding then I would assume that my test event that says changes and equals 0, should also not fire if it was rounding and there was a ".00001" number instead of a true Zero number. But that is not the case and that test event works.

              I would encourage you to create multiple test events and see which fires and which doesn't.

              Great then zero works fine. ( I use this for sun up change virtual switch to day)
              Equals to zero works fine. ( ran a test event on this and will use this for now to chnage virtual switch to night)

              Equals to zero for atleast XXX time doesn't work.

              Comment


                #22
                Originally posted by simplextech View Post
                The events with time not working is what has me curious to know what the absolute value is being set at. It may be a rounding issue of the actual value and not the display so please look at the advanced tab and provide the value when it's showing 0 it may be 0.000001
                I will check this tonight and see after the sun goes down.

                Comment


                  #23
                  Originally posted by integlikewhoa View Post

                  Yes we have fixed the updating (see a few post back). It's updating correctly.

                  I don't think you saw my pictures I attached on post 14 (that would anwser both your questions). if the device was not updating then how does one event run but not the others? Also besides the original event I have created two test events. So I 3 events now. 2 with Time are not working. So can't be that original event is corrupt as a new test one is also not working.

                  Also this same device is running a Day time (when lux is greater then zero) and it is working, but again it doesn't have a period of time in it. This also confirms that the lux is updating as it should.
                  The problem is not the with the time added nor with the plugin, but with the trigger itself. You used a conditional statement as your trigger. Your "trigger" is "if lux has been 0 for at least 1 minute". This is not a "clean" trigger but rather a conditional statement and would create an infinite loop. The event would be continuously true and fire 1000 times per second (once per millisecond) 1 minute after lux changes to 0 until lux changes to greater than 0.

                  Your trigger should be "if lux has been 0 for exactly 1 minute". This event can only be true 1 time each time lux changes and is set to 0.

                  Rule of thumb: Triggers must be clean and concise. Conditions to triggers ("AND IF") can be broad and ambiguous.

                  --Barry

                  Comment


                    #24
                    Originally posted by logman View Post
                    Your "trigger" is "if lux has been 0 for at least 1 minute". This is not a "clean" trigger but rather a conditional statement and would create an infinite loop. The event would be continuously true and fire 1000 times per second (once per millisecond) 1 minute after lux changes to 0 until lux changes to greater than 0.
                    Thanks for pointing that out and you are absolutely true and i'm guilty of that fault in my test events.

                    In the main event (See attachment) I have that sorted out. Problem was the main event wasn't firing so i broke it down into test events to isolate the issue.
                    As you have pointed out I should have endless loop of firing. But I get none ever.

                    Correct me if I'm wrong but I don't think that is my current issue. But I have also just made another test Event with the "Excatly" this time frame and will also see what happens tonight.

                    Comment


                      #25
                      Originally posted by integlikewhoa View Post

                      Thanks for pointing that out and you are absolutely true and i'm guilty of that fault in my test events.

                      In the main event (See attachment) I have that sorted out. Problem was the main event wasn't firing so i broke it down into test events to isolate the issue.
                      As you have pointed out I should have endless loop of firing. But I get none ever.

                      Correct me if I'm wrong but I don't think that is my current issue. But I have also just made another test Event with the "Excatly" this time frame and will also see what happens tonight.
                      Actually you are only guilty of it in test event #1. Test event #2 has a concise trigger (IF device changes to 0 lux is concise).

                      And yes, that's also the problem with the main event. There is no concise action that occurs to "trigger" the event. You need to change the event time from "at least" 3 minutes to "exactly" 3 minutes. It will then fire as expected.

                      On why you are not currently getting an infinite loop on the test event, it's because you have no specified "action" (THEN) statements to carry out. So the event does not run (there is no action to carry out) and never creates the loop. If you want to test it, add an action to test event #1 tonight and see if HS stops responding in short order. (Actually I don't recommend this. )

                      On the "Main Event", a loop would not form on it because if it did fire then it would change the device "Day/Night Luminance" to Night and the trigger condition would no longer test true, thus preventing a loop. The problem lies in the ambiguous trigger which is preventing it from firing to begin with.

                      --Barry

                      Comment


                        #26
                        Also think of this from a programming point of view: Setting aside the loop danger, if HS allowed the statement "for at least 3 minutes" to be a main trigger then it would require a timer running in the background for each device linked to that type of trigger. In your case, each advance of the timer greater than 3 minutes would be an actionable trigger. This would create an unnecessary overhead burden. Having several similarly structured events could slow the system to a crawl. (Plus the event would create a loop without a condition statement attached.)

                        Currently HS tests "for at least 3 minutes" as a conditional statement, and it only has to perform a simple math function to determine elapsed time.

                        --Barry

                        Comment


                          #27
                          Originally posted by logman View Post
                          And yes, that's also the problem with the main event. There is no concise action that occurs to "trigger" the event. You need to change the event time from "at least" 3 minutes to "exactly" 3 minutes. It will then fire as expected.
                          I will test this but I don't believe this is true and I have been using this event for months now the way it is. If Lux has been zero for atleast 3min and day/night is currently Day then switch to night seems correct to me. But I'll create another test event and see what happens.

                          Originally posted by logman View Post
                          On why you are not currently getting an infinite loop on the test event, it's because you have no specified "action" (THEN) statements to carry out. So the event does not run (there is no action to carry out) and never creates the loop. If you want to test it, add an action to test event #1 tonight and see if HS stops responding in short order. (Actually I don't recommend this. )
                          The action is to "Wait". This is a test event. This will trigger a last run event time. It will also trigger a log in the logs. So I can see that it ran even if the action is only to "wait". You can see in the test event #2 it records a last triggered time and also will show in the log. If it was a loop the log would continue to repeat its self. Which it should have and I'm running on an i7 server so it wouldn't have crashed but would have flooded the logs. But it didn't and the reason it didn't is because it's not seeing the lux staying at zero for 1 min or more. Same reason the main event wont trigger.

                          ​​​​​​​
                          Originally posted by logman View Post
                          On the "Main Event", a loop would not form on it because if it did fire then it would change the device "Day/Night Luminance" to Night and the trigger condition would no longer test true, thus preventing a loop. The problem lies in the ambiguous trigger which is preventing it from firing to begin with.
                          Same response as the first one. I'll test tonight but this event worked for months until I changed the child device from one to another. I didn't even recreate the event just pointed one device to a different child. I still believe that that Lux been at 0 for more then 3min and day/night is day is a valid non ambiguous event. But testing tonight will give more insite.

                          I generally don't like to use precise times due to the fact it's possible it might get skipped. If something happens at that exact 3min mark and it gets skipped it will never trigger. If it says atleast 3min then I'm good for it to fire again. Which is why I put the day/night is day. So it would fire once and stop. So It should work as it has for months now.

                          Comment


                            #28
                            I also think your contradicting yourself on an "ambiguous trigger"

                            Originally posted by logman View Post
                            This is not a "clean" trigger but rather a conditional statement and would create an infinite loop. The event would be continuously true and fire 1000 times per second (once per millisecond) 1 minute after lux changes to 0 until lux changes to greater than 0.
                            Originally posted by logman View Post
                            The problem lies in the ambiguous trigger which is preventing it from firing to begin with.
                            I believe the correct answer is it will create an infinite loop (as you first said), and I have done it on accident in the past. Results are flooding the logs with a event running over and over again. Problem is you also say my main even is not running because of this. Which is opposite of the a continuous loop.

                            I totally could be wrong but I'm still saying it's something with this child device and the lux reading not sitting at zero straight threw. I should have saw an endless loop on my test1 event but didn't.

                            Comment


                              #29
                              Outside of the event structure I've been checking my devices and they are not showing any decimal only whole numbers for Illuminance so I'll have to check it at night to verify Illuminance is registering a direct 0 as it should.

                              Comment


                                #30
                                Originally posted by simplextech View Post
                                Outside of the event structure I've been checking my devices and they are not showing any decimal only whole numbers for Illuminance so I'll have to check it at night to verify Illuminance is registering a direct 0 as it should.
                                I have checked the current reading and I see the same no decimal. I also believe that if there was a decimal that test2 event wouldn't fire at all if it was never at zero. So personally I don't think its a decimal issue.

                                I have just created a 3rd test event now per logman's help. We will see if that fires tonight also. I have also added "do not re run for 10 hours" on the test1 event to prevent it from looping if it were to actually fire or become true (which it hasn't in the last 2 days).

                                Comment

                                Working...
                                X