I’m afraid the flow you’ve imagined won’t work in practice. This debug message is coming from the http-in node feeding into your function, as can be seen by the req
and res
properties on the object. The msg.topic
you’re looking for would come from the mqtt-in node wired to the same function node. While I think I understand what your goal is, can you try to explain what your flow is supposed to do, in general terms rather than flow specific.
As for your function node shown here, rather than msg.topic
holding the string "undefined"
, it is undefined. I explained the difference in another topic. In there, your string"undefined"
would be non-zero value while the undefined seen here is the last one.