Announcement

Collapse
No announcement yet.

Event creation

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

    Event creation

    Hi,

    Can someone point me to the solution for event creation.
    I would like to be able to create event for my garage heater. I have created virtual device as heat setpoint and i can change it via HSTouch. Now, i need event that will turn furnace on when garage temp gets less than setpoint value. In HS event list, i can turn on heater if temp falls below certain temp value, not below virtual device value that can be changed.

    Any help is appreciated.
    Best regards

    #2
    You can easily accomplish this with the Easy Trigger plug-in. It can compare devices among many other things. You can also do this with a simple script. You could also put an actual Z-Wave thermostat in the garage. SteveMSG’s V-Stat plug-in can also do it.

    Comment


      #3
      Z thermostat is roughly $100, was hoping for something done with my hands.
      I have installed Easy Trigger plugin and forgive my stupidity, i can't find anything remotely suitable to do what i need.
      Also, i'm puzzled by fact that people with programming skills see everything " easy "

      I'm willing to compensate anyone who can teach me so things like this are "easy" for me too.
      Had similar problem with Costco light switches. I flashed firmware, can see it through IP and got stuck on MQTT. Quite disappointing on my end.
      I'm not stupid person, but i have no experience in scripting and things like that.

      Unfortunately, i cant do anything with ladder logic that i'm familiar with.

      So, can you help me?

      Comment


        #4
        Originally posted by Tim View Post
        Z thermostat is roughly $100, was hoping for something done with my hands.
        I have installed Easy Trigger plugin and forgive my stupidity, i can't find anything remotely suitable to do what i need.
        Also, i'm puzzled by fact that people with programming skills see everything " easy "

        I'm willing to compensate anyone who can teach me so things like this are "easy" for me too.
        Had similar problem with Costco light switches. I flashed firmware, can see it through IP and got stuck on MQTT. Quite disappointing on my end.
        I'm not stupid person, but i have no experience in scripting and things like that.

        Unfortunately, i cant do anything with ladder logic that i'm familiar with.

        So, can you help me?
        I think @rparade was talking about using the "Easy Trigger: A Device's Value is ..." trigger (or condition), which has a number of options. For its option, choose "Comparison between two device values becomes true". You then use this to compare the temperature sensor in your garage with your virtual device. If its true, you then turn on your heater.

        You could also do this using a recurring trigger - for example, triggering the event every 5 minutes, but then doing the comparison as an "and" condition. I generally prefer using a recurring condition for something like this as it better recovers from a change that could occur, e.g., while you re rebooting HomeSeer or if something else happens that HomeSeer "misses" the event.

        Finally, I think this can also be done using "Easy Trigger: Set Device to Expression" as the Action. In the expression part, you would enter an "IF" statement to compare your two devices where you use the $$DVR:reference: function to pull in the value of your devices. ** Note the colon : is placed both before and after the device reference number!.

        For example, where XXX is the HomeSeer reference for a first device, and YYY is the HomeSeer reference for the second device, the "expression":
        if( $$DVR:XXX: < $$DVR:YYY: , 0, $DEVICEVALUE)

        Would change the controlled device to 0 if device XXX was less than YYY, else it sets the controlled device to its current value $DEVICEVALUE (in other words, it makes no change).

        *Note the odd / inconsistent syntax - there are two $$ before DVR, but only one before DEVICEVALUE *

        Similarly, assuming the heater (the controlled device) turns on when sent 255 and off when sent 0, the expression:
        if( $$DVR:XXX: < $$DVR:YYY: , 255,0 )

        Turns it on ('255') if device XXX < device YYY, else it turns it off ('0').


        When using the 'Set Device to Expression" action, I also like to select its "Advanced" Function and choose "Send command only if expression results in a new value"

        Comment


          #5
          [QUOTE=jvm;n1345946]

          Hi jvm !!!

          Thank you kindly for your explanation of your suggestion. Definitely will " attempt " to do what you suggested.
          Will let you know how it goes.

          I just don't get why this kind of logic is not included in HS or some other plugin.
          I can't be the only one that is trying to use it but doesn't know how. Can't I ???


          Just by reading your instructions, i feel that i'm missing 10 years of school.

          Comment


            #6
            I just would like to point out that you gave RPrade no information on your background. He can't read your mind so he responds in the best way he knows. RPrade gives back significantly to the homeseer community and it is greatly appreciated. I understand your frustration but I think we can be better.

            I wrote a script for you that runs for approximately 24 hours. You create an event that starts at a specified time and the script will exit 15 minutes prior to the end.

            -----------------------------------------------------------------------------------------------------------------------------------
            Sub Main()

            Dim DevRef, DevRef1, DevRef2, Minute As Integer
            Dim DevVal, DevVal1, DevVal2 as Double Integer

            DevRef = hs.GetDeviceRefByName("NAME OF YOUR VIRTUAL DEVICE")
            DevRef1 = hs.GetDeviceRefByName("NAME OF YOUR TEMPERATURE DEVICE")
            DevRef2 = hs.GetDeviceRefByName("NAME OF YOUR HEATER CONTROL DEVICE") 'The name of the devices must be in double quotes
            Minutes = 0

            Do while Minutes < 1425

            DevVal = hs.DeviceValueEx(DevRef) ' Get the virtual device value
            DevVal1 = hs.DeviceValueEx(DevRef) ' Get the temperature device value

            if (DevVal - DevVal1) <= 0 Then

            hs.SetDeviceValueByRef(DevRef2, XXX, True) 'XXX is the value to turn on the heating device

            Else

            hs.SetDeviceValueByRef(DevRef2, YYY, True) 'YYY is the value to turn off the heating device

            End If

            hs.WaitSecs(900) 'Wait 15 minutes before you check again.

            Minutes = Minutes + 15 'Keep track of the minutes

            Loop

            End Sub

            ​​​​​​​------------------------------------------------------------------------------------------------------

            Here is what the event would look like. The name would obviously change to whatever you like.

            Click image for larger version

Name:	Screenshot from 2019-12-11 09-59-26.png
Views:	154
Size:	36.7 KB
ID:	1345965

            I would be glad to help you in any way possible to get this implemented. Just PM me and we can arrange. No Charge as this is a self help community.

            Regards

            Jon

            Comment


              #7
              Originally posted by Tim View Post
              I have installed Easy Trigger plugin and forgive my stupidity, i can't find anything remotely suitable to do what i need.
              I'm not stupid person, but i have no experience in scripting and things like that.
              So, can you help me?
              Your frustration is understandable.
              If it helps at all, HomeSeer is in the midst of a significant transition. For many years it's been aimed primarily at serious home automation hobbyists, with the understanding that it requires new users to climb a significant learning curve. In order to expand its user base, it is being modified (at least at the marketing level) to appeal to a wider audience that does not bring the experience and mind set of its traditional users.
              In addition, the highly variable nature of home automation tasks requires HS to be very flexible, meaning that it must offer a wide variety of options that are inherently difficult to describe in a compact, easily digestible format.

              At present, the documentation does not yet fully address the needs of many in the target new user base - as you've clearly noticed.
              The good news is that this community has many members who are more than willing, even anxious, to help you understand the "mysteries" of the HS environment. Asking questions is welcome and encouraged, but it may be necessary to seek additional information if you find the initial responses make too many assumptions about your background and experience with HS. Just be persistent and ask for clarification wherever necessary, and include as much detail about the problem you want to solve as you can. Screen shots of events that don't work the way you want are also extremely useful in helping the person responding grasp the problem you want help with.

              Being proficient with HS is a bit like being proficient with a foreign language. Fluency takes time and effort.

              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


                #8
                Hi Jon,

                It was not my intention to neither judge neither criticize anyone on this forum or any other. Im grateful for any help i can get.
                RPrade, my apologies if i have said something that could be understood as hurtful.

                My background was electrical engineering until economy turned. now, not so much.

                I will try to follow your advice .
                Best Regards
                Tim

                Comment


                  #9
                  Originally posted by Tim View Post
                  [I just don't get why this kind of logic is not included in HS or some other plugin.
                  I can't be the only one that is trying to use it but doesn't know how. Can't I ???.
                  Tim,

                  rprade did suggest in message #2 that you look at the SDJ-VStat plugin.
                  https://forums.homeseer.com/forum/th...vstat-stevemsj

                  It provides full featured virtual thermostats which might be what you are looking for. If not then nothing lost.
                  You could set up a full 7 day scheduled virtual thermostat that uses your garage temp sensor as an input and controls your heater On/Off.

                  Steve

                  Comment


                    #10
                    Originally posted by Uncle Michael View Post
                    Your frustration is understandable.
                    If it helps at all, HomeSeer is in the midst of a significant transition. For many years it's been aimed primarily at serious home automation hobbyists, with the understanding that it requires new users to climb a significant learning curve. In order to expand its user base, it is being modified (at least at the marketing level) to appeal to a wider audience that does not bring the experience and mind set of its traditional users.
                    In addition, the highly variable nature of home automation tasks requires HS to be very flexible, meaning that it must offer a wide variety of options that are inherently difficult to describe in a compact, easily digestible format.

                    At present, the documentation does not yet fully address the needs of many in the target new user base - as you've clearly noticed.
                    The good news is that this community has many members who are more than willing, even anxious, to help you understand the "mysteries" of the HS environment. Asking questions is welcome and encouraged, but it may be necessary to seek additional information if you find the initial responses make too many assumptions about your background and experience with HS. Just be persistent and ask for clarification wherever necessary, and include as much detail about the problem you want to solve as you can. Screen shots of events that don't work the way you want are also extremely useful in helping the person responding grasp the problem you want help with.

                    Being proficient with HS is a bit like being proficient with a foreign language. Fluency takes time and effort.
                    Hi Michael,

                    Thank you for comments,
                    You are right about the most. I'm not frustrated as much as feeling too behind. I have spent most part of my life working with my hands with electronics but never being involved with programming beside ladder logic. .

                    Comment


                      #11
                      How can we help?

                      Comment


                        #12
                        Originally posted by AllHailJ View Post
                        How can we help?
                        Hi,

                        Where to start?
                        Which programming language is required for HS?
                        Example ( end result and how to get there )

                        Thanks everyone.

                        Comment


                          #13
                          Homeseer uses visual basic and c#. If you go to Tools --> Help -->Homeseer help file you can start to get a feel for what they are doing. The scripting section is the most helpful for programming.

                          I posted a Visual Basic Script in the body of my message #6 that was meant as a guide for you.

                          You can look up visual basic on google and can get an idea of the structure and operators.

                          The scripts go in the HomeSeer/scripts directory.

                          For the most part you can't really break anything. You will just get alot of errors or things wont run. If you are running on a windows machine you can download visual studio or you can download an editor such as notepad++ to write the scripts with.

                          Would be glad to have a phone call if you are more comfortable having the discussion. PM me and I will send you my number or you can send me yours.

                          I am retired so I have time to spend.

                          Comment


                            #14
                            I have no idea what someone's skill level or level of comfort with HomeSeer Events is. I threw out a handful of options to accomplish what was asked for in the first post. Only through dialogue can we establish what a user is comfortable with. Since the OP indicated that a Virtual setpoint Device was built, I thought there was a certain degree of understanding of how HomeSeer works. There is no native Trigger or Condition in HomeSeer that can compare two devices.

                            As I mentioned above Steve's SDJ-VStat plugin is a purpose built virtual thermostat program. With Easy Trigger it is also easy to compare values between devices and to allow an Event to run when that comparison is true. I have created a virtual setpoint Device, which I assume is similar to yours. I also have a OneWire temperature sensor in the garage.

                            Click image for larger version  Name:	capture.png Views:	0 Size:	14.4 KB ID:	1346055

                            All HomeSeer Events need to be triggered. For temperature monitoring, the logical trigger would be if the temperature device has changed. For these Events, I chose to look at whether it was "Set or Changed". In HomeSeer a device can have its value "set", even if the value is no different. For these Events, I want the Event to Trigger any time that device is acted upon. So now we are triggering the Event. Next we want to look at the comparison between the temperature device and setpoint device. For this I used the Easy Trigger "Comparison between 2 devices" Condition. For the heat "On" Event, we want it to turn on when the temperature is below the setpoint and for the "Off" Event we want the heat off when it equals or exceeds the setpoint. To keep from cycling the heat too frequently, you want it to drop some amount below the setpoint, for these test Events I chose to turn the heat On when the temperature falls 2 degrees below the setpoint. I also habitually put the controlled device in as a Condition, to limit the number of times an Event can run. If the Heat is On it can be turned Off or if the heat is Off it can be turned On.

                            Click image for larger version

Name:	capture1.png
Views:	142
Size:	75.6 KB
ID:	1346076

                            This can also be done with a simple script, but in my system I make every effort to accomplish things through Event actions, only using a script when absolutely necessary. I only use a handful of scripts. The control of a garage heater is a perfect use case for Easy Trigger's comparison Condition.

                            Comment


                              #15
                              OK,
                              Thank you, will try it when i get home

                              Comment

                              Working...
                              X