1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/parsers/what3words
Sam Machin 2d28a2304f
Update package.jsons for mono-repo (#851)
Update the package.json for each node to point to the directory within the repo that hosts the code for the package in question.  as per https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository
2021-11-02 15:22:30 +00:00
..
icons add some icon love to extra parser nodes 2018-02-08 15:52:30 +00:00
LICENSE Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
package.json Update package.jsons for mono-repo (#851) 2021-11-02 15:22:30 +00:00
README.md bump waht3words package 2017-10-22 11:00:48 +01:00
what3words.html update support languages (#578) 2019-09-19 09:27:07 +01:00
what3words.js Fixed What3Words words>location method (#518) 2019-02-11 19:20:13 +00:00

node-red-node-what3words

A Node-RED node to convert positions to what3words...

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-node-what3words

Pre-reqs

You will need a valid API key from what3words

Usage

Uses What 3 Words to convert a location to 3 unique words. and vice versa. Don't ask... just try it...

To convert position to words it requires

  • msg.location.lat
  • msg.location.lon

or

  • msg.payload.lat
  • msg.payload.lon

or

  • msg.payload containing a string lat,lon

To convert words to position it requires

  • msg.payload containing a string of unique.three.words

A 3 word string separated by dots.

The API-key is stored in a separate credentials file.

Note: This is an online service and requires a live internet connection and a valid API key to work correctly.

See what3words for more details.

Example flow:

[{"id":"f38eba15.0c7148","type":"inject","name":"","topic":"","payload":"calibrate.newlyweds.switched","payloadType":"string","repeat":"","crontab":"","once":false,"x":646,"y":319,"z":"cf058368.30fa8","wires":[["22d6b2a5.dd294e"]]},{"id":"22d6b2a5.dd294e","type":"what3words","title":"","name":"","x":881,"y":317,"z":"cf058368.30fa8","wires":[["9caf8aa8.635078"]]},{"id":"9caf8aa8.635078","type":"debug","name":"","active":true,"console":false,"complete":"true","x":1077,"y":315,"z":"cf058368.30fa8","wires":[]}]