Creating a New IOT Data Stream Device

Creating a IOT Data Stream Device ready to receive data.

Step 1 - Create a new IOT Integration Interface

When in the project, click on IOT Integrations in the left hand main-menu. If you dont see this menu them your user role does not have permission to access IOT integrations or your Twinview subscription does not include the IOT and Analytics package,

In the IOT Integrations modal click 'Add' and give your IOT Integration a name, for example 'External API Services'. We must also select a Reference and those should set to Twinview Direct Integration.

Click Save, and a new field will appear called 'Subdomain'. Enter "Ingestion" into this interface them click Save again.

Step 2 - Create a new IOT Data Stream Device

Now we have created our 'IOT Integration Interface' we can add the IOT Data Streams to the integration interface. Each IOT Data Stream in a single point of data, e.g. 'Temperature, Humidity, CO2 etc'.

When in the project click the 'IOT Integrations' in the left hand side menu, and when the model opens, you should see the IOT interface we created in step 3.1. Click 'Devices' to show all 'IOT Data Stream 'devices setup on the interface. At the moment we dont have any, so we must create one by clicking the 'Add'' button.

Give your IOT Data Stream Device a name and make sure the 'Type' is set to 'Sensor', then click 'Save'

circle-info

We strongly recommend that you define a standard naming schema for your IOT Data Stream devices as this will make them easier to recognise in the future when creating dashbords or reports that consume this data.

We recommend that the name should make it possible to know the Devices location in the building by incorporating the floor level, room and asset that the IOT Data Stream is applicable to.

The IOT Data Stream Device will be created and a new model will appear that allow you to specify the IOT Data Stream Device details. As a minimum we need to ensure that the 'Data Type' field (1) is set correctly for the type of data you are expecting to receive.

You will also notice that the Edit Device modal also shows 'Endpoint' URL (3) along with the request type POST. You will also see that Twinview is showing and example payload structure (3).

After clicking save we will see the device UUID has been generated. When posting data to the Twinview Data Ingestion service, we must specify tis UUID to associate the data to this IOT Device.

circle-info

Even though we have just added a new IOT Data Stream Device successfully if we tried to add the data stream to a dashboard widget the device would not show in the list when we try to pick the device, this is because when you create a new IOT Data Stream Device it does not yet belong to any security groups.

This behaviour is by design as making the device accessible before its been applied to a security group or adding it automatically to an existing security group would mean everyone would have access to the IOT Data Stream device.

Step 3 - Creating a new Device Security Group and associating the IOT Data Stream.

To create a new security group, while in the project goto the 'Settings ' which is accessible from the main left-hand menu.

In the Setting dialogue, click the 'Device Group' tab and then click 'Add' to create a new Device Group.

Give your device group a name and click 'Save' to create the Device Group. Once the Group has been created click the 'View' button to open the device group.

On the Device group window we fist need to go and add the IOT Data Stream Device we created earlier to our new 'Device Group'. To do this we click on the 'Devices' tab then click the 'Use' bottom against the IOT Data Stream Device we created earlier.

We have successfully assigned the IOT Data Stream Device to the Device Group. Next we need to assign ourselves to the Device Group so that the IOT Data Stream Device will be available for us to use on widgets, dashboarding and reporting. To do this click on the 'Users' tab and click 'Use' on your user, and any other users you want to be able access this IOT Data Stream Device.

circle-info

We recommend that you think about how you want to use Device Groups on your project and plan these into your onboarding and infrastructure strategy.

Some people have a single device group, and people have only a handful but use then carefully, for example "High Security Devices" and "Standard Devices".

Some clients use device groups to control access to devices by their tenants and or staff and have a device group for each Tennant/Apartment.

Last updated

Was this helpful?