1.0.0 • Published 2 years ago

node-red-tagocore v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Install Node TagoIO out on Node-RED:

To install TagoIO out node on Node-RED, click in more options, manage pallet, search TagoIO out on the “Install” tab and click in install. When installing is finished, the TagoIO out node will appear on the “Nodes” tab.

You can check the full proccess in the Node-RED documentation(https:// Node-RED.org/docs/user-guide/runtime/adding-nodes).


Configure “TagoIO out” on Node-RED

To configure TagoIO out to post data on a device in TagoIO just drag the node TagoIO out on the working flow and put the device's device token in the configuration field.


Send data to TagoIO using the TagoIO out on Node-RED:

In order to send data to Node-RED, you will need to drag and drop the TagoIO out node to your flow.

Configure the flow with your Device-Token and choose to connect either by HTTPs or MQTT. For the MQTT, you must install in the MQTT Plugin in the TagoCore and configure it as well.

  • Note: MQTT Integration is not available as node in the Node-RED yet. We are working to get it available a soon as possible.

Notice that you can send any type of information to TagoCore using the TagoIO out node. But TagoIO will only accepts data that is in JSON formatted with at least a variable and value key. You can achieve this by using a function node in the Node-RED or by adding a Payload Parser to your device in the TagoCore.

Here is a data sample that is JSON formmated for TagoCore:

[
  {
    "variable": "temperature",
    "value": "27",
    "group":"1631814703672",
    "unit": "C",
    "time": "2021-09-16T17:51:43.672Z"
  },
  {
    "variable": "temperature",
    "value": "29",
    "group": "1631814703672",
    "unit": "C",
    "time": "2021-09-16T17:59:43.672Z"
  }
]

The payload message is already in the TagoIO pattern, if your device does not have this pattern, you will need to create a function that normalizes the data to the TagoIO pattern.

Using “inject”, just configure the msg.payload for JSON format and put the data that will be sent, in this example the following payload will be used:


License

MIT