Tweet your location with MQTTitude

A very simple flow that will use an MQTT input node to send data received from MQTTitude Mobile Apps through to twitter as a nice google map link.

MQTT broker is required. I use Mosquitto - Install instructions for Raspberry Pi

[{"id":"a7c99df.f58366","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":""},{"id":"a2a215e0.5d5de8","type":"mqtt in","name":"Chris","topic":"/mqttitude/chris","broker":"a7c99df.f58366","x":98,"y":157,"z":"1f737a7f.e08c86","wires":[["6c3e5363.93c1ac"]]},{"id":"d6d051c.f292fb","type":"debug","name":"","active":true,"complete":false,"x":540,"y":140,"z":"1f737a7f.e08c86","wires":[]},{"id":"6c3e5363.93c1ac","type":"function","name":"","func":"// The received message is stored in 'msg'\n// It will have at least a 'payload' property:\n//   console.log(msg.payload);\n// The 'context' object is available to store state\n// between invocations of the function\n//   context = {};\nvar now = Date();\nmsg.payload = JSON.parse(msg.payload);\nvar url = \"Chris is located at\" + + \",\" + msg.payload.lon + \" @ \" + now;\nmsg.payload = url;\n\nreturn msg;","outputs":1,"x":301,"y":161,"z":"1f737a7f.e08c86","wires":[["d6d051c.f292fb","49d647e9.b629b8"]]},{"id":"49d647e9.b629b8","type":"twitter out","twitter":"","name":"Tweet","x":559,"y":191,"z":"1f737a7f.e08c86","wires":[]}]

Flow Info

created 4 years, 8 months ago

Node Types

  • debug (x1)
  • function (x1)
  • mqtt in (x1)
  • mqtt-broker (x1)
  • twitter out (x1)


  • MQTT
  • twitter
  • locations
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option