This documentation will show how to recover a specific data in the msg.payload before sending it to a website. In this documentation, a latitude and a longitude are going to be recover thanks to the owntracks node, then these data will be send to xively.

Owntracks

Firstly, add an owntracks node to allow to recover the latitude and the longitude.

Then, as shown in the help of the node, choose a complicated topic so that it is not taken by someone else.

Extract

Next, insert 2 extract nodes : one to extract the latitude and the other to the longitude.

And fill up the filter field with latitude and longitude.

Xively

Finally, take 2 xively node : one to send the latitude and the other to the longitude.

In the same manner as the extract node set up one with the latitude and the other with the longitude.

Graph

To finish, link these node like this:

Flow

Here is the final code to be imported in order to recover the complete graph:

[{"id":"37b43efb.6d05e2","type":"extract","name":"extract latitude","place":"payload","filter":"latitude","x":339.8863754272461,"y":115.45454025268555,"z":"f0aaee67.3fc6f","wires":[["6a4e6929.eb54a"]]},{"id":"6a4e6929.eb54a","type":"xively","name":"xively latitude","feed_id":"","api_key":"","id_data":"latitude","x":500.90914154052734,"y":115.79543685913086,"z":"f0aaee67.3fc6f","wires":[]},{"id":"16d76a3d.1444fe","type":"owntracks","name":"Location","broker":"test.mosquitto.org","port":1883,"clientid":"","topic":"","x":151.81823348999023,"y":115.45455074310303,"z":"f0aaee67.3fc6f","wires":[["37b43efb.6d05e2","5f343bb7.4d59a4"]]},{"id":"5f343bb7.4d59a4","type":"extract","name":"extract longitude","place":"payload","filter":"longitude","x":340.9090881347656,"y":163.6363525390625,"z":"f0aaee67.3fc6f","wires":[["67d2a2cc.7af05c"]]},{"id":"67d2a2cc.7af05c","type":"xively","name":"xively longitude","feed_id":"","api_key":"","id_data":"longitude","x":501.9318542480469,"y":163.9772491455078,"z":"f0aaee67.3fc6f","wires":[]}]

Back to top