Skip to content

Commit

Permalink
Add IoT Center Dashboard Template
Browse files Browse the repository at this point in the history
  • Loading branch information
devmirek committed Mar 1, 2021
1 parent 7a5b8d4 commit b885918
Show file tree
Hide file tree
Showing 3 changed files with 296 additions and 0 deletions.
253 changes: 253 additions & 0 deletions iot_center/iot_center.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
apiVersion: influxdata.com/v2alpha1
kind: Label
metadata:
name: spectacular-yalow-bfb001
spec:
color: '#be2ee4'
name: IoT
---
apiVersion: influxdata.com/v2alpha1
kind: Variable
metadata:
name: zealous-williams-ffb001
spec:
language: flux
name: IoT_Device
query: "import \"influxdata/influxdb/v1\"\r\nv1.tagValues(bucket: \"iot_center\",
tag: \"clientId\")"
type: query
---
apiVersion: influxdata.com/v2alpha1
kind: Dashboard
metadata:
name: upbeat-nightingale-ffb001
spec:
charts:
- colors:
- hex: '#00C9FF'
id: "0"
name: laser
type: min
value: -30
- hex: '#BF3D5E'
id: "1"
name: ruby
type: max
value: 60
decimalPlaces: 2
height: 5
kind: Gauge
name: Actual Temperature
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Temperature\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"
suffix: ' °C'
width: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: Temperature °C
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: Temperature
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Temperature\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
shade: true
width: 12
xCol: _time
yCol: _value
yPos: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: Humidity %
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: Humidity
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Humidity\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 9
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: Pressure hPa
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: Pressure
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Pressure\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 13
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: CO2 ppm
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: CO2
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"CO2\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 17
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: TVOC ppb
name: y
scale: linear
colors:
- hex: '#31C0F6'
id: 024cd205-6cf6-4aa2-b6da-d8d052bb1f9b
name: Nineteen Eighty Four
type: scale
- hex: '#A500A5'
id: c5472a5f-6349-40a2-9374-d7eaca9864e8
name: Nineteen Eighty Four
type: scale
- hex: '#FF7E27'
id: 355ddac5-4625-49f7-aa78-00202e3e51c4
name: Nineteen Eighty Four
type: scale
geom: line
height: 4
kind: Xy
name: TVOC
position: overlaid
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"TVOC\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: mean, createEmpty: false)\n |> yield(name: \"mean\")"
width: 12
xCol: _time
yCol: _value
yPos: 21
- colors:
- hex: '#00C9FF'
id: "0"
name: laser
type: min
- hex: '#BF3D5E'
id: "1"
name: ruby
type: max
value: 100
decimalPlaces: 2
height: 5
kind: Gauge
name: Actual Humidity
queries:
- query: "from(bucket: \"iot_center\")\n |> range(start: v.timeRangeStart,
stop: v.timeRangeStop)\n |> filter(fn: (r) => r[\"_measurement\"]
== \"environment\")\n |> filter(fn: (r) => r[\"_field\"] == \"Humidity\")\n
\ |> filter(fn: (r) => r[\"clientId\"] == v.IoT_Device) \n |> aggregateWindow(every:
v.windowPeriod, fn: last, createEmpty: false)\n |> yield(name: \"last\")"
suffix: ' %'
width: 5
xPos: 5
name: IoT Center
Binary file added iot_center/iot_center_dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions iot_center/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# IoT Center Template

Provided by: [bonitoo.io](.)

This template provides a dashboard for [IoT Center](https://github.com/bonitoo-io/iot-center-v2) demo application.

### Dashboard example

![Screenshot](iot_center_dashboard.png)

### Quick Install

#### InfluxDB UI

In the InfluxDB UI, go to Settings->Templates and enter this URL: https://github.com/influxdata/community-templates/tree/master/iot_center/iot_center.yml

#### Influx CLI
If you have your InfluxDB credentials [configured in the CLI](https://v2.docs.influxdata.com/v2.0/reference/cli/influx/config/), you can install this template with:

```
influx apply https://github.com/influxdata/community-templates/tree/master/iot_center/iot_center.yml
```

## Included Resources

This template includes the following:

- 0 Buckets:
- 1 Label: `IoT`
- 0 Telegraf Configurations:
- 0 Checks:
- 1 Dashboards: `IoT Center Application Monitoring`
- 1 Variable: `IoT_Device`

## Setup Instructions

1. Load the dashboard according to the the paragraph above
1. Run IoT Center application according to the [installation steps](https://github.com/bonitoo-io/iot-center-v2)
1. Generate demo data using Virtual device

## Contact

Author: Miroslav Malecha, https://www.bonitoo.io

0 comments on commit b885918

Please sign in to comment.