Announcement

Collapse
No announcement yet.

Bug or Misunderstanding on My Part?

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

    Bug or Misunderstanding on My Part?

    I'm trying to code up a simple event which will set a virtual device to 'On' or 'Off' depending on whether the current day is a 'holiday' (as I define it). My first test is like this:

    Code:
    IF This event is MANUALLY triggered
    AND IF The date is ...
        12/25/2016
    
    THEN Control a Device
        Virtual Device Control Holiday Virtual Device      On
    If I make sure that my Virtual Holiday Device is set to off and then I manually execute this event, the event always changes to 'On'.

    I've tried this event with other conditions, such as if the day is the first Monday in September, and this does *not* turn the device on. It only seems to be a problem when I use the date setting. Before I report a bug, I just want to make sure that I'm not overlooking something obvious.

    Thanks.

    Jim

    #2
    Manually executing an event by pressing the play button ignores all of the conditions, slightly odd but that's the way it's always been. As such your event will always be true. In an ideal world there would be a button next to it that evaluated the conditions and then decided to run the event.

    Comment


      #3
      I run another event to run these types of events and check all conditions must be met. It's a roundabout way to do it, but it works.

      Comment


        #4
        Originally posted by mrhappy View Post
        Manually executing an event by pressing the play button ignores all of the conditions, slightly odd but that's the way it's always been. As such your event will always be true. In an ideal world there would be a button next to it that evaluated the conditions and then decided to run the event.
        You could easily mimick this by creating another event and telling it to run another event and honor it's conditions. Then you just click the "play" button.

        Obviously this would only ever be used for "testing" other events and their conditions, but you could keep it and just change the event to the one you want to test at that time.
        MeiAutomtion Home

        Comment


          #5
          Originally posted by waynehead99 View Post
          I run another event to run these types of events and check all conditions must be met. It's a roundabout way to do it, but it works.
          Like Minds
          MeiAutomtion Home

          Comment


            #6
            Ok, but then I don't understand why I have another similar event which behaves differently. In the other event, I have this:

            Code:
            IF This event is MANUALLY triggered
            AND IF The date is a specific day of the week of the month
                  Today is the Last Thursday of November
            
            OR IF This event is MANUALLY triggered
            AND IF The date is a specific day of the week of the month
                  Today is the Last Friday of November
            
            OR IF This event is MANUALLY triggered
            AND IF The date is a specific day of the week of the month
                  Today is the Last Monday of May
            
            OR IF This event is MANUALLY triggered
            AND IF The date is a specific day of the week of the month
                 Today is the First Monday of September
            
            THEN Control a Device
                 Virtual Device Control Holiday Virtual Device  On
            If I manually run this, the device stays off. However, if I add the date condition as the first condition it goes to on.

            Seems odd to me. What I'm trying to do is create an event that will never run on it's own, but will just be invoked from a previous event. The idea is the originating event, which will run once a day, will set the holiday device to OFF and then run this event which will then either turn the device on or off.

            That's what I'm attempting to do, anyway.

            Thanks!

            Jim

            Comment


              #7
              Originally posted by sirmeili View Post
              You could easily mimick this by creating another event and telling it to run another event and honor it's conditions. Then you just click the "play" button.



              Obviously this would only ever be used for "testing" other events and their conditions, but you could keep it and just change the event to the one you want to test at that time.


              I actually do this a lot in production. Example I have a goodnight button on my controller in the hall. If I push it, it evaluates 2 events and runs one of them based off conditions, like if my wife is already asleep before me, it won't light the path bright and the bedroom or if it's both of us going to bed at the same time, it does light up the bedroom. Keeps it simple to only have one button to push and let the house do what it thinks it needs to do.

              Comment


                #8
                Originally posted by sirmeili View Post
                You could easily mimick this by creating another event and telling it to run another event and honor it's conditions. Then you just click the "play" button.
                When you say "honor it's conditions" do you mean check the box which says 'Run Only If Other Event Conditions are TRUE"?

                As I indicated in my earlier reply, I am actually trying to use two events, where the first event resets the value to a known value and the second is used to update it. My tests were failing whether I ran from the first event or the second. However, I did change the first event to use the 'Run Only If Other Event Conditions are TRUE" and left everything else the same in my second event, and it seems to work the way I want. I think the terminology on some of this stuff isn't the clearest. :-)

                Thanks!

                Jim

                Comment


                  #9
                  Originally posted by jhowe View Post
                  I think the terminology on some of this stuff isn't the clearest. :-)
                  That's for sure. It's a lot like learning a new language that happens to use only words you are already familiar with, but the meanings are all different.
                  Mike____________________________________________________________ __________________
                  HS3 Pro Edition 3.0.0.548, NUC i3

                  HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                  Comment


                    #10
                    Bug or Misunderstanding on My Part?

                    An easier way to deal with it is to create an event that runs once a day, runs a script and evaluates the day and if it meets a condition to trigger for the holiday, turn your virtual device on and you could even further to list the holiday in the device. You would just add all the holidays you want monitored into it and only have one event to run.

                    Comment


                      #11
                      Originally posted by waynehead99 View Post
                      An easier way to deal with it is to create an event that runs once a day, runs a script and evaluates the day and if it meets a condition to trigger for the holiday, turn your virtual device on and you could even further to list the holiday in the device. You would just add all the holidays you want monitored into it and only have one event to run.
                      Yeah, I thought about going the script route and it would certainly be more flexible. I'll probably use what I'm using for a while and eventually move it to a script.

                      Thanks!

                      Jim

                      Comment


                        #12
                        Originally posted by Uncle Michael View Post
                        That's for sure. It's a lot like learning a new language that happens to use only words you are already familiar with, but the meanings are all different.
                        The more you use HomeSeer, the more you'll realize its worst than that -- its learning a new language that uses words you're already familiar with, but the meanings are different, nouns and verbs are swapped, and all the vowels are missing.

                        Its particularly horrid to use if you've got any programming experience at all -- because so many basic constructs (like if/else) are missing, much less having any reasonable ability to create things like state machines without a tangled mess of "goto" logic like you'd get from a ten year old writing BASIC in 1982. And, I think 90% of the "wtf, this doesn't mane sense" posts in here are from people struggling to create a basic state machine and realizing their already miserable amount of work is tripled because there's no concept of "else". Then you realize there'a also no concept of grouping conditionals, and now you have to cascade event calls three, four or more levels deep to deal with the lack of them.

                        Every time I go into the events garbage, I keep telling myself I'd save time long-run writing a plugin to use a workflow engine to manage the devices... and then I remember the plugin API is far worse, so back I go to the web interface...

                        Comment


                          #13
                          Originally posted by IAmDotorg View Post
                          The more you use HomeSeer, the more you'll realize its worst than that -- its learning a new language that uses words you're already familiar with, but the meanings are different, nouns and verbs are swapped, and all the vowels are missing.



                          Its particularly horrid to use if you've got any programming experience at all -- because so many basic constructs (like if/else) are missing, much less having any reasonable ability to create things like state machines without a tangled mess of "goto" logic like you'd get from a ten year old writing BASIC in 1982. And, I think 90% of the "wtf, this doesn't mane sense" posts in here are from people struggling to create a basic state machine and realizing their already miserable amount of work is tripled because there's no concept of "else". Then you realize there'a also no concept of grouping conditionals, and now you have to cascade event calls three, four or more levels deep to deal with the lack of them.



                          Every time I go into the events garbage, I keep telling myself I'd save time long-run writing a plugin to use a workflow engine to manage the devices... and then I remember the plugin API is far worse, so back I go to the web interface...


                          Hmmm. Maybe ask for your money back?

                          Comment


                            #14
                            Originally posted by waynehead99 View Post
                            Hmmm. Maybe ask for your money back?
                            Its crossed my mind. The problem is, because of the certification of software to Z-wave controllers, you either are stuck with SmartThings (far too simple), Vera (which works well, and custom devices are easy to write, once you get over the need to use Lua, but has no mobile UI options that work beyond basic devices), or HomeSeer. HomeSeer is such a bizarre system -- overly complicated in some places, bizarrely oversimplistic in others. It has a feel of a software system grafted onto repeatedly, using a very old set of tooling, without anyone stopping and saying "wait a second, lets think about this architecture". So you get some bits that are pretty clever, if buggy, like the transport design for how plugins interact with the server. But then you get things like the actual APIs the plugins are written to, which feel like the kind of interfaces someone would've designed before the advent of object-oriented programming (and made worse by the way older VB code gets projected into the more structured IL of .Net today). And things like HSTouch, which is a pretty standard UI builder like you'd see in 2005 (property grids were huge back then!), but hindered in 2016 where there's both better designer models, and better underlying UI frameworks that are cross platform. The event mess is a real head-scratcher, though... especially the lack of an else clause. That just feels like the trap a lot of developers get into where you find a work-around for something you haven't finished, actually finishing is something you never get to and years later you're used to the weirdness and don't think its as big a problem as it actually is.

                            So, short-short, as much of a mess as it is, and as buggy as HSTouch is, if you want a mobile interface to devices more complicated than on/off/dim, you're stuck with it.

                            Comment


                              #15
                              Originally posted by IAmDotorg View Post
                              Its crossed my mind. The problem is, because of the certification of software to Z-wave controllers, you either are stuck with SmartThings (far too simple), Vera (which works well, and custom devices are easy to write, once you get over the need to use Lua, but has no mobile UI options that work beyond basic devices), or HomeSeer. HomeSeer is such a bizarre system -- overly complicated in some places, bizarrely oversimplistic in others. It has a feel of a software system grafted onto repeatedly, using a very old set of tooling, without anyone stopping and saying "wait a second, lets think about this architecture". So you get some bits that are pretty clever, if buggy, like the transport design for how plugins interact with the server. But then you get things like the actual APIs the plugins are written to, which feel like the kind of interfaces someone would've designed before the advent of object-oriented programming (and made worse by the way older VB code gets projected into the more structured IL of .Net today). And things like HSTouch, which is a pretty standard UI builder like you'd see in 2005 (property grids were huge back then!), but hindered in 2016 where there's both better designer models, and better underlying UI frameworks that are cross platform. The event mess is a real head-scratcher, though... especially the lack of an else clause. That just feels like the trap a lot of developers get into where you find a work-around for something you haven't finished, actually finishing is something you never get to and years later you're used to the weirdness and don't think its as big a problem as it actually is.

                              So, short-short, as much of a mess as it is, and as buggy as HSTouch is, if you want a mobile interface to devices more complicated than on/off/dim, you're stuck with it.
                              To me an else in homeseer events would not work. Events are evaluated a lot, so are you saying if the trigger is true, but the conditions are false, then the else fires? Or every time the trigger is false does the else fire? If it's the latter then you would have it constantly running the else. If it's the former, I think it would be confusing as hell to users

                              Right now you have the option of creating an event and if you want an else you can just create another event that would act like an else.

                              Of course you could just write scripts instead. Set it to run based on a trigger and do further evaluations in the script. For instance of you want to have an else for "when x changed and become y", you could change it to "when x changed" then in the script do your logic for if and else.

                              Sent from my XT1585 using Tapatalk
                              MeiAutomtion Home

                              Comment

                              Working...
                              X