Announcement

Collapse
No announcement yet.

Trigger Event from text value?

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

    Trigger Event from text value?

    I can't figure out how to trigger an event based on the text in the Description device. WeatherXML had variables that I could check contains. How to do it with AK Weather? I need to turn my sidewalk snow mats on if Description contains "snow" or "flurry".

    #2
    If you have the Easy Trigger plugin it has a string based Trigger. The “String” is where long descriptions are stored.

    I use 3 virtual devices

    Click image for larger version

Name:	1C14C35D-EC7F-4733-A452-46829C5D034A.jpg
Views:	150
Size:	19.5 KB
ID:	1578167

    and 6 events

    Click image for larger version

Name:	C4F60F7D-9B24-44ED-838B-F01BC81D8235.jpg
Views:	162
Size:	30.8 KB
ID:	1578166

    each looks to the description of the forecast day

    Click image for larger version

Name:	1FF68E85-4A21-41F5-B311-E1822CF1897B.jpg
Views:	151
Size:	31.3 KB
ID:	1578168
    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      HS doesn't have the trigger based on the device string, only the value. Depending on the provider you can use the device value, i.e. AerisWeather, Visualcrossing, YR, but I don't think it's reliable, especially for snow.

      Comment


        #4
        The typical mechanism provided by HS for text-oriented triggers is with Value Status Pairs. In essence a text string is assigned a numeric value. Different strings will have different values. A related mechanism is used to associate icons with a number. When a trigger is setup it will show the text string (Status) to the user so in general the user is unaware of the Device Value that is really being used by the HS event trigger engine.

        It depends upon the plug-in developer providing support for VSP and VGP rather than just stuffing text in Device String.

        Comment


          #5
          Originally posted by Michael McSharry View Post
          The typical mechanism provided by HS for text-oriented triggers is with Value Status Pairs. In essence a text string is assigned a numeric value. Different strings will have different values. A related mechanism is used to associate icons with a number. When a trigger is setup it will show the text string (Status) to the user so in general the user is unaware of the Device Value that is really being used by the HS event trigger engine.

          It depends upon the plug-in developer providing support for VSP and VGP rather than just stuffing text in Device String.
          ​However, weather forecasts are usually written as a String and no Status text or value is used. Primarily because the data could never be represented in a normal VSP. Because HS4 has commingled string and Status test, the forecast below is shown as Status, despite the fact it is stored only as a string. That is why I use Easy Trigger’s String based Trigger for these devices.

          Click image for larger version  Name:	78A91D68-0D70-47B0-B503-0DD8F2312E00.jpg Views:	0 Size:	65.6 KB ID:	1578364

          If the device is viewed using the legacy Device Manager, it is much more clear. There is no stored Status text, only a populated String.

          Click image for larger version  Name:	A8F205BA-EBBA-4726-908A-46D982139F35.jpg Views:	0 Size:	58.1 KB ID:	1578365

          I have dozens of plug-in owned devices that only display Status and use the String exclusively. I wish it was all displayed as it was in HS3 so we could tell where the data is stored. Unfortunately we are still dealing with a few missing items under HS4 that were there for us in HS3.
          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Originally posted by randy View Post
            If you have the Easy Trigger plugin it has a string based Trigger. The “String” is where long descriptions are stored.

            I use 3 virtual devices

            Click image for larger version

Name:	1C14C35D-EC7F-4733-A452-46829C5D034A.jpg
Views:	150
Size:	19.5 KB
ID:	1578167

            and 6 events

            Click image for larger version

Name:	C4F60F7D-9B24-44ED-838B-F01BC81D8235.jpg
Views:	162
Size:	30.8 KB
ID:	1578166

            each looks to the description of the forecast day

            Click image for larger version

Name:	1FF68E85-4A21-41F5-B311-E1822CF1897B.jpg
Views:	151
Size:	31.3 KB
ID:	1578168
            randy, a few questions re your virtual devices and associated events.
            1) How does "Snow Check" event work?
            2) Your "Snow Today Off" Event starts with Manual triggered, why I would have thought it started with easytrigger?
            3) One of the things I noticed is that with easytrigger it seems to only show the root device and not any of the children is there some way of getting it to show the associated children e.g. "Description [0]" or "Descr Abbr [0]",
            Computer: CUK Intel NUC7i7BNH
            Op System: Windows10 Pro - Work Station
            HS Version: HS4 Pro Edition 4.2.19.0

            Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

            Comment


              #7
              Originally posted by MNB View Post

              randy, a few questions re your virtual devices and associated events.
              1) How does "Snow Check" event work?
              2) Your "Snow Today Off" Event starts with Manual triggered, why I would have thought it started with easytrigger?
              3) One of the things I noticed is that with easytrigger it seems to only show the root device and not any of the children is there some way of getting it to show the associated children e.g. "Description [0]" or "Descr Abbr [0]",
              ”Snow Check” is a single recurring Trigger Event. I have six Events (on and off for snow today, snow tonight and snow tomorrow) they are all manually triggered and run from this single recurring Event. When we get Conditional Actions, this can be consolidated to a single event.

              Click image for larger version  Name:	3956F1DD-D124-464A-9F8A-99A18EE6C3BD.jpg Views:	0 Size:	54.0 KB ID:	1591302

              Easy Trigger displays the full name of the device for me. I have not cleaned up the naming from when HS3 created them.

              The Device

              Click image for larger version  Name:	2D6B768D-6221-42C6-931E-908F5E288572.jpg Views:	0 Size:	15.3 KB ID:	1591298
              The Event

              Click image for larger version  Name:	D15C80D2-3CB5-4789-842F-FEA48933DF8F.jpg Views:	0 Size:	28.2 KB ID:	1591299

              The Full list of features is listed.

              Click image for larger version  Name:	5DFD5FF2-CABA-47CC-B1C0-14A0038A9150.jpg Views:	0 Size:	45.5 KB ID:	1591304

              Here I have changed the naming to be more HS4 specific.

              Click image for larger version

Name:	AD5329B2-4D91-42D6-912A-EFFA0023CFED.jpg
Views:	101
Size:	17.3 KB
ID:	1591308
              Click image for larger version

Name:	95E12ACB-3099-40EC-BFE0-8EEF24CE957E.jpg
Views:	106
Size:	27.9 KB
ID:	1591309
              HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

              Comment


                #8
                randy, many thanxs for the examples, I need to digest the "Conditional Actions" under the Snow Check event, it took me a minute or two to figure out how to access it but was finally able to under run another event and selecting the two bottom options (wasn't totally intuitive but finally got there).

                I can see from you screen shots that you have access to all of your AK Weather children devices via EasyTrigger, but I on the other had seem to only have access (via EasyTrigger) to the root AK Weather (parent) device only, however I can see via my children devices when viewed in Devices view, any ideas as to why and how to I fix it?
                Attached Files
                Computer: CUK Intel NUC7i7BNH
                Op System: Windows10 Pro - Work Station
                HS Version: HS4 Pro Edition 4.2.19.0

                Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                Comment


                  #9
                  Originally posted by MNB View Post
                  randy, many thanxs for the examples, I need to digest the "Conditional Actions" under the Snow Check event, it took me a minute or two to figure out how to access it but was finally able to under run another event and selecting the two bottom options (wasn't totally intuitive but finally got there).

                  I can see from you screen shots that you have access to all of your AK Weather children devices via EasyTrigger, but I on the other had seem to only have access (via EasyTrigger) to the root AK Weather (parent) device only, however I can see via my children devices when viewed in Devices view, any ideas as to why and how to I fix it?
                  Easy Trigger takes some home to populate, though usually within 15 minutes or so. Try restarting Easy Trigger or HomeSeer and see if you get more choices.

                  HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    Originally posted by randy View Post
                    ”Snow Check” is a single recurring Trigger Event. I have six Events (on and off for snow today, snow tonight and snow tomorrow) they are all manually triggered and run from this single recurring Event. When we get Conditional Actions, this can be consolidated to a single event.
                    I could possibly add some trigger in the plugin to simplify your setup, if you could provide some "requirements specification".

                    Comment


                      #11
                      Originally posted by alexbk66 View Post

                      I could possibly add some trigger in the plugin to simplify your setup, if you could provide some "requirements specification".
                      For these Events, I am just looking for snow to be in the forecast for today, tonight or tomorrow. This is used to turn our satellite dish heater. The only Trigger I need is if Snow is forecast in the next 24 hours.

                      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        #12
                        Originally posted by randy View Post
                        For these Events, I am just looking for snow to be in the forecast for today, tonight or tomorrow. This is used to turn our satellite dish heater. The only Trigger I need is if Snow is forecast in the next 24 hours.
                        So possibly a trigger "If description contains"?

                        [EDIT]

                        BTW, note that in the main root device I truncate the description string (100 chars I think)

                        Comment


                          #13
                          Originally posted by alexbk66 View Post

                          So possibly a trigger "If description contains"?

                          [EDIT]

                          BTW, note that in the main root device I truncate the description string (100 chars I think)
                          That is essentially what I do now. Easy Trigger is used for a string match for the description containing “snow”. As far as truncation goes, it has not been a problem for me.

                          HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #14
                            Originally posted by randy View Post
                            That is essentially what I do now. Easy Trigger is used for a string match for the description containing “snow”
                            I understand, but my question is - will it add any value to AKWeather if I add the trigger directly in my plugin, and can it simplify the use?

                            Comment


                              #15
                              Originally posted by randy View Post
                              Easy Trigger takes some home to populate, though usually within 15 minutes or so. Try restarting Easy Trigger or HomeSeer and see if you get more choices.
                              randy, that was the ticket, I did a restart this morning and whala I now have children showing up in my EasyTrigger devices.. who da thunk it!, many thanxs for the guidance.

                              We (east coast) had snow for today and of course your Snow Today is indicating a snow condition. I have to say using the conditional actions really shortens the event, once I grasp what and how it works.
                              Computer: CUK Intel NUC7i7BNH
                              Op System: Windows10 Pro - Work Station
                              HS Version: HS4 Pro Edition 4.2.19.0

                              Plug-Ins: AK Weather 4.0.5.25,APCUPSD 3.3.2.3,BLBackup 2.0.63.0,BLEditor 2.0.11.0,BLGData 3.0.55.0,BLOccupied 2.0.28.0,BLShutdown 1.0.6.0,Blue-Iris 3.1.3.33206,Device History 3.2.0.2,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,iRobot 5.22.41.1,JowiHue 4.0.8.7,Nest 3.0.0.34,NetCam Plugin 1.0.0.5,PHLocation2 3.0.0.64,Pushover 4.0.10.0,Random 3.0.0.2,Restart 1.0.0.7,Ring 1.0.0.9,SDJ-Health 3.1.1.3,Sonos 3.1.0.59,Sonos4 4.0.1.12,UltraCID3 3.0.6681.34300,UltraMon3 3.0.6554.33094,UltraNetCam3 3.0.6413.20219,Unifi 4.0.32.0,Zigbee 4.0.11.0,Z-Wave 4.0.3.0, and Jon00 scripts.

                              Comment

                              Working...
                              X