TTN / TTS v3 Transfer measured values to openSenseMap via Node Red

Lorawan TTN / TTS v3 transfer measured values to openSenseMap via Node Red. Manual in German: https://blog.zf2601.de/2021/12/ttn-tts-v3-messwerte-an-opensensemap-via-node-red-uebertragen/

[{"id":"d96aad09e6ddfc1e","type":"tab","label":"Opensense AIS","disabled":false,"info":""},{"id":"1644500ee5c4a80f","type":"group","z":"d96aad09e6ddfc1e","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["35a71235f4754c86","8e1e2a9e309d1840","9646a0080cc11563","bc366faf4d21d903","6ce44280144a78c0","97abd554b4a2d458","18bdba22b129b7c6","d61ad7837c27b99a","f11205ba06fd42d8","2f6ad101f44ac426","908ea6f279966569","c270588d7c42982f"],"x":-6,"y":59,"w":1292,"h":382},{"id":"35a71235f4754c86","type":"json","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"","property":"payload","action":"","pretty":false,"x":250,"y":260,"wires":[["97abd554b4a2d458","18bdba22b129b7c6","d61ad7837c27b99a","f11205ba06fd42d8","bc366faf4d21d903"]]},{"id":"8e1e2a9e309d1840","type":"change","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Batterie","rules":[{"t":"set","p":"Header","pt":"msg","to":"{ \"Content-Type\" : \"application/json\", \"Host\": \"www.opensensemap.org\"}","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"http://www.opensensemap.org:8000/boxes/1234567890/1234567890","tot":"str"},{"t":"set","p":"method","pt":"msg","to":"POST","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":100,"wires":[["9646a0080cc11563"]]},{"id":"9646a0080cc11563","type":"http request","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"zu opensensemap","method":"use","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","senderr":false,"credentials":{"user":"","password":""},"x":1170,"y":280,"wires":[[]]},{"id":"bc366faf4d21d903","type":"debug","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":230,"y":100,"wires":[]},{"id":"6ce44280144a78c0","type":"mqtt in","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"zfwetter","topic":"v3/xxxx@ttn/devices/eui-70bxxxxxx18/up","qos":"2","datatype":"auto","broker":"1527d923777445c5","nl":false,"rap":true,"rh":0,"inputs":0,"x":70,"y":260,"wires":[["35a71235f4754c86"]]},{"id":"97abd554b4a2d458","type":"template","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Payload Batterie","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"value\": {{payload.uplink_message.decoded_payload.battery}} }","output":"json","x":520,"y":100,"wires":[["8e1e2a9e309d1840","bc366faf4d21d903"]]},{"id":"18bdba22b129b7c6","type":"template","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Payload Luftfeuchtigkeit","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"value\": {{payload.uplink_message.decoded_payload.humidity}} }","output":"json","x":550,"y":200,"wires":[["2f6ad101f44ac426"]]},{"id":"d61ad7837c27b99a","type":"template","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Payload Temperatur","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"value\": {{payload.uplink_message.decoded_payload.temperature}} }","output":"json","x":540,"y":300,"wires":[["908ea6f279966569"]]},{"id":"f11205ba06fd42d8","type":"template","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Payload Luftdruck","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{ \"value\": {{payload.uplink_message.decoded_payload.pressure}} }","output":"json","x":530,"y":400,"wires":[["c270588d7c42982f"]]},{"id":"2f6ad101f44ac426","type":"change","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Luftfeuchte","rules":[{"t":"set","p":"Header","pt":"msg","to":"{ \"Content-Type\" : \"application/json\", \"Host\": \"www.opensensemap.org\"}","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"http://www.opensensemap.org:8000/boxes/1234567890/1234567890","tot":"str"},{"t":"set","p":"method","pt":"msg","to":"POST","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":200,"wires":[["9646a0080cc11563"]]},{"id":"908ea6f279966569","type":"change","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Temperatur","rules":[{"t":"set","p":"Header","pt":"msg","to":"{ \"Content-Type\" : \"application/json\", \"Host\": \"www.opensensemap.org\"}","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"http://www.opensensemap.org:8000/boxes/1234567890/1234567890","tot":"str"},{"t":"set","p":"method","pt":"msg","to":"POST","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":770,"y":300,"wires":[["9646a0080cc11563"]]},{"id":"c270588d7c42982f","type":"change","z":"d96aad09e6ddfc1e","g":"1644500ee5c4a80f","name":"Luftdruck","rules":[{"t":"set","p":"Header","pt":"msg","to":"{ \"Content-Type\" : \"application/json\", \"Host\": \"www.opensensemap.org\"}","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"http://www.opensensemap.org:8000/boxes/1234567890/1234567890","tot":"str"},{"t":"set","p":"method","pt":"msg","to":"POST","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":400,"wires":[["9646a0080cc11563"]]},{"id":"1527d923777445c5","type":"mqtt-broker","name":"zfwetter","broker":"eu1.cloud.thethings.network","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":"","credentials":{}}]

Flow Info

Created 2 years, 6 months ago
Rating: 5 1

Owner

Actions

Rate:

Node Types

Core
  • change (x4)
  • debug (x1)
  • http request (x1)
  • json (x1)
  • mqtt in (x1)
  • mqtt-broker (x1)
  • template (x4)
Other

Tags

  • opensensemap
  • lorawan
  • ttn
  • tts
  • v3
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option