Announcement

Collapse
No announcement yet.

Wall switch (sonoff rf) triggering multiple events

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

    Wall switch (sonoff rf) triggering multiple events

    Hi there,

    I've modified and have been using a sonoff rf bridge with Michael's excellent tools for a few weeks now. I have several motion sensors and door switches converted over to Tasmota and are working great in HS4.

    Recently I bought a couple 3-button wireless wall switches (link) that work with the sonoff rf bridge. I setup a few HS events to use the MQTT payloads to toggle on/off a fan and a light in my bedroom, but for some reason when one button is pressed on the wall switch, it is triggering events for all three of the buttons. When I look at the payload results in HS4 and in the tasmota console, I am only seeing that one payload was sent.

    The way the payloads work for the buttons are that the first 5 characters of the payload appear to be the unique ID of the switch, and the last payload character identifies the button. xxxxx2 = left button, xxxxx8 = middle button, xxxxx4 = right button.

    Is there a way to view a more detailed log to see if maybe the wall switch is for some reason blasting multiple strings before finishing on the correct one? Any help in troubleshooting would be very much appreciated.

    Click image for larger version

Name:	tasmota console after.png
Views:	186
Size:	245.9 KB
ID:	1491991

    #2
    A record of every MQTT reception will be in the mcsMQTT Debug.txt file when debug is enabled on the top of the General tab. The lines will start with something like AcceptMessageForTrigger.

    What are you using as the event trigger?

    Comment


      #3
      Hi Michael. I turned on the debug option and pressed a button at 10:28 and at 10:32. There appeared to be a lot of log activity triggers, but each time I only saw one payload. At 10:28 I pressed the middle button which is correctly payload "554768" and at 10:32 I pressed the left button which is correctly "554762".

      Here is an image of the event. Note that I bought two of the three button units which is why there is an or event.


      Code:
      8/29/2021 10:28:55 AM 440790879 | Update Accepted 558 to 554768 StatusType=3 Payload=554768 RegExValue=554768
      8/29/2021 10:28:55 AM 440790882 | ActOnMessageForTrigger QueueSize=0 ,Topic tele/tasmota_5AF25D/RESULT,Payload {"Time":"2021-08-29T15:28:55","RfReceived":{"Sync":8700,"Low":280,"High":870, "Data":"554768","RfKey":"None"}}
      8/29/2021 10:28:55 AM 440790884 | Trigger Fired
      8/29/2021 10:28:55 AM 440790884 | Trigger Fired
      8/29/2021 10:28:55 AM 440790885 | Trigger Fired
      8/29/2021 10:28:55 AM 440790885 | Trigger Fired
      8/29/2021 10:28:55 AM 440790886 | Trigger Fired
      8/29/2021 10:28:55 AM 440790887 | Trigger Fired
      8/29/2021 10:28:55 AM 440790887 | Trigger Fired
      8/29/2021 10:28:55 AM 440790888 | Trigger Fired
      8/29/2021 10:28:55 AM 440790889 | Trigger Fired
      8/29/2021 10:28:55 AM 440790890 | Trigger Fired
      8/29/2021 10:28:55 AM 440790891 | Trigger Fired
      8/29/2021 10:28:55 AM 440790892 | Trigger Fired
      8/29/2021 10:28:55 AM 440790892 | Trigger Fired
      8/29/2021 10:28:55 AM 440790893 | Trigger Fired
      8/29/2021 10:28:55 AM 440790893 | Trigger Fired
      8/29/2021 10:28:55 AM 440790894 | Trigger Fired
      8/29/2021 10:28:55 AM 440790895 | Trigger Fired
      8/29/2021 10:28:55 AM 440790895 | Trigger Fired
      8/29/2021 10:31:52 AM 440967931 | ActOnMessageForTrigger QueueSize=0 ,Topic tele/tasmota_5AF25D/STATE,Payload {"Time":"2021-08-29T15:31:52","Uptime":"27T18:45:29","UptimeSec":2400329,"Hea p":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCou nt":3,"Wifi":{"AP":1,"SSId":"stuff":"11n","RSSI":100,"Signal ":-38,"LinkCount":1,"Downtime":"0T00:00:03"}}
      8/29/2021 10:32:35 AM 441011108 | Update Accepted 558 to 554762 StatusType=3 Payload=554762 RegExValue=554762
      8/29/2021 10:32:35 AM 441011110 | ActOnMessageForTrigger QueueSize=0 ,Topic tele/tasmota_5AF25D/RESULT,Payload {"Time":"2021-08-29T15:32:35","RfReceived":{"Sync":8750,"Low":290,"High":870, "Data":"554762","RfKey":"None"}}
      8/29/2021 10:32:35 AM 441011112 | Trigger Fired
      8/29/2021 10:32:35 AM 441011113 | Trigger Fired
      8/29/2021 10:32:35 AM 441011114 | Trigger Fired
      8/29/2021 10:32:35 AM 441011114 | Trigger Fired
      8/29/2021 10:32:35 AM 441011115 | Trigger Fired
      8/29/2021 10:32:35 AM 441011116 | Trigger Fired
      8/29/2021 10:32:35 AM 441011116 | Trigger Fired
      8/29/2021 10:32:35 AM 441011117 | Trigger Fired
      8/29/2021 10:32:35 AM 441011117 | Trigger Fired
      8/29/2021 10:32:35 AM 441011119 | Trigger Fired
      8/29/2021 10:32:35 AM 441011120 | Trigger Fired
      8/29/2021 10:32:35 AM 441011124 | Trigger Fired
      8/29/2021 10:32:35 AM 441011124 | Trigger Fired
      8/29/2021 10:32:35 AM 441011125 | Trigger Fired
      8/29/2021 10:32:35 AM 441011125 | Trigger Fired
      8/29/2021 10:32:35 AM 441011126 | Trigger Fired
      8/29/2021 10:32:35 AM 441011127 | Trigger Fired
      8/29/2021 10:32:35 AM 441011127 | Trigger Fired
      8/29/2021 10:32:35 AM 441011129 | Trigger Fired
      8/29/2021 10:32:35 AM 441011130 | Trigger Fired
      8/29/2021 10:32:35 AM 441011130 | Trigger Fired
      8/29/2021 10:32:35 AM 441011131 | Trigger Fired
      8/29/2021 10:32:35 AM 441011132 | Trigger Fired
      8/29/2021 10:32:35 AM 441011132 | Trigger Fired
      8/29/2021 10:32:35 AM 441011133 | Trigger Fired
      8/29/2021 10:32:35 AM 441011133 | Trigger Fired
      8/29/2021 10:32:35 AM 441011134 | Trigger Fired
      Here are a couple of the event triggers which are setup to act as an ON/OFF toggle.

      Click image for larger version

Name:	HS event lamp off.png
Views:	91
Size:	301.5 KB
ID:	1492296

      Click image for larger version

Name:	HS event fan off.png
Views:	63
Size:	89.8 KB
ID:	1492297

      Here is an image of the events log showing that for some reason both events are triggering at the same time. Please ignore that one triggers on and one triggers off, I just had the devices in opposite states at the time.

      Click image for larger version

Name:	hs_events_together.png
Views:	64
Size:	77.3 KB
ID:	1492298

      Comment


        #4
        The debug shows that many event triggers have the same Unique Identifier (UID). I have seen this in the past when a user clones an event and then edits the cloned event. HS incorrectly clones the UID. It should give the cloned event trigger its own Unique Identifier. Since the event IDs and the Device IDs are managed by HS and not user/developer editable the only option that I am aware is that events need to be individually created rather than cloned and then edited.

        Does this explain your situation?

        Comment


          #5
          You are a life saver!!!

          What a horrible bug! This cost me so many hours of work!

          Comment


            #6
            I had not submitted a HS4 bug report on this until now. I first discovered this on HS3 and bug management in those days was having growing pains so it got lost back then. I forgot to submit when I first ran into it with HS4. At that time I was more focused on developer/API issues and not on user issues.

            Before you put effort in this let me see if there is a way I can use other information so that the lack of uniqueness can be overcome.

            Comment


              #7
              I did figure a way to work around this. It is in 5.19.0.2. The updated files, from the 5.19.0.0 package are at http://mcsSprinklers.com/MCSMQTTHS4_51902.zip. The two HSPI_* files go in the HS folder. The other two go in the \bin\mcsMQTT folder.

              You will want to first install 5.19.0.0 from instructions of first post at mcsMQTT 5.19.0.0 Cloud vs. Local and Additional protocols - HomeSeer Message Board


              Edit:
              Note that 5.19.0.2 is now avaialble as full updater package at the same message board link. No need to install the other files on top of it

              Comment


                #8
                Michael, the files in the ZIP file show as version 5.18.3.2 not 5.19.0.2 as the zip file name would suggest.

                Also on the Cloud tab when I select GeoFence it shows the YoLink Screen. When I select YoLink I see the GeoFence screen

                On Local Tab WLED and Serial show the same screen

                Comment


                  #9
                  Thanks Jim. I fixed the version info, but the executable otherwise did not change from prior upload. Looks like similar issue with the updater package for 5.19.0.0 that I will fix a little later.

                  The updater package has now been updated to 5.19.0.2

                  Comment


                    #10
                    Thanks Michael, I really appreciate your help!

                    Comment

                    Working...
                    X