Announcement

Collapse
No announcement yet.

IF-THEN-ELSE Action

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

    #16
    Originally posted by jvm View Post

    Alternatively, if you go ahead with the If ... Then ... Else as you've proposed -- i.e., where the Actions are (generally) Easy Trigger actions -- I'd suggest also including the ability to run other Events as another option for the reasons I mention.
    Yes that's a good idea, so I will probably add a "Run Event" action as well as a "Control Device" action because this is probably the most used one, all other could be achieved using a "run event" action

    Comment


      #17
      Originally posted by spud View Post

      Yes that's a good idea, so I will probably add a "Run Event" action as well as a "Control Device" action because this is probably the most used one, all other could be achieved using a "run event" action
      Thanks for all the time you pour into this great PI.

      Option to respect or ignore event conditions would be a great detail to include, if possible.
      -Wade

      Comment


        #18
        Originally posted by spud View Post

        I would make this first available to easytrigger's conditions and actions, not triggers. The IF in a IF-THEN-ELSE action would always be a condition not a trigger.
        But yes I think I would need to add some native basic condition like "A device's value is...", but I don't plan to re-code all of them.
        Yes conditions, sorry, triggers make no sense lol

        Comment


          #19
          Originally posted by spud View Post

          I would make this first available to easytrigger's conditions and actions, not triggers. The IF in a IF-THEN-ELSE action would always be a condition not a trigger.
          But yes I think I would need to add some native basic condition like "A device's value is...", but I don't plan to re-code all of them.
          Spud lets go to risk and ask him to open source the event engine, if they are willing we can do some pretty useful stuff here. Events is not their core IP, if anything HomeSeer is a driver (Zwave) company so they may be willing. And if not open source, perhaps close sourced to a few of us.

          Comment


            #20
            Originally posted by spud View Post

            Yes that's a good idea, so I will probably add a "Run Event" action as well as a "Control Device" action because this is probably the most used one, all other could be achieved using a "run event" action
            Another clarification -- I'm assuming the "Run Event" would behave like HS's current Run Event Action in that it would have an option "Only If Other Event Conditions Are True". This would allow you to use Event called by the Then or Else clause to created nested If... Then .. Else clauses; that is, the "Then" or "Else" section would each be able to run another Event with its own If...Then...Else and they, in turn, could call other events with If...Then...Else. Etc.

            Comment


              #21
              Having this would be super helpful, I can then finally convert my advanced scripts to be a bit more UI friendly for editing.

              Comment


                #22
                Any update on this? If Then Else is pretty basic and I am still surprised that it is not part of the basic event options. Once you have if then else, a case statement is easy simply a bunch of if then else else else.

                Comment


                  #23
                  I would love to see this! I just moved from HS2 to HS3 and trying to use the group conditions is the dumbest thing I have ever seen. I hope Homeseer fixes this major bug in their system.

                  Comment


                    #24
                    Originally posted by bsobel View Post

                    Spud lets go to risk and ask him to open source the event engine, if they are willing we can do some pretty useful stuff here. Events is not their core IP, if anything HomeSeer is a driver (Zwave) company so they may be willing. And if not open source, perhaps close sourced to a few of us.
                    I strongly agree. Although I have always been a strong advocate of Easy Trigger -- I sing its praises regularly -- I believe that, ultimately, the best course is to rework the event engine. Considering that even relatively simple event bugs such as event triggers around midnight have been languishing for lengthy periods, and noting that HS appears much more interested in mobile applications than core event processing development, I'd guess that HS might decide that (semi?) open source of the event engine could turn out win-win for everyone involved.

                    If this proposal ever gains any traction, I would hope to be a substantial contributor. Until then, any plug-in support of If-Then-Else would be helpful.

                    Comment


                      #25
                      I would love to see the event engine written to understand IF-THEN-ELSE. Having to create duplicate/triplicate events to get similar behavior has been frustrating as a HomeSeer user.

                      Comment


                        #26
                        HS4's "Conditional Action" feature seems to address "If-then-else" type actions, though it won't be available for a while (HS says 2020), so I'm assuming at least a year.

                        https://homeseer.com/hs4-smart-home-...tion-software/

                        Comment


                          #27
                          Originally posted by bsobel View Post

                          Spud lets go to risk and ask him to open source the event engine, if they are willing we can do some pretty useful stuff here. Events is not their core IP, if anything HomeSeer is a driver (Zwave) company so they may be willing. And if not open source, perhaps close sourced to a few of us.
                          I highly doubt HS would be willing to do this. While you are right that HS doesn't seem to pay much attention to event engine, this is AT THE CORE of home automation. I really expect them to add some pretty basic features like set device to another device and toggle device. There is still plenty of reason to by the EasyPlugin, though.

                          Having said that, maybe HS would be willing to open this part of the code to spud so he can integrate his plugin (and future additions) into HS4. He would be paid as a contractor for this initial effort of moving his plugin into their code (it's work he already did so the extra work to move into HS4 code needs to be paid) plus future revenue based on past sales of his plugin. That would be a win for everybody.

                          Comment


                            #28
                            spud Your initial proposal would work great for me. I am controlling some 10 audio zones and for each I have volume +1, volume -1, volume +5, volume -5, pause, play. There might be more in the future. So I am looking at some 60+ events. With your if-then-else I could do something like

                            If EventEventVolumePlus1
                            Then EasyTrigger: IF..THEN..ELSE
                            If EasyTrigger: A Device's Value is... VirtualDeviceSelectedZone Is LivingRoom
                            EasyTrigger: Set Device To Other Device LivingRoomVolume = LivingRoomVolume +1
                            If EasyTrigger: A Device's Value is... VirtualDeviceSelectedZone Is Office
                            EasyTrigger: Set Device To Other Device Office = Office +1
                            etc.

                            Did you decide to implement this and if so at what stage is it? I would be gladly beta test such a plugin.

                            Comment


                              #29
                              Originally posted by jvm View Post
                              HS4's "Conditional Action" feature seems to address "If-then-else" type actions, though it won't be available for a while (HS says 2020), so I'm assuming at least a year.

                              https://homeseer.com/hs4-smart-home-...tion-software/
                              I was unaware of the addition of "conditional events" in HS4. It is likely I will remain so, as the term has been removed from the above URL text!
                              HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
                              Home Assistant 2024.3
                              Operating System: Microsoft Windows 11 Pro - Desktop
                              Z-Wave Devices via two Z-Net G3s
                              Zigbee Devices via RaspBee on RPi 3b+
                              WiFi Devices via Internal Router.

                              Enabled Plug-Ins
                              AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

                              Comment


                                #30
                                rjh Are you still planning to implement the "conditional action" feature in HS4?

                                Comment

                                Working...
                                X