Resources

Renesas IoT Sandbox Documentation

Streams, Tags, & Data Types


Introduction

Renesas IoT Sandbox accepts data as events in JSON format. Each event has an “observed at” time and “event data”. The “observed at” is the timestamp in ISO format in which the event occurred. It is an optional field -- if not specified, then the current timestamp will be used. The “event data” consists of a “tag name” (also known as “key”) and the “value”. When these events are sent in, they are sorted in different data streams. In addition to data streams, each tag is also categorized into data types. In this section, you will learn more about streams, tags, and data types.


Working with JSON data

Renesas IoT Sandbox accepts data in the JSON format. Below are some examples of correct JSON data format:

  • Example 1: Sending in one event with one tag

    {"observed_at": "2016-02-16T15:14:08-08:00","event_data": {"tag_name":"string_data"}}
  • Example 2: Sending in one event with two tags

    {"observed_at": "2016-02-16T15:14:08-08:00","event_data": {"tag_name1":"string_data", "tag_name2":100}}
  • Example 3: Including add_client_ip
    {"observed_at": "2016-02-16T15:14:08-08:00", "event_data": {"tag_name1":"string_data"}, "add_client_ip":true}


The fields are:

  • observed_at (optional) : This field is the time that the data is observed. It is in ISO8601-formatted text string. If this field is not sent in the JSON, the received at timestamp will be used.
    • Example: "2014-07-25T12:12:56.2345-08:00"
  • add_client_ip (optional) : If add_client_ip = true is in the JSON, the client IP address is pushed into the event's event_data as the tag ip_address. This boolean field is placed at the same level as the event_data dictionary.
  • event_data (required) : This field with the data that is being written. It can be multi-item and multi-level.

Note: The accepted size limit is 64k (65536 characters) per event from opening brace to closing brace


Streams

Streams are a logical grouping of data events which helps the user categorize their data. There are two main kinds of streams: Raw and Processed. Below, there is more information on how to use streams and more about the different types.

Raw vs. Processed streams

Raw streams consists of all the data generated by the API Basic User. Whenever this user sends JSON data into Renesas IoT Sandbox’s platform, it is automatically placed in the Raw streams. This data is untouched and not modified in any way. There is only one Raw stream and a new one cannot be created.

Processed streams come from the data generated through Renesas IoT Sandbox’s workflows. There is already a default processed stream in which all workflow events are grouped in but the user can create another processed stream if needed. If this is the case, the user would need to set the workflow output to go to this processed stream in the Workflow Studio.

View, create, edit, and delete streams

To view the streams, click on the Data Streams page under Data Viewer. By default, every project has a “Raw Stream” and “Processed Stream”.

To be able to create, edit, or delete streams, the user must be a Web Administrator. More info can be found about User Permissions here.

On this page, only a new processed data stream can be created. However, both Raw and Processed streams may be edited. In the edit page, the Web Administrator can change the name of the stream as well as make a tag active or inactive. More information on tags can be found in the next section.

Similarly to creating streams, only processed streams may be deleted.

Note: If a Web Administrator deletes a processed stream, the workflows that send data to this stream is automatically deactivated.


Tags

As mentioned in the introduction, Tags are also known as “keys” and sent with the “ value”. Tags, in addition to Data Streams, help categorize the event data even further. Here are some examples of Tags:

  • age
  • height
  • battery_level
  • BPM

Note: Renesas IoT Sandbox accepts alphanumeric characters, underscores, and dashes for Tag names. More info about special character limitations can be found here(?specialcharcters).

Every time a new tag is sent to Renesas IoT Sandbox, it is auto-detected and will appear in it's respective stream. The values that are sent with the Tags can vary in each event. (i.e. battery_level can be 100 in one event and 75 in the next).

Data Types for each new tag are also auto-detected and will be further explained in the Data Types section below.

How to activate Tags

By default, every new tag is set as an Inactive tag. To be able to visualize this data on Renesas IoT Sandbox, it must be set as Active. This can be done on the editing Data Streams page as shown on this image:

Note: If there is a mismatch between Tag and Data Type, the data may not be displayed correctly in the widgets.


Data Types

In addition to being grouped into streams, tags are automatically categorized into one of several base and extended data types that reflect the values they are associated with.These data types determine how tags are read and which widgets they can be displayed on. After auto-categorization, the Web Standard User and Web Administrator will still have the ability to change the data type per tag. Below is a list of different data types in the Medium One platform.

Base Types

  • Number: Numeric value, integer or floating point
  • String: Sequence of characters, surrounded by double quotes " "
  • Boolean: a true or false value
  • Array: unsorted list of any primary Data Types
  • Null: null values will be accepted but discarded

Additionally, the Renesas IoT Sandbox platform supports extended Data Types as follow:

Extended Types

  • Geopoint: Submitted as a string following the ISO6709 notation restricted to floating point values as Latitude,Longitude, Altitude(optional) "+/-DD.DDDDD +/-DDD.DDDDD +/-DDDDDD.D", for example "-48.8577 002.295" or "-48.8577 002.295 1"
  • ISO8601 Date/Time: A String primary type following the ISO8601 date/time format.

Note: More info about special character limitations for each Data Type can be found here.

Type Behavior

Renesas IoT Sandbox platform additionally distinguishes data behavior as described below. This behavior is only relevant for how the data is visualized on the dashboard widgets, and does not affect workflow processing.

  • Time Series: Identifies a Data Type as being a value changing over time, used for visualization in time-based charts and for search and filtering in time-based queries. For example, battery charge measurement that is measured and analysed over time.
  • Last Value: Identifies a Data Type as being 'static' information, used for group charts or for filtering users within a population. This effectively means "at the present time". For example, zipcode or height where effectively only the most current value matters.

Note: Data Type auto-detection automatically sets all type behavior as time series. For a type to be Last Value, it must be set on the data streams page.




Getting Started
User Roles & Permissions
Streams, Tags, & Data Types
Dashboard Widgets
API
Workflow Studio
Workflow Libraries
Metering
Special Characters
Third Party Integration
Mobile
API Explorer

Streams, Tags, & Data Types


Introduction

Renesas IoT Sandbox accepts data as events in JSON format. Each event has an “observed at” time and “event data”. The “observed at” is the timestamp in ISO format in which the event occurred. It is an optional field -- if not specified, then the current timestamp will be used. The “event data” consists of a “tag name” (also known as “key”) and the “value”. When these events are sent in, they are sorted in different data streams. In addition to data streams, each tag is also categorized into data types. In this section, you will learn more about streams, tags, and data types.


Working with JSON data

Renesas IoT Sandbox accepts data in the JSON format. Below are some examples of correct JSON data format:

  • Example 1: Sending in one event with one tag

    {"observed_at": "2016-02-16T15:14:08-08:00","event_data": {"tag_name":"string_data"}}
  • Example 2: Sending in one event with two tags

    {"observed_at": "2016-02-16T15:14:08-08:00","event_data": {"tag_name1":"string_data", "tag_name2":100}}
  • Example 3: Including add_client_ip
    {"observed_at": "2016-02-16T15:14:08-08:00", "event_data": {"tag_name1":"string_data"}, "add_client_ip":true}


The fields are:

  • observed_at (optional) : This field is the time that the data is observed. It is in ISO8601-formatted text string. If this field is not sent in the JSON, the received at timestamp will be used.
    • Example: "2014-07-25T12:12:56.2345-08:00"
  • add_client_ip (optional) : If add_client_ip = true is in the JSON, the client IP address is pushed into the event's event_data as the tag ip_address. This boolean field is placed at the same level as the event_data dictionary.
  • event_data (required) : This field with the data that is being written. It can be multi-item and multi-level.

Note: The accepted size limit is 64k (65536 characters) per event from opening brace to closing brace


Streams

Streams are a logical grouping of data events which helps the user categorize their data. There are two main kinds of streams: Raw and Processed. Below, there is more information on how to use streams and more about the different types.

Raw vs. Processed streams

Raw streams consists of all the data generated by the API Basic User. Whenever this user sends JSON data into Renesas IoT Sandbox’s platform, it is automatically placed in the Raw streams. This data is untouched and not modified in any way. There is only one Raw stream and a new one cannot be created.

Processed streams come from the data generated through Renesas IoT Sandbox’s workflows. There is already a default processed stream in which all workflow events are grouped in but the user can create another processed stream if needed. If this is the case, the user would need to set the workflow output to go to this processed stream in the Workflow Studio.

View, create, edit, and delete streams

To view the streams, click on the Data Streams page under Data Viewer. By default, every project has a “Raw Stream” and “Processed Stream”.

To be able to create, edit, or delete streams, the user must be a Web Administrator. More info can be found about User Permissions here.

On this page, only a new processed data stream can be created. However, both Raw and Processed streams may be edited. In the edit page, the Web Administrator can change the name of the stream as well as make a tag active or inactive. More information on tags can be found in the next section.

Similarly to creating streams, only processed streams may be deleted.

Note: If a Web Administrator deletes a processed stream, the workflows that send data to this stream is automatically deactivated.


Tags

As mentioned in the introduction, Tags are also known as “keys” and sent with the “ value”. Tags, in addition to Data Streams, help categorize the event data even further. Here are some examples of Tags:

  • age
  • height
  • battery_level
  • BPM

Note: Renesas IoT Sandbox accepts alphanumeric characters, underscores, and dashes for Tag names. More info about special character limitations can be found here(?specialcharcters).

Every time a new tag is sent to Renesas IoT Sandbox, it is auto-detected and will appear in it's respective stream. The values that are sent with the Tags can vary in each event. (i.e. battery_level can be 100 in one event and 75 in the next).

Data Types for each new tag are also auto-detected and will be further explained in the Data Types section below.

How to activate Tags

By default, every new tag is set as an Inactive tag. To be able to visualize this data on Renesas IoT Sandbox, it must be set as Active. This can be done on the editing Data Streams page as shown on this image:

Note: If there is a mismatch between Tag and Data Type, the data may not be displayed correctly in the widgets.


Data Types

In addition to being grouped into streams, tags are automatically categorized into one of several base and extended data types that reflect the values they are associated with.These data types determine how tags are read and which widgets they can be displayed on. After auto-categorization, the Web Standard User and Web Administrator will still have the ability to change the data type per tag. Below is a list of different data types in the Medium One platform.

Base Types

  • Number: Numeric value, integer or floating point
  • String: Sequence of characters, surrounded by double quotes " "
  • Boolean: a true or false value
  • Array: unsorted list of any primary Data Types
  • Null: null values will be accepted but discarded

Additionally, the Renesas IoT Sandbox platform supports extended Data Types as follow:

Extended Types

  • Geopoint: Submitted as a string following the ISO6709 notation restricted to floating point values as Latitude,Longitude, Altitude(optional) "+/-DD.DDDDD +/-DDD.DDDDD +/-DDDDDD.D", for example "-48.8577 002.295" or "-48.8577 002.295 1"
  • ISO8601 Date/Time: A String primary type following the ISO8601 date/time format.

Note: More info about special character limitations for each Data Type can be found here.

Type Behavior

Renesas IoT Sandbox platform additionally distinguishes data behavior as described below. This behavior is only relevant for how the data is visualized on the dashboard widgets, and does not affect workflow processing.

  • Time Series: Identifies a Data Type as being a value changing over time, used for visualization in time-based charts and for search and filtering in time-based queries. For example, battery charge measurement that is measured and analysed over time.
  • Last Value: Identifies a Data Type as being 'static' information, used for group charts or for filtering users within a population. This effectively means "at the present time". For example, zipcode or height where effectively only the most current value matters.

Note: Data Type auto-detection automatically sets all type behavior as time series. For a type to be Last Value, it must be set on the data streams page.