New video just added to the Node-RED developer playlist covers a simple API flow using daily weather data as an example.
Node-RED is an extremely powerful tool that we’ve featured many times on this blog and our YouTube channel, and one very common use of Node-RED is to use application programming interfaces or “APIs” to move data between devices and/or services that would otherwise be totally disconnected.
To help you get started using APIs with Node-RED if you’re unfamiliar with these tools, we’ve just made a new video about how to build a simple API flow using an example web service for daily weather data.
While this particular walkthrough focuses on using the free OpenWeatherMap API to bring in sunrise and sunset time to control an “outdoor light” via a digital output that will be on when the sun is down, the concepts used in the video demonstrate the general start-to-finish process of building up a flow starting with an API’s documentation, examining a JSON object, bringing that data into Node-RED, and finally using it to do some basic real-world control.
Many other APIs require very similar steps; so if you’re using a different API for your application, this tutorial can be a great outline for the process you might go through to build your own unique flow.
As well as having this video tutorial, we also have an in-depth, step-by-step lesson on our Opto training site.
This includes not only the tutorial content covered in the video but also several quizzes that can help you review and confirm your knowledge on the various topics involved in getting API data into Node-RED, with the addition of how to bring that data into groov View or PAC Control, if that’s what you need for your application.
What’s awesome about Node-RED is that no matter what your output or goal is – whether you’re using groov IO, groov View, PAC Control, the Node-RED Dashboard UI, or even another API, Node-RED can bridge the gap between any and all of these data sources. If you want to push data from one place to another and don’t require high-speed, real-time control, Node-RED is often the best tool for the job.
If you haven’t already checked it out, we have a playlist full of introductory and more advanced topics to get you started with this powerful low-code option. We hope you find these resources helpful! If you do use Node-RED for any of your Opto projects, or have any questions about how to use Node-RED with Opto devices, stop by our OptoForums and let us know!
Filed Under: Opto 22