These examples show how to extract data and control the Rainforest Eagle using the recommended HTTP Rest API both locally and via the Internet Gateway.
For those of you trying to get the most out of the Rainforest Eagle, these example Node-Red flows should get you going. Having the flows in Node-Red opens up a huge range of automation possibilities. Enjoy 🙂
To use the flows:
- Modify the ‘Format Request’ function nodes to your specific credentials. For local requests, you need to add your own MAC address. For the Relay Gateway, the message headers need to be altered to your Gateway account.
- For all flows except the Gateway flow, modify the ‘http request’ nodes, tick ‘use basic authentication?’, add your ‘Cloud ID’ as the username, your ‘Installation Code’ as the password and your Eagle’s IP address.
- For the Gateway flow, basic authentication is not used as the credentials are passed in the message header.
- To automate the flows, simply modify the ‘inject node’ to repeat at the required interval.
- To publish the data on a MQTT topic, just replace the debug node with an MQTT node.
Creating your own commands simply requires creating the appropriate command string in the ‘Format request’ node. Refer to the Eagle Rest API documentation for more information.