This page has no translation to Português yet. The original English version is below. If you’d like to help, great! See how to translate a documentation page in the contribution guide.
Note This is a web-version of a tutorial chapter embedded right into the XOD IDE. To get a better learning experience we recommend to install the desktop IDE or start the browser-based IDE, and you’ll see the same tutorial there.

XOD Cloud Feeds

Screenshot of 015-xod-cloud-feeds

The basic Internet-of-Things applications is mostly about collecting some data and storing it in the cloud, or reacting to the data changes.

It can improve a production process on factories, lower the defect rate, and so on. Also, it integrates into a life of ordinary people: smart fridges, homes, greenhouses, wearable electronics, etc.

Some systems have their servers to collect the data. Still, for the individuals, maintaining such infrastructure is too complicated and expensive. Here comes the XOD Cloud service. Using it you can store and retrieve any data.

XOD provides the standard library called xod-cloud/feeds to work with cloud feeds easily. It has nodes to store and retrieve data.

You can see all your stored data at https://xod.io/feeds/

Now we’re going to store data in the cloud. In one of the next sections of the tutorial, we’ll retrieve the data and react to it.

You can see a cloud-store node here. This node stores data to your private feed. The feed is log-like storage of your data. The name of the feed is a path, like a path in URL or your filesystem. For example, bob/smart-home-project/room1/temperature. The cloud-store node prepends the username and project name automatically to the path. That’s why we bound the "moisture" value to the FEED input instead of a full path.

The program is ready, but to make it work, you have to do a few things related to authorization.

Excercise #

  1. Log in into your XOD account in the Account Pane (hit View → Toggle Account Pane).
  2. Open Project Preferences (hit Edit → Project Preferences). Ensure that the project has a name and click the “Generate” button next to the “XOD Cloud API Key” input.
  3. Run a simulation and change the value of a tweak-number node several times.
  4. Open the feeds page and check out the data stored in the feed named YOUR_USERNAME/welcome-to-xod/moisture.
Found a typo or mistake? Want to improve the text? Edit this page on GitHub and open a pull request. If you have a complex proposal or you want to discuss the content, feel free to start a new thread on XOD forum.