Plugin file
Plugin configuration file
{
"name": "tinovi-pm-io-5-sm",
"version": "1.0.0",
"description": "LoRaWAN IO module with optional Soil and Air Lux sensors and optional boosted 12v reversible polarity output for latching valves.",
"author": "Thinger.io",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/thinger-io/plugins.git",
"directory": "tinovi-pm-io-5-sm"
},
"metadata": {
"name": "Tinovi PM-IO-5-SM",
"description": "LoRaWAN IO module with optional Soil and Air Lux sensors and optional boosted 12v reversible polarity output for latching valves.",
"image": "assets/pm-io-5-sm-package.png",
"category": "devices",
"vendor": "tinovi"
},
"resources": {
"products": [
{
"description": "LoRaWAN IO module with optional Soil and Air Lux sensors and optional boosted 12v reversible polarity output for latching valves.",
"enabled": true,
"name": "Tinovi PM-IO-5-SM",
"product": "tinovi_pm_io_5_sm",
"profile": {
"api": {
"downlink": {
"enabled": true,
"handle_connectivity": false,
"request": {
"data": {
"path": "/downlink",
"payload": "{\n \"data\" : \"{{payload.data=\"\"}}\",\n \"port\" : {{payload.port=85}},\n \"priority\": {{payload.priority=3}},\n \"confirmed\" : {{payload.confirmed=false}},\n \"uplink\" : {{property.uplink}} \n}",
"payload_function": "",
"payload_type": "",
"plugin": "{{property.uplink.source}}",
"target": "plugin_endpoint"
}
}
},
"uplink": {
"device_id_resolver": "getId",
"enabled": true,
"handle_connectivity": true,
"request": {
"data": {
"payload": "{{payload}}",
"payload_function": "",
"payload_type": "source_payload",
"resource_stream": "uplink",
"target": "resource_stream"
}
}
}
},
"autoprovisions": {
"device_autoprovisioning": {
"config": {
"mode": "pattern",
"pattern": "tinovi-pm-io-5-sm-.*"
},
"enabled": true
}
},
"buckets": {
"tinovi_pm_io_5_sm_data": {
"backend": "mongodb",
"data": {
"payload": "{{payload}}",
"payload_function": "decodeThingerUplink",
"payload_type": "source_payload",
"resource": "uplink",
"source": "resource",
"update": "events"
},
"enabled": true,
"retention": {
"period": 3,
"unit": "months"
},
"tags": []
}
},
"code": {
"code": "function decodeThingerUplink(thingerData) {\n // 0. If data has already been decoded, we will return it\n if (thingerData.decodedPayload) return thingerData.decodedPayload;\n \n // 1. Extract and Validate Input\n // We need 'payload' (hex string) and 'fPort' (integer)\n const hexPayload = thingerData.payload || \"\";\n const port = thingerData.fPort || 1;\n\n // 2. Convert Hex String to Byte Array\n const bytes = [];\n for (let i = 0; i < hexPayload.length; i += 2) {\n bytes.push(parseInt(hexPayload.substr(i, 2), 16));\n }\n\n // 3. Dynamic Function Detection and Execution\n \n // CASE A: (The Things Stack v3)\n if (typeof decodeUplink === 'function') {\n try {\n const input = {\n bytes: bytes,\n fPort: port\n };\n var result = decodeUplink(input);\n \n if (result.data) return result.data;\n\n return result; \n } catch (e) {\n console.error(\"Error inside decodeUplink:\", e);\n throw e;\n }\n }\n\n // CASE B: Legacy TTN (v2)\n else if (typeof Decoder === 'function') {\n try {\n return Decoder(bytes, port);\n } catch (e) {\n console.error(\"Error inside Decoder:\", e);\n throw e;\n }\n }\n\n // CASE C: No decoder found\n else {\n throw new Error(\"No compatible TTN decoder function (decodeUplink or Decoder) found in scope.\");\n }\n}\n\n\n// TTN decoder\n\nvar bytesToInt = function (/*byte[]*/byteArray, dev) {\n var value = 0;\n for (var i = 0; i < byteArray.length; i++) {\n value = (value * 256) + byteArray[i];\n }\n return value / dev;\n};\nvar bytesToSignedInt = function (bytes, dev) {\n var sign = bytes[0] & (1 << 7);\n var x = ((bytes[0] & 0xFF) << 8) | (bytes[1] & 0xFF);\n if (sign) {\n x = 0xFFFF0000 | x;\n }\n return x / dev;\n};\nfunction decodeUplink(input) {\n var bytes = input.bytes;\n var decoded = {};\n var pos = 1;\n decoded.valv = ((bytes[0] >> 7) & 1);\n decoded.leak = ((bytes[0] >> 6) & 1);\n decoded.bat = bytes[pos++];\n if (((bytes[0] >> 0) & 1) === 1) { //SOIL\n decoded.e25 = bytesToInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n decoded.ec = bytesToInt(bytes.slice(pos, pos + 2), 10);\n pos = pos + 2;\n decoded.temp = bytesToSignedInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n decoded.vwc = bytesToInt(bytes.slice(pos, pos + 2), 1);\n pos = pos + 2;\n }\n if (((bytes[0] >> 1) & 1) === 1) { //BME\n decoded.airTemp = bytesToSignedInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n decoded.airHum = bytesToInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n var airPressuse = bytesToInt(bytes.slice(pos, pos + 2), 1) + 50000;\n if (airPressuse !== 65536) {\n decoded.airPres = airPressuse;\n }\n pos = pos + 2;\n }\n if (((bytes[0] >> 2) & 1) === 1) { //OPT\n decoded.lux = bytesToInt(bytes.slice(pos, pos + 4), 100);\n pos = pos + 4;\n }\n if (((bytes[0] >> 4) & 1) === 1) { //PULSE\n decoded.pulse = bytesToInt(bytes.slice(pos, pos + 4), 1);\n pos = pos + 4;\n }\n if (((bytes[0] >> 3) & 1) === 1) { //SOIL\n decoded.e25_1 = bytesToInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n decoded.ec_1 = bytesToInt(bytes.slice(pos, pos + 2), 10);\n pos = pos + 2;\n decoded.temp_1 = bytesToSignedInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n decoded.vwc_1 = bytesToInt(bytes.slice(pos, pos + 2), 1);\n pos = pos + 2;\n }\n if (((bytes[0] >> 5) & 1) === 1) { //PRESSURE\n decoded.press = bytesToInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n }\n if (bytes.length > (pos + 1)) {\n var set1 = bytes[pos++];\n if (((set1 >> 1) & 1) === 1) { //LEAF\n decoded.leafHum = bytesToInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n decoded.leafTemp = bytesToSignedInt(bytes.slice(pos, pos + 2), 100);\n pos = pos + 2;\n }\n }\n return {\n data: decoded,\n };\n}\n\n",
"environment": "javascript",
"storage": "",
"version": "1.0"
},
"properties": {
"uplink": {
"data": {
"payload": "{{payload}}",
"payload_function": "",
"payload_type": "source_payload",
"resource": "uplink",
"source": "resource",
"update": "events"
},
"default": {
"source": "value"
},
"enabled": true
}
}
},
"_resources": {
"properties": [
{
"property": "dashboard",
"value": {
"tabs": [
{
"name": "Overview",
"widgets": [
{
"layout": {
"col": 0,
"row": 0,
"sizeX": 1,
"sizeY": 6
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Battery Level"
},
"properties": {
"color": "#f0e924",
"max": 100,
"min": 0,
"unit": "%"
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "bat",
"tags": {
"device": [],
"group": []
}
},
"color": "#f0e924",
"name": "Battery",
"source": "bucket",
"timespan": {
"mode": "latest"
}
}
],
"type": "donutchart"
},
{
"layout": {
"col": 1,
"row": 0,
"sizeX": 1,
"sizeY": 6
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Valve Status"
},
"properties": {
"color": "#1abc9c",
"max": 1,
"min": 0,
"unit": ""
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "valv",
"tags": {
"device": [],
"group": []
}
},
"color": "#1abc9c",
"name": "Valve",
"source": "bucket",
"timespan": {
"mode": "latest"
}
}
],
"type": "donutchart"
},
{
"layout": {
"col": 2,
"row": 0,
"sizeX": 1,
"sizeY": 6
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Leak Detection"
},
"properties": {
"color": "#e74c3c",
"max": 1,
"min": 0,
"unit": ""
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "leak",
"tags": {
"device": [],
"group": []
}
},
"color": "#e74c3c",
"name": "Leak",
"source": "bucket",
"timespan": {
"mode": "latest"
}
}
],
"type": "donutchart"
},
{
"layout": {
"col": 0,
"row": 6,
"sizeX": 3,
"sizeY": 15
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Soil Temperature"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "temp",
"tags": {
"device": [],
"group": []
}
},
"color": "#e74c3c",
"name": "Soil Temp 1",
"source": "bucket",
"timespan": {
"magnitude": "hour",
"mode": "relative",
"period": "latest",
"value": 24
}
},
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "temp_1",
"tags": {
"device": [],
"group": []
}
},
"color": "#f39c12",
"name": "Soil Temp 2",
"source": "bucket",
"timespan": {
"magnitude": "hour",
"mode": "relative",
"period": "latest",
"value": 24
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 6,
"sizeX": 3,
"sizeY": 15
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Volumetric Water Content"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "vwc",
"tags": {
"device": [],
"group": []
}
},
"color": "#3498db",
"name": "VWC 1",
"source": "bucket",
"timespan": {
"magnitude": "hour",
"mode": "relative",
"period": "latest",
"value": 24
}
},
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "vwc_1",
"tags": {
"device": [],
"group": []
}
},
"color": "#1abc9c",
"name": "VWC 2",
"source": "bucket",
"timespan": {
"magnitude": "hour",
"mode": "relative",
"period": "latest",
"value": 24
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 0,
"sizeX": 1,
"sizeY": 6
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Air Temperature"
},
"properties": {
"color": "#e74c3c",
"max": 60,
"min": -40,
"unit": "°C"
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "airTemp",
"tags": {
"device": [],
"group": []
}
},
"color": "#e74c3c",
"name": "Air Temp",
"source": "bucket",
"timespan": {
"mode": "latest"
}
}
],
"type": "donutchart"
},
{
"layout": {
"col": 4,
"row": 0,
"sizeX": 1,
"sizeY": 6
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Air Humidity"
},
"properties": {
"color": "#3498db",
"max": 100,
"min": 0,
"unit": "%RH"
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "airHum",
"tags": {
"device": [],
"group": []
}
},
"color": "#3498db",
"name": "Air Hum",
"source": "bucket",
"timespan": {
"mode": "latest"
}
}
],
"type": "donutchart"
},
{
"layout": {
"col": 5,
"row": 0,
"sizeX": 1,
"sizeY": 6
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Air Pressure"
},
"properties": {
"color": "#9b59b6",
"max": 110000,
"min": 90000,
"unit": "Pa"
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "airPres",
"tags": {
"device": [],
"group": []
}
},
"color": "#9b59b6",
"name": "Pressure",
"source": "bucket",
"timespan": {
"mode": "latest"
}
}
],
"type": "donutchart"
}
]
},
{
"name": "Soil Sensors",
"widgets": [
{
"layout": {
"col": 0,
"row": 0,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Soil Temperature History"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "temp",
"tags": {
"device": [],
"group": []
}
},
"color": "#e74c3c",
"name": "Soil Temp 1",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
},
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "temp_1",
"tags": {
"device": [],
"group": []
}
},
"color": "#f39c12",
"name": "Soil Temp 2",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 0,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "VWC History"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "vwc",
"tags": {
"device": [],
"group": []
}
},
"color": "#3498db",
"name": "VWC 1",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
},
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "vwc_1",
"tags": {
"device": [],
"group": []
}
},
"color": "#1abc9c",
"name": "VWC 2",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 0,
"row": 8,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Electrical Conductivity (EC)"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "ec",
"tags": {
"device": [],
"group": []
}
},
"color": "#16a085",
"name": "EC 1",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
},
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "ec_1",
"tags": {
"device": [],
"group": []
}
},
"color": "#27ae60",
"name": "EC 2",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 8,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Permittivity (e25)"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "e25",
"tags": {
"device": [],
"group": []
}
},
"color": "#8e44ad",
"name": "e25 1",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
},
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "e25_1",
"tags": {
"device": [],
"group": []
}
},
"color": "#9b59b6",
"name": "e25 2",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
}
]
},
{
"name": "Air & Environment",
"widgets": [
{
"layout": {
"col": 0,
"row": 0,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Air Temperature History"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "airTemp",
"tags": {
"device": [],
"group": []
}
},
"color": "#e74c3c",
"name": "Air Temperature",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 0,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Air Humidity History"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "airHum",
"tags": {
"device": [],
"group": []
}
},
"color": "#3498db",
"name": "Air Humidity",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 0,
"row": 8,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Atmospheric Pressure"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "airPres",
"tags": {
"device": [],
"group": []
}
},
"color": "#9b59b6",
"name": "Pressure",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 8,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Light Intensity (Lux)"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "lux",
"tags": {
"device": [],
"group": []
}
},
"color": "#f39c12",
"name": "Lux",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
}
]
},
{
"name": "Auxiliary Sensors",
"widgets": [
{
"layout": {
"col": 0,
"row": 0,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Leaf Temperature"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "leafTemp",
"tags": {
"device": [],
"group": []
}
},
"color": "#27ae60",
"name": "Leaf Temperature",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 0,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Leaf Humidity"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "leafHum",
"tags": {
"device": [],
"group": []
}
},
"color": "#16a085",
"name": "Leaf Humidity",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 0,
"row": 8,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Pressure Sensor"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "press",
"tags": {
"device": [],
"group": []
}
},
"color": "#e67e22",
"name": "Pressure",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
},
{
"layout": {
"col": 3,
"row": 8,
"sizeX": 3,
"sizeY": 8
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Pulse Counter"
},
"properties": {
"axis": true,
"fill": false,
"legend": true,
"multiple_axes": false
},
"sources": [
{
"bucket": {
"backend": "mongodb",
"id": "tinovi_pm_io_5_sm_data",
"mapping": "pulse",
"tags": {
"device": [],
"group": []
}
},
"color": "#34495e",
"name": "Pulse Count",
"source": "bucket",
"timespan": {
"magnitude": "day",
"mode": "relative",
"period": "latest",
"value": 7
}
}
],
"type": "chart"
}
]
}
]
}
}
]
}
}
]
}
}