Not sure how much better I can phrase it in the question but i'll try to explain to the best I can.
What I am trying to do:
Using IFTTT Webhook to
POST
a JSON message in MQTT Format.POST URL:
test.mosquitto.org
E.G:
{
"payload:": "kitchen",
"topic:": "device/state",
"retain:": true,
"qos": 2
}
- Using a Node-RED
mqtt input (subscribe) node
with the settings configured totest.mosquitto.org
port 1883 and topic set todevice/state
, I should be able to retrieve the payload I've published to the mosquitto broker to my Node-RED node.
What went wrong
I think something might be wrong with the POST
to the test.mosquitto.org
broker.
Troubleshooting
By using mosquitto_pub
and mosuqitto_sub
commands, I'm able to to receive the payload in my Node-RED (which means that my Node-RED mqtt node is configured correctly).
Commands:
Terminal 1: mosquitto_sub -h test.mosquitto.org -t device/state -d
Terminal 2: mosquitto_pub -h test.mosquitto.org -t device/state -m "kitchen"
Node-RED successfully receives the message in JSON object format. But it doesn't receive anything when I attempt to publish through Postman using POST
method to the URL.