In this section, we’ll talk about some concepts behind the Afero development process.
Your device’s attributes and values, and how the Afero Platform uses them, are concepts foundational to development. To understand your device in terms of its attributes and values, think about what your device can do (its attributes), then the ways in which it can do it (its values).
Let’s look at an example, a simple light bulb:
The Light Bulb Example
Our example light bulb has two attributes:
For each attribute, we need to decide the possible values:
When deciding on attributes, you can create attributes for all the functions your device is capable of, or just selected ones. You are free to decide what kind of control you want to give your user, and how granular you want that control to be. There’s a lot of flexibility built into the system to accommodate your specific design goals. (Read more in Great Attribute Modeling.)
Next, we’ll talk about how device attributes and values translate into user controls on a mobile app.
Now that we have a good idea of the light bulb’s attributes and possible values, think about how a user would control those device functions from a mobile app interface. We’ll stay with our light bulb example:
We want a user to control the light bulb from their Profile Editor, so for each attribute we need to present a suitable UI element that gives the user a reasonable level of control:
The data type and function of each attribute will suggest the logical UI control element to use. Some examples:
In addition to the controls just mentioned, the Profile Editor offers other standard controls such as buttons, and specialized controls like a battery level display; and more are coming.
All the information that we’ve defined for the light bulb – the attributes and values, the mobile app UI controls – is consumed by the Afero Profile Editor, where it is efficiently packaged into a portable device “Profile”, described next.
We create a device Profile for the light bulb using the Afero Profile Editor app. The Profile Editor systematically gathers the information it needs so it can create three definitions:
Some basic information about the type of light bulb |
⟶ | Device Type Definition |
The light bulb’s attributes and possible values |
⟶ | Device Attribute Definition |
The UI controls that represent the light bulb’s attributes in the mobile app |
⟶ |
Mobile App UI Definition |
When the definitions are complete, the Profile Editor “publishes” your device’s information to the Afero Platform, to each place it’s needed. Read about the flow in the next section.
The device definitions that the Profile Editor packages into the device Profile are used throughout the Afero Platform. The picture below illustrates the information flow once you click the Publish button in the Profile Editor:
The device Profile leaves the Profile Editor and enters the Afero Cloud. Profiles are stored in the cloud and retrieved on demand by components within the Afero Platform.