Announcement

Collapse
No announcement yet.

Combining multiple AND +OR ... difficult or am I missing something basic?

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

    Combining multiple AND +OR ... difficult or am I missing something basic?

    Moving from Vera so learning the HS way... In Vera this is dead simple in a single line of PLEG code. Seems like Homeseer makes this way more difficult.

    Here's what it looks like in PLEG...
    !Day AND ((KitchenLights_level < 50) or (MudRoomLights_level < 50)) AND (GarageDoorsOpen or MudroomDS or GarageMS or GarageMSmulti)


    HS Conditions need to be like...

    Night (20 minutes before Sunset) until Day (20 min before Sunrise)
    AND
    Motion Sensor = 1 OR Motion Sensor 2 = 1 OR Garage Doors =1
    AND
    Kitchen lights < 50% OR Mudroom lights <50%
    THEN
    Mudroom Lights = 50%

    thx for the help!

    #2
    You can express this logic in the form of event conditions, but it will be cumbersome to put it all in one event. I would do what you are describing using multiple events. One pair of events would set a virtual device value based on the state of the motion sensors and the garage door. Another pair would set a different virtual device value based on the light levels in the kitchen and mud room. Then I'd use those device values as conditions in the event to set the mudroom light level to 50%. That may seem inefficient, but I often find that these kinds of "bookkeeping" virtual devices turn out to be very useful as conditions on other events as well.

    I have no idea what PLEG is, but if it is important that the logic be compactly expressed, you can use vb.net to evaluate these conditions in a very compact form; in fact, with virtually the same structure as you illustrate. Your event would run a script. The script would evaluate the conditions and execute the change in light level if needed.
    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


      #3
      Originally posted by Ltek View Post
      Moving from Vera so learning the HS way... In Vera this is dead simple in a single line of PLEG code. Seems like Homeseer makes this way more difficult.
      PLEG has ruined all of us Vera refugee's, it was so simple to create advance logic in PLEG I hope you are not using sequences, there is no HS equivalent.

      My solution so far has been to keep the advanced logic in Vera and move the simple stuff over to HS, not ideal, but practical.

      If you want to see what is happening in both systems use Imperihome.

      Comment


        #4
        Originally posted by Uncle Michael View Post
        You can express this logic in the form of event conditions, but it will be cumbersome to put it all in one event. I would do what you are describing using multiple events. One pair of events would set a virtual device value based on the state of the motion sensors and the garage door. Another pair would set a different virtual device value based on the light levels in the kitchen and mud room. Then I'd use those device values as conditions in the event to set the mudroom light level to 50%. That may seem inefficient, but I often find that these kinds of "bookkeeping" virtual devices turn out to be very useful as conditions on other events as well.

        I have no idea what PLEG is, but if it is important that the logic be compactly expressed, you can use vb.net to evaluate these conditions in a very compact form; in fact, with virtually the same structure as you illustrate. Your event would run a script. The script would evaluate the conditions and execute the change in light level if needed.
        Looks like I'll need to use VB script for most things.

        Thank you for explaining... and WOW is that massively inefficient, cumbersome, and stuck in the '90s was of doing things (finding this is true for most of Homeseer)

        The concept of Event Groups and the way we can choose many condition types is really nice... just poor execution of the event rules engine structure.

        Unfortunately HS rules engine was fine back in the old X10 days when things were much simpler. But I remember having to use VB script back then too. I'm pretty amazed HS hasnt been updated to handle branching logic with proper And/Or grouping.

        btw, PLEG is a $5 plugin for Vera... which looks to be more powerful and efficient than Homeseer. Just wish Vera was more stable.

        Comment


          #5
          Originally posted by Black Cat View Post
          PLEG has ruined all of us Vera refugee's, it was so simple to create advance logic in PLEG I hope you are not using sequences, there is no HS equivalent.

          My solution so far has been to keep the advanced logic in Vera and move the simple stuff over to HS, not ideal, but practical.

          If you want to see what is happening in both systems use Imperihome.
          Are you using any method to communicate status between HS & Vera? I really don't want to run 2 systems as my logic is pretty complex in most cases.

          I'm really starting to think Vera is better than Homeseer in most things (I'm starting a list)... except stability. HS reminds me of Win95(in some cases Win 3.1), Vera is more like Win7 ... far as how out dated the UI concepts and way things are done in the app.

          Comment


            #6
            There was a post last week in which a claim was made that it was possible to use Vera and HS in a Master/Slave combination.
            No one has posted any further details on how this was accomplished.
            In theory it should be possible with http calls, I think Imperihome uses this communication method, I but have no idea how to code it.

            I agree with you, HS is positively stable in comparison to to UI7, the setbacks only become apparent if you have been a Vera user and used to PLEG logic.

            Comment


              #7
              Originally posted by Black Cat View Post
              There was a post last week in which a claim was made that it was possible to use Vera and HS in a Master/Slave combination.
              No one has posted any further details on how this was accomplished.
              In theory it should be possible with http calls, I think Imperihome uses this communication method, I but have no idea how to code it.

              I agree with you, HS is positively stable in comparison to to UI7, the setbacks only become apparent if you have been a Vera user and used to PLEG logic.
              I was the person who got HS to be Secondary... the problem is that only links it to Zwave devices, it does not at all allow Vera<->HS3 communications.

              There are many other deficiencies in HS3 I'm finding beyond the Event logic. Lack of built-in House Modes, lack of sequences, multiple archaic UI problems in every screen, etc. If PLEG ran in OpenLUUP it might best all HA systems.

              Comment


                #8
                Agreed OpenLuup would be the best solution.
                I asked RTS if he could have look at both HS and OpenLuup, he was initially interested in OpenLuup, but gave up as there was a conflict in programming. No response to the HS request.

                Would you mind sharing how you got HS to be a Vera secondary?

                Comment


                  #9
                  Originally posted by Ltek View Post
                  Thank you for explaining... and WOW is that massively inefficient, cumbersome, and stuck in the '90s was of doing things (finding this is true for most of Homeseer)
                  I agree. HS is extremely powerful, but if you want to do something fairly simple, the versatility of HS can be more of a burden than a help. That said, there are several former Vera users on the board who find HS to be much easier to use once they gained some experience and were able to reorient their strategy to take advantage of the added capability.

                  I have no experience with Vera, but formerly used Stargate. As Vera, Stargate has some significant advantages and using it together with HS has proven quite helpful. Stargate actions can be triggered by ASCII commands, and it can send ASCII messages as actions, so it is very easy to use with HS. Does Vera have any similar messaging capability?
                  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
                    Originally posted by Uncle Michael View Post
                    Stargate actions can be triggered by ASCII commands, and it can send ASCII messages as actions, so it is very easy to use with HS. Does Vera have any similar messaging capability?
                    With Vera, Devices or Scenes (events/actions) values can be set/triggered using HTTP commands. From my reading, it looks like HS3 looks like we might be able to do it via JSON and/or ASCII, i need to read up on these...
                    http://homeseer.com/support/homeseer...nk/default.htm

                    I've also seen info MQTT in Homeseer, but I cant find a good How-To on it. Vera also has MQTT plugin so this might be a better way, not sure.

                    Comment


                      #11
                      Seems to me that if you are comfortable coding PLEG, learning to code scripts in vb.net should be an easy transition, and gives you maximum flexibility.

                      Here is a tool to help:

                      http://tenholder.net/tenWare2/tenScripting/default.aspx


                      If you use HS3, make sure you download tenScripting3

                      tenholde
                      tenholde

                      Comment


                        #12
                        Originally posted by Black Cat View Post
                        PLEG has ruined all of us Vera refugee's, it was so simple to create advance logic in PLEG I hope you are not using sequences, there is no HS equivalent.

                        My solution so far has been to keep the advanced logic in Vera and move the simple stuff over to HS, not ideal, but practical.

                        If you want to see what is happening in both systems use Imperihome.
                        I'm over here researching Homeseer (having been had Vera for 4 years) and decided to search for PLEG knowing I'd see some comparisons. What I was hoping to find was people saying it was so much easier to do things in Homeseer than in Vera w/PLEG. From your statement that isn't the case.

                        Off and on for 4 months I've been trying to get my first simple thing in PLEG to work and still cant figure it out. Before trying PLEG I have done so much cutting and pasting in LUA code people post on forums (since I cant seem to understand how to write it myself) to do things that I finally jumped on trying it out. Since it doesnt look anything like any of the example documents, which Ive read those documents over and over, I cant make heads or tails of how to make it do anything other than give me an error. I'm good at that.

                        it seems ridiculous to me that I can configure really high end integrated Access control, CCTV, intrusion systems to do all manner of things automatically based on events, but I cant get a "home automation" system to do much of anything beyond simple IF>THEN without having to type code. Why aren't the interfaces and logic on any of these designed for you to actually understand what you are asking it to do?

                        Like I said, a lot of people came on the Vera boards talking about how much better Homeseer is.... but if I still have to figure out how to write code, and you say it isn't even as good as the plugin I cant make do anything....it doesn't seem better.

                        Comment


                          #13
                          Originally posted by Priest View Post
                          I'm over here researching Homeseer (having been had Vera for 4 years) and decided to search for PLEG knowing I'd see some comparisons. What I was hoping to find was people saying it was so much easier to do things in Homeseer than in Vera w/PLEG. From your statement that isn't the case.



                          Off and on for 4 months I've been trying to get my first simple thing in PLEG to work and still cant figure it out. Before trying PLEG I have done so much cutting and pasting in LUA code people post on forums (since I cant seem to understand how to write it myself) to do things that I finally jumped on trying it out. Since it doesnt look anything like any of the example documents, which Ive read those documents over and over, I cant make heads or tails of how to make it do anything other than give me an error. I'm good at that.



                          it seems ridiculous to me that I can configure really high end integrated Access control, CCTV, intrusion systems to do all manner of things automatically based on events, but I cant get a "home automation" system to do much of anything beyond simple IF>THEN without having to type code. Why aren't the interfaces and logic on any of these designed for you to actually understand what you are asking it to do?



                          Like I said, a lot of people came on the Vera boards talking about how much better Homeseer is.... but if I still have to figure out how to write code, and you say it isn't even as good as the plugin I cant make do anything....it doesn't seem better.
                          cheeryfool

                          Comment


                            #14
                            @Priest
                            I hope this will help you..

                            I moved from 5 years with Vera (+PLEG) and had very complex logic, notifications ,etc -- PLEG and Vera Alerts is very powerful -- much more powerful than Homeseer's engine (even with plugins like Easy Trigger) and allowed me to create it with much less effort.

                            But if you are not doing complex things, Homeseer is very easy and works well. On the flip-side, if you are not doing complex stuff, why are you moving away from Vera? I did because my HA system was too much for Vera's OS to handle. If Vera was stable under heavy load, I'd have stayed.

                            It been a few months and I still dont have all my Vera system replicated in Homeseer... notifications and security alerts are left. Homeseer doesnt have a notification system at all, so unlike how easy it was with Vera - its a lot of work in Homeseer. Not hard with Pushover, just a lot of work.

                            If you are creating complex logic, read on...

                            There are things Homeseer simply cannot do; sequencing events (event ordering, dependencies, etc) and it is not efficient with If/Then branching (cant go beyond a single level) and doesnt use And/Or efficiently... anything beyond the basics takes a ton more effort than Vera did with PLEG. All of these with PLEG are dead simple.

                            PLEG has a learning curve. But the learning curve is 100x smaller than VB or LUA. If you had trouble learning with PLEG you are not meant to code -- thats fine.

                            Comment


                              #15
                              I'm doing a lot of little stuff with Vera using lua now. The basics like:
                              When the front door is unlocked, check the light level in the living room, adjust to a value based on the light level.

                              Turn on the front porch and driveway lights when one of us trips the geofence coming home if 40 minutes before sunset until 40 minutes after sunrise.

                              Lots of grouped actions like going to bed, shut everything down and adjust thermostat, or at my daughter's bed time turn on her white noise machine, turn off other lights around her room.

                              The scene in trying to accomplish with PLEG for my first first into it is to replace one I want to expand in LUA.
                              right now if I trip the motion in the hall when the house is in night mode it checks the time, if before 5:30am it turns on a dim light, if after 5:30 am it brings the house to home mode and turns on two lights in separate rooms.

                              I want it now to: if in night mode and the hall motion trips and a virtual switch is off, turn on the dim light. If in night mode and a virtual switch is on and the motion trips, bring to home mode and turn on those lights. I'm triggering that virtual switch with Tasker based on my phone being cell near for home, plugged in, and face down. So when I get it in the morning it trips the switch. That is tested and working.

                              Comment

                              Working...
                              X