This flow inserts weather data to M2X.
- http request
- rabbitMQ out
- rabbitMQ in
In order to use the M2X node, you must first log in to the M2X environment and verify the API Key and the Device ID.
In addition, you must define a data source blueprint with the following two streams:
- inject node - Triggers the http request every 30 minutes.
- http request node - Sends a GET request to retrieve weather data from NOAA.
- rabbitmq out node - Inserts the data into the RabbitMQ queue.
- rabbitmq in node - Receives the data from the RabbitMQ queue.
- function node - Extracts the temperature and humidity and prepares a ‘postMultiple’ command to insert the data into M2X.
- m2x node - Connects to M2X and inserts the data.
- json node - Parses the answer that was returned from M2X to object.
- switch node - If ‘success’ is returned, sends ACK to the RabbitMQ queue. In case of failure it sends an error message to the debug node.
- function node - Prepares the ‘acknowledge’ command which is sent to the RabbitMQ queue when inserting the data is successful.
This flow uses the following links:
Hosted RabbitMQ credentials:
User name: guest