Ioto can be used as a stand-alone embedded web server or it can use the full cloud-based device management capabilities. Ioto provides a complete end-to-end cloud-based device management solution including device agent, cloud IoT service and a cloud-based Device Manager.
After Building Ioto run Ioto via make run:
When Ioto starts, it registers with the EmbedThis Builder cloud and waits to be claimed by a user for management. Until claimed, the device can only be locally managed locally via the embedded web server.
The process of associating a device with a user is called "Claiming" and consists of the user presenting a device claim ID that authorizes the user as the owner of the device. The unique claim ID is typically printed on the manufactured device. However, when evaluating Ioto, the Ioto agent will display the claim ID to the console.
An Ioto enabled device can be claimed by any user. Once claimed, the device is associated with the user, a device manager and the underlying device cloud.
During evalution, it is easiest to use the pre-existing Eval Cloud and Eval Device Manager. The Eval Cloud is a multi-tenant, shared cloud for evaluating Ioto. The Eval Manager is a developer device manager suitable for examining and managing devices and device data.
To claim the device using the Eval manager, navigate to the builder and select the Managers page.
Then click the Manage icon for the Eval manager. This will launch the Device Manager.
When you log into the Device Manager, you are logging in as a device user. This is a different account to your Builder login account. Device Manager logins are unique for each device cloud.
Enter your desired username and password and click Register. You will be sent an email confirmation code to complete your manager login.
Claiming a Device
After logging in, you will see the device list, which will be initially empty. Click the Claim Device button and enter your device claim ID to claim your device for management.
The Claim ID is the unique device ID displayed by Ioto when run. This ID is dynamically allocated when first run, but can be initialized via the config/device.json5 configuration file. During production, a generated device claim ID is typically printed on the device packaging and device label.
Read more in the Builder Claiming Devices documentation.
While an Ioto-enabled device is waiting to be claimed, Ioto will periodically check with the cloud service to see if it has been claimed.
Once the device is claimed via the Manager, Ioto will display:
When claimed, the Ioto agent will be provisioned with a unique device certificate for secure TLS communications and will connect to the cloud using the MQTT protocol. These will be saved under the ./state directory as ioto.crt and ioto.key.
Demonstration Cloud Messaging
The default Ioto configuration will run a demo routine to update a counter and send the updated value to the cloud. This counter updates every thirty seconds and can be monitored via the Device Manager.
In the Device Manager, select the claimed device from the device list.
This will then display the database tables and dashboard for this device.
The default device schema has a key/value table called the "Store". The demo counter, will update a value with the key of "counter". Click on the Store table to display the store contents.
This will display all the data items in the store for claimed devices. From here, you can modify an item by clicking the Edit icon or you can edit in place by clicking on a teal color cell and updating the value and then clicking Save.
You can reload the table contents by clicking the table reload icon.
The Device Manager includes the ability to display one or more dashboards with data widgets.
Click the Dashboard tab to display the default dashboard, then click the Add Widget icon to display the add widget panel.
You can display database and metric data using numeric, gauge or graphical widgets.
To display the demo counter as a numberic from the database, enter the following widget configuration:
This will select the Store table item that has a key value set to "counter" and display the "value" field.
After the ioto agent has run for a minute, there will be sufficient data points for a "COUNTER" metric to be created. Metrics permit the display of current and historical data using graphical widgets.
To display the demo counter as a graph using metrics, enter the following widget configuration:
That should get you started with Ioto and posting data to the cloud from your device.
Have a look at the start.c file for the code: