Announcement

Collapse
No announcement yet.

Receiving same event multiple times in a row

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

    Receiving same event multiple times in a row

    I have a couple Aeotec quad remotes in Homeseer which I'm using node-red to control
    Click image for larger version

Name:	node-red-flow.PNG
Views:	201
Size:	14.4 KB
ID:	1442870.

    If I press scene 1 then run the report i get the last_change, however if I press scene 1 again and report again the last change value does not update.

    I have the config set in homeseer to always update last change:
    Click image for larger version

Name:	controller-config.PNG
Views:	157
Size:	43.5 KB
ID:	1442871

    Homeseer does update when I press the same scene button but node-red doesn't receive/ignores that update so I'm not able to chain button actions.

    Ideally I'd like to do things like "double click" or to enter custom codes to be able to expand the usefulness of the remote.

    From what I see in the node-red-homeseer source code it looks like the webhook still only sends a devicechange event on status change even if the Last Change Time Updates on Status Change Only is unchecked.

    Is this something that could be changed to always send a hook event?

    #2
    I'm using a device that when changes, triggers Alexa TTS to speak the status contents of that device. In order to get it to trigger everytime, the event I use first changes the status to "X" and then to the text I want to speak. This may trigger two node-red triggers, but I filter out the "X" trigger with a function node:

    Code:
    var status=msg.payload.status;
    if (status==="x"){
    return null;
    }
    else {
    return msg;
    }
    tenholde

    Comment


      #3
      robertinglin I ran into the same problem with the Aeotec Minimote. What I did to workaround it was to create an event in HS that fires on a device value change for the remote device and checks to see if the value is greater than zero. If it is, I reset the value to zero and set "last change" to FALSE to keep the zero change from going to NR. This insures that the next time a button is pressed, even the same button, the device value will change.

      Let me know if you have any questions.
      Ken
      "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

      Comment


        #4
        I ended up doing something similar. Created a counter and set the value to -count and checked if the value was greater than 0.

        kenm would you mind sharing your node-red payload? I'd much rather clear the lastChanged flag

        Comment


          #5
          Hi robertinglin ,

          Sorry for the late reply. I "disconnected" for a few days over the holidays. There isn't anything special in NR, since all the work is done with an HS event. The "False" in the script command keeps the reset to zero (Ready) from being sent to NR.

          Let me know if you have any questions.
          Ken

          Click image for larger version

Name:	Screen Shot 2020-12-28 at 8.51.55 AM.png
Views:	110
Size:	210.1 KB
ID:	1443618

          "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

          Comment

          Working...
          X