NodeRED Lesson: Send Data Projekiot

November 2nd, 2019  Posted at   Lesson NodeRED
arrow   |   No Commentsarrow

Projekiot.com adalah salah satu penyedia platform IOT. Data boleh dihantar menggunakan API yang disediakan. Contoh ini adalah menghantar bacaan DHT22 dan data dipaparkan di https://projekiot.com/dht22.

Berikut adalah video nya

Node-RED Flow

[{"id":"9348e77.7d65918","type":"inject","z":"9741cb89.aaf998","name":"","topic":"","payload":"","payloadType":"date","repeat":"1", "crontab":"","once":false,"onceDelay":0.1,"x":271.00000381469727,"y":152.00000476837158,"wires":[["128cece2.731553"]]},{"id":"6b7a828b.127dcc","type":"function","z":"9741cb89.aaf998","name":"","func":"msg.url=\"http://endpoint.projekiot.com/send\"; \nmsg.url=msg.url+\"?token=your-APIKey-here\";\nmsg.url=msg.url+\"&temperature=\"+msg.payload;\nmsg.url=msg.url+\"&humidity=\"+msg.humidity; \nmsg.url=msg.url+\"&interval=60\";\nreturn msg;","outputs":1,"noerr":0,"x":491.00000381469727,"y":272.0000047683716,"wires":[["f739c71d.a7f148"]]},{"id":"128cece2.731553","type":"rpi-dht22","z":"9741cb89.aaf998","name":"","topic":"rpi-dht22","dht":22,"pintype":"0","pin":"4","x":381.00000381469727,"y":212.00000476837158,"wires":[["6b7a828b.127dcc"]]},{"id":"f739c71d.a7f148","type":"http request","z":"9741cb89.aaf998","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","proxy":"","authType":"", "x":611.0000038146973,"y":332.0000047683716,"wires":[["2277e390.62fd3c"]]},{"id":"2277e390.62fd3c","type":"debug","z":"9741cb89.aaf998","name":"","active":true,"tosidebar":true,"console":false, "tostatus":false,"complete":"false","x":751.0000038146973,"y":392.0000047683716,"wires":[]}]

Leave a Reply

What is 15 + 9 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)