Let's Implement a "Hello World"
Teach BioT About Your Device
BioT needs to know a few things about your device:
- What configuration parameters (e.g. debug mode) of the device you would like to control remotely, from the cloud
- What status parameters you would like the device to transmit to BioT (e.g. what firmware version is installed)
- What other data points you would like the platform to maintain about the device (e.g. serial number of the device, name of device, which patient is allocated the device, etc…)
- What intended uses the device supports – i.e. what functions it can activate. Some devices have just a single function of "monitoring".
Once you have determined these, you can teach BioT about them by configuring a "device template". In BioT we call those parameters "attributes". See Adding a Device Template for a detailed description of how to do it.
Note
To be able to do a quick "hello world" integration with your device, we assume you added a boolean status attribute and named it "Hello World Status".
Add Some Devices
This is done through the Manufacturer Portal. Do the following:
- Login to the Manufacturer Portal.
The quickest way to do this is by clicking the four dots icon in the top right corner of the BioT Console, and selecting "Manufacturer Portal" from the BioT platforms list.
- In the Devices tab press Add and select the device template you defined before.
- Fill the attribute fields that you defined in the device template, and you're done.
Now when you select your device and press Expand, you should see fields for the parameters you configured in the template. You should also see the fields in the columns of the device list and in the preview to the right.
Integrate Your Hardware Device with the Platform
In order to see data from your devices in BioT, you will need to transmit the device data to the BioT platform. BioT supports the two ubiquitous kinds of connectivity architectures – direct and through-gateway. We have a dedicated integration guide for each architecture. These are the Direct Device Connection and Gateway Connection.
Start with a simple integration. Just implement the Connect to BioT and the Sending Statuses sections for now.
Send the following message to BioT using the topic <clientId>/from-device/status
:
{
"metadata":{
"timestamp":1661150759000
},
"data":{
"hello_world_status":true
}
}
Don't forget to update the epoch time.
After your device sends a new value for your status attribute, you will be able to view it in the Manufacturer Portal.
Tailor the Built-in Portals to Your Hello World
Up to now you probably saw the information you chose to send and configure, but you also saw other fields that come out of the box and you don't need. Also perhaps the order of the fields in the list, preview, and expand screens are not the way you'd like them to be. This is why the Portal Builder exists.
Open it from the BioT Console, choose Manufacturer Portal, and then the views of the Hello World example, which are "Device – List"
, "<your device template name> – Expand"
, "<your device template name> – Preview"
.
There you will be able to choose which fields to show and also their order. Don't forget to click Save.
Updated 11 months ago