Announcement

Collapse
No announcement yet.

The device's string changes and contains - multiple strings

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

    The device's string changes and contains - multiple strings

    Is it possible to enter multiple strings for "The device's string changes and contains"? In case it is possible How

    An OR IF function will not work.

    ---
    John

    #2
    no it's not possible.
    why an OR IF will not work? Have you tested it? in HS3 or HS4?

    Comment


      #3
      Originally posted by spud View Post
      no it's not possible.
      why an OR IF will not work? Have you tested it? in HS3 or HS4?
      HS4 I could not select the device multiple times
      ---
      John

      Comment


        #4
        Originally posted by spud View Post
        no it's not possible.
        why an OR IF will not work? Have you tested it? in HS3 or HS4?
        Found the issue.

        Have to save the previous condition before adding the next one.

        ---
        John

        Comment


          #5
          spud
          I created the following event is HS4:
          Click image for larger version

Name:	Capture - even.PNG
Views:	285
Size:	212.3 KB
ID:	1382697

          The device string changed and became 4 Bft (was 3 Bft), see below. However the event was not triggered. What am I doing wrong?
          Click image for larger version

Name:	Capture -device info.PNG
Views:	275
Size:	66.6 KB
ID:	1382696

          ---
          John

          Comment


            #6
            spud
            I tried multiple Easytrigger options that are not working

            As regular expression \b(4 Bft) or \b(4Bft)

            String changes and becomes 4 Bft

            ---
            John

            Comment


              #7
              If you set the log level to Debug, do you see the string change for this device?
              It should be something like:
              "Device XXX string changed to ABCD"

              If you don't see it in the logs, it means that the plugin or the script that set the string, calls SetDeviceString with the last parameter being false, which prevent other plugins to see the change.

              Comment


                #8
                Originally posted by spud View Post
                If you set the log level to Debug, do you see the string change for this device?
                It should be something like:
                "Device XXX string changed to ABCD"

                If you don't see it in the logs, it means that the plugin or the script that set the string, calls SetDeviceString with the last parameter being false, which prevent other plugins to see the change.
                DEBUG Device 1579 string changed to 3Bft

                But string changes and becomes 3Bft is not working.

                Also the Regex is not working.

                ---
                John

                Comment


                  #9
                  Originally posted by John245 View Post

                  DEBUG Device 1579 string changed to 3Bft

                  But string changes and becomes 3Bft is not working.

                  Also the Regex is not working.

                  ---
                  John
                  spud
                  If I use:
                  String changes and contains 3 it is working but I don't want to go that route. (as 11 also contains 1).

                  ---
                  John

                  Comment


                    #10
                    spud
                    Also strange. This event will in all cases be triggered.

                    In case of a wind strength of 3, the event with value 3 will run and the event with a value of 5 (also for all other values).

                    Click image for larger version

Name:	Capture- 5 Bft.PNG
Views:	252
Size:	191.3 KB
ID:	1382938

                    ---
                    John

                    Comment


                      #11
                      Originally posted by John245 View Post
                      spud
                      Also strange. This event will in all cases be triggered.

                      In case of a wind strength of 3, the event with value 3 will run and the event with a value of 5 (also for all other values).

                      Click image for larger version

Name:	Capture- 5 Bft.PNG
Views:	252
Size:	191.3 KB
ID:	1382938

                      ---
                      John
                      spud
                      Any idea how to solve this issue?

                      ---
                      John

                      Comment


                        #12
                        I tried to replicate this problem using the following 2 events:
                        Click image for larger version

Name:	stringcontains.PNG
Views:	292
Size:	111.5 KB
ID:	1383596
                        Click image for larger version

Name:	setstring.PNG
Views:	208
Size:	116.8 KB
ID:	1383597

                        when I manually run the second event everything work as expected, the first event is triggered

                        Code:
                        2020-05-07 4:35:12 PM    HomeSeer    TTS    Speak: (SPUD2:DEFAULT):Easy Trigger
                        2020-05-07 4:35:12 PM    HomeSeer    Event    Event Trigger "Test String trigger"
                        2020-05-07 4:35:12 PM    Legacy-Plugin    EasyTrigger    DEBUG Firing event 4
                        2020-05-07 4:35:12 PM    Legacy-Plugin    EasyTrigger    DEBUG Device 1022 string changed to 4 Bft
                        2020-05-07 4:35:12 PM    HomeSeer    Event    Running script statement immediately: &hs.SetDeviceString(1022, "4 Bft", true)
                        2020-05-07 4:35:12 PM    HomeSeer    Event    Event Trigger "Test Change string"
                        2020-05-07 4:35:12 PM    HomeSeer    Event    Event Test Change string triggered by the event page 'Run' button.
                        2020-05-07 4:35:03 PM    HomeSeer    TTS    Speak: (SPUD2:DEFAULT):Easy Trigger
                        2020-05-07 4:35:03 PM    HomeSeer    Event    Event Trigger "Test String trigger"
                        2020-05-07 4:35:03 PM    Legacy-Plugin    EasyTrigger    DEBUG Firing event 4
                        2020-05-07 4:35:03 PM    Legacy-Plugin    EasyTrigger    DEBUG Device 1022 string changed to 5 Bft
                        2020-05-07 4:35:03 PM    HomeSeer    Event    Running script statement immediately: &hs.SetDeviceString(1022, "5 Bft", true)
                        2020-05-07 4:35:03 PM    HomeSeer    Event    Event Trigger "Test Change string"
                        2020-05-07 4:35:03 PM    HomeSeer    Event    Event Test Change string triggered by the event page 'Run' button.
                        Could you try to test your event with an immediate command like I did with the second event?
                        If it works, then maybe the problem is the string that is set by the plugin has some characters that are not displayed but result in the comparison in EasyTrigger to be false.

                        Notes:
                        - After you create or change an easy trigger, you have to wait 15 seconds for the change to be active, you will see in the logs when the plugin refresh the triggers.
                        - the trigger "changes and becomes" will only fire if the string actually changes, in my example if I run the second event twice the second run will not trigger the first event as the string is already "4 Bft"

                        Comment


                          #13
                          Originally posted by spud View Post
                          I tried to replicate this problem using the following 2 events:
                          Click image for larger version

Name:	stringcontains.PNG
Views:	292
Size:	111.5 KB
ID:	1383596
                          Click image for larger version

Name:	setstring.PNG
Views:	208
Size:	116.8 KB
ID:	1383597

                          when I manually run the second event everything work as expected, the first event is triggered

                          Code:
                          2020-05-07 4:35:12 PM HomeSeer TTS Speak: (SPUD2:DEFAULT):Easy Trigger
                          2020-05-07 4:35:12 PM HomeSeer Event Event Trigger "Test String trigger"
                          2020-05-07 4:35:12 PM Legacy-Plugin EasyTrigger DEBUG Firing event 4
                          2020-05-07 4:35:12 PM Legacy-Plugin EasyTrigger DEBUG Device 1022 string changed to 4 Bft
                          2020-05-07 4:35:12 PM HomeSeer Event Running script statement immediately: &hs.SetDeviceString(1022, "4 Bft", true)
                          2020-05-07 4:35:12 PM HomeSeer Event Event Trigger "Test Change string"
                          2020-05-07 4:35:12 PM HomeSeer Event Event Test Change string triggered by the event page 'Run' button.
                          2020-05-07 4:35:03 PM HomeSeer TTS Speak: (SPUD2:DEFAULT):Easy Trigger
                          2020-05-07 4:35:03 PM HomeSeer Event Event Trigger "Test String trigger"
                          2020-05-07 4:35:03 PM Legacy-Plugin EasyTrigger DEBUG Firing event 4
                          2020-05-07 4:35:03 PM Legacy-Plugin EasyTrigger DEBUG Device 1022 string changed to 5 Bft
                          2020-05-07 4:35:03 PM HomeSeer Event Running script statement immediately: &hs.SetDeviceString(1022, "5 Bft", true)
                          2020-05-07 4:35:03 PM HomeSeer Event Event Trigger "Test Change string"
                          2020-05-07 4:35:03 PM HomeSeer Event Event Test Change string triggered by the event page 'Run' button.
                          Could you try to test your event with an immediate command like I did with the second event?
                          If it works, then maybe the problem is the string that is set by the plugin has some characters that are not displayed but result in the comparison in EasyTrigger to be false.

                          Notes:
                          - After you create or change an easy trigger, you have to wait 15 seconds for the change to be active, you will see in the logs when the plugin refresh the triggers.
                          - the trigger "changes and becomes" will only fire if the string actually changes, in my example if I run the second event twice the second run will not trigger the first event as the string is already "4 Bft"
                          spud
                          Thnx.

                          This works, so it seems that the problem is in the string.

                          Will create a workaround this weekend.

                          Thanks for the help.

                          ---
                          John

                          Comment

                          Working...
                          X