TC4.9: New Support Widgets for Bars, Barseries, Trend, and Series, on Dashboards and IOT Applications

Test Case Title

TC4.9: New Support Widgets for Bars Series and Multi Series, on Dashboards and IOT Applications

Goal

the show of data dynamically on  a Widget into the Dashboard, as bars, staked barseries, time series, staked time series, kiviat, net diagrams, dunut, pie, multipie, etc. etc.

Prerequisites

the Users has to capable to use and IOT App, and know a little of JavaScript and HTML

Expected successful result

Activate a dashboard in which dynamic data cam be shown from IOT App and thus for shiwing any kind of single content.

Steps

 

installation info into the dashboard builder .

 

see also tables summarizing: HOW TO: HLT vs Ingestion, and HLT vs Widgets

The wizard is going to present a new column that is called “value unit”. It values can be: PPM, mg/m3, C, F, Euro, etc… that is the concept of unit of measure already addressed on all HLT of kind “sensor” which are the majority of data passing into KB and IOT. The value presented in the diagram is the last value of sensor time series. On this regard, the data kind Dictionaries is available for the higher roles and on premise soon. 

An integrated exmaple https://main.snap4city.org/view/index.php?iddasboard=Mjk5NQ==

Selecting homogenous sensors for “value unit” is possible on wizard to create:

Multi value Barcharts (vertical and horizontal, normal and staked)

 

See https://www.snap4city.org/dashboardSmartCity/view/index.php?iddasboard=ODM=

See also: https://www.snap4city.org/dashboardSmartCity/view/index.php?iddasboard=MjQwMA==

Only starting from Wizard and editing details on “more Options” in editing the widget, with a higher level of flexibility with respect to now that is working on native Metrics of Dashboard builder…. That is less flexible.

Presently this feature is available for:
-- HLT sensors (coming from IOT or ETL as well, showing the last value of the time series if any), with ServiceURI as MetricID
-- HLT MyPersonal Data
-- HLT KPI/ Metrics (which are metrics that you can create by using SQL in your on premise version, or those that are offered for you, or if you have on cloud the user level to do it)

-- HLT MyKPI (also adding the concept of “value unit” on MyKPI, see the new column on Dashboard Wizard)
-- Dynamic values and variables can be sent to a barseries without the need of having defined them as MyKPI or other variable in the system. So that you can create fully dynamic barseries from an IOT App into a Dashboard widget and you can mix dynamic values with those defined and taken from historical data, from KPI, from sensors, etc. 

-- grouping/staking with variables into the same Device, so that you can create a device with 3 values (e.g., called A, B and C) and see them staked/sommed if they have the same value_unit. This can be used for creating staked graph / bars representing some conditions. E.g., the percentage of of time spent on: Moving, walking, running during the day. This is implemented by a flag in the more-option of the widget that allow to exchange the groupingmodel.

The IOT App can dynamically creates/changes the widget on the Dashboard at run time, according to some event of data. This allowd to all users to create their dynamic dashboard which can adapt the data to be shown according to the events and data collected without changing manually the dashboard.  
The Snap4City suite on Node-RED has been updated at the release time.

Presently some online help into the NodeRED can be not updated. 

for example the MSG.payload to be sent at the barseries node could be as follows. The last metric has no valid MetricID so that is is a dynamic variable fully defined on the fly.

An integrated exmaple https://main.snap4city.org/view/index.php?iddasboard=Mjk5NQ==

[
    {
        "metricId": "http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3166540",
        "metricHighLevelType": "Sensor",
        "metricName": "tusc_weather_sensor_ow_3166540",
        "metricType": "airTemperature"
    },
    {
        "metricId": "http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3182522",
        "metricHighLevelType": "Sensor",
        "metricName": "tusc_weather_sensor_ow_3182522",
        "metricType": "airTemperature"
    },
    {
        "metricId": "17057447",
        "metricHighLevelType": "MyKPI",
        "metricName": "OBD2 - Intake Air Temperature",
        "metricType": "Temperature"
    },
    {
        "metricId": "17056579",
        "metricHighLevelType": "MyKPI",
        "metricName": "OBD2 - Intake Air Temperature",
        "metricType": "Temperature"
    },
    {
        "metricId": "",
        "metricHighLevelType": "Dynamic",
        "metricName": "BatteryGalaxyNote",
        "metricType": "Temperature",
        "metricValueUnit": "°C",
        "measuredTime": "2019-11-21T14:51:00Z",
        "value": 42
    },
    {
        "metricId": "",
        "metricHighLevelType": "Dynamic",
        "metricName": "Storage",
        "metricType": "Space",
        "metricValueUnit": "Gb",
        "measuredTime": "2019-11-21T14:51:00Z",
        "value": 12
    }
]

another example: the following is the JSON to be sent at the NODE called Barseries into the IOT App

[{"metricId":"http://www.disit.org/km4city/resource/tusc_weather_sensor_ow_3166540","metricHighLevelType":"Sensor","metricName":"tusc_weather_sensor_ow_3166540","metricType":"airTemperature"},{"metricId":"https://servicemap.disit.org/WebAppGrafo/api/v1/?serviceUri=http://www.d...","metricHighLevelType":"Sensor","metricName":"tusc_weather_sensor_ow_3182522","metricType":"airTemperature"},{"metricId":"17056320","metricHighLevelType":"MyKPI","metricName":"SiiMTuscanyTrackerLocation","metricType":"Velocity"},{"metricId":"","metricHighLevelType":"Dynamic","metricName":"BatteryTemperatureGalaxyNote","metricType":"Gradi Centigradi","metricValueUnit":"°C","measuredTime":"2019-11-21T14:51:00Z","value":55.395468539280635},{"metricId":"","metricHighLevelType":"Dynamic","metricName":"BatteryTemperaturemia","metricType":"Gradi Centigradi","metricValueUnit":"°C","measuredTime":"2019-11-21T14:51:00Z","value":51.396725502373464},{"metricId":"","metricHighLevelType":"Dynamic","metricName":"BatteryTemperaturemia","metricType":"airTemperature","metricValueUnit":"°C","measuredTime":"2019-11-21T14:51:00Z","value":29.150364690965127}]

showing staked bars with a mixt of metrics, KPI and Dynamic data totally generated from IOT App locally and randomsly. So that this widget can be found on the following Dashboard

in https://www.snap4city.org/dashboardSmartCity/view/index.php?iddasboard=MjQxNA==

Presently the staked is performed on the basis of identical VariableNames (metricNames) of the different devices (data sources), if they present the same value_unit, so that they are sommable. 

Multi Time Series (normal, shaded and staked)

Also in this case they have to be of the same “value unit” and produced from Wizard