I set up some wemo socket (i.e. outlet/plug) nodes to control some window unit air conditioners I installed over the weekend. They are triggered via IFTTT & Webhookrelay. I created 2 ways to turn a set of wemo sockets on and off: a pair of IFTTT button widgets and a pair of IFTTT applets that use the Life360 service. I tested with the button widget and everything worked fine. The Life360 IFTTT applet makes the same webhook call with the exact same JSON string. So I thought that the test with the button widget would be sufficient.
I left home this morning and the Life360/webhook applet ran to turn off the sockets in the flow. I confirmed that the IFTTT applet ran without error in the IFTTT activity log for the applet. I also confirmed that my webhookrelay bucket logged the relay of the correct JSON to my instance of NodeRed, also without error. However, something failed somewhere, because the wemo sockets were all still on.
I went into the flow editor in NodeRed to take a look at the debug messages to see what it said. I have (among others) a debug node connected to the webhookrelay input, so I thought I should have at least seen that message. However, there were no messages in the debug panel.
I have other automations that used Node Red this morning which worked, so I should have at least seen something in the debug messages... but perhaps I'm not fully understanding how the debug node works?
When do debug messages go to the debug panel? Do they only accumulate while the flow editor is open? Are there any actions which can inadvertently clear debug messages from the debug panel? I didn't have any filters selected. I may have edited & re-deployed the flow before I looked at the debug panel. Could that have cleared the debug messages?
I'm not sure what failed where. I have triple-checked the JSON...
Actually, I just quadruple-checked it just now and I think I figured out the issue. I noticed that the webhookrelay bucket dashboard allows me to "re-send" a logged webhook to my instance of nodered. I tried re-sending both my button widget post and my Life360 post. The button widget debug message generated just fine, but the Life360 post (which says it sent successfully) did not show up in the debug messages panel!
It turns out that the JSON was NOT exactly the same. I had noticed that the webhookrelay displayed the JSON differently. The JSON from the button was nicely indented, but the one from Life360 was all on one line. The content looked exactly the same, but I finally noticed that the Life360 JSON had a few "smart quotes" instead of regular quotes. That MUST be the cause of the problem. I updated the IFTTT applet to replace the smart quotes and I'll find out if that fixed it tomorrow morning.
So now the question is... did webhookrelay not parse and submit the JSON because of the smart quotes, or did node red not log the debug message because of the smart quotes?