Plugin file
Plugin configuration file
{
"name": "dragino-lt22222l",
"version": "1.1.2",
"description": "Dragino LT-22222-L LoRa I/O Controller plugin for Thinger.io",
"author": "Thinger.io",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/thinger-io/plugins.git",
"directory": "dragino-lt22222l"
},
"metadata": {
"name": "Dragino LT-22222-L LoRa I/O Controller",
"description": "Dragino LT-22222-L integration with Thinger.io",
"image": "https://s3.eu-west-1.amazonaws.com/thinger.io.files/plugins/dragino-lt22222l/img/LT-22222-L.png"
},
"resources": {
"products": [
{
"enabled": true,
"name": "Dragino LT-22222-L LoRa I/O Controller",
"product": "dragino_lt22222l",
"profile": {
"api": {
"downlink": {
"enabled": true,
"handle_connectivity": false,
"request": {
"data": {
"path": "/downlink",
"payload": "{\n \"payload\": {{payload}},\n \"uplink\": {{property.uplink}}\n}",
"payload_function": "prepareDownlink",
"payload_type": "",
"plugin": "{{property.uplink.source}}",
"target": "plugin_endpoint"
}
},
"response": {
"data": {}
}
},
"uplink": {
"device_id_resolver": "get_id",
"enabled": true,
"handle_connectivity": true,
"request": {
"data": {
"payload": "{{payload}}",
"payload_function": "decodeUplink",
"payload_type": "source_payload",
"resource_stream": "uplink",
"target": "resource_stream"
}
},
"response": {
"data": {}
}
}
},
"autoprovisions": {
"dragino_provisioning": {
"config": {
"mode": "pattern",
"pattern": "dragino_[a-fA-F0-9]+"
},
"enabled": true
}
},
"buckets": {},
"code": {
"code": "\nfunction get_id(payload) {\n return payload.deviceId;\n}\n\nfunction get_ACI1_mA(input){\n return input.decodedPayload.ACI1_mA;\n}\n\nfunction get_ACI2_mA(input){\n return input.decodedPayload.ACI2_mA;\n}\n\nfunction get_AVI1_V(input){\n return input.decodedPayload.AVI1_V;\n}\n\nfunction get_AVI2_V(input){\n return input.decodedPayload.AVI2_V;\n}\n\nfunction get_DI1_status(input){\n return input.decodedPayload.DI1_status == 'H' ? 0: 1;\n}\n\nfunction get_DI2_status(input){\n return input.decodedPayload.DI2_status == 'H' ? 0: 1;\n}\n\nfunction get_DO1_status(input){\n return input.decodedPayload.DO1_status == 'H' ? 0: 1;\n}\n\nfunction get_DO2_status(input){\n return input.decodedPayload.DO2_status == 'H' ? 0: 1;\n}\n\nfunction get_Hardware_mode(input){\n return input.decodedPayload.Hardware_mode;\n}\n\nfunction get_RO1_status(input){\n return input.decodedPayload.RO1_status == 'OFF' ? 0: 1;\n}\n\nfunction get_RO2_status(input){\n return input.decodedPayload.RO2_status == 'OFF' ? 0: 1;\n}\n\nfunction get_Work_mode(input){\n return input.decodedPayload.Work_mode;\n}\n\nfunction get_battery_percent(input){\n let bat = input.metadata.battery || null;\n if (!bat) return;\n\n\n return bat * 100 / 254;\n}\n\nfunction get_device(input){\n return input.device_id;\n}\n\nfunction get_plugin_source(input) {\n return input.source;\n}\n\nfunction print(msg) {\n console.log(\"PPPBDA \" + msg);\n}\n\nfunction decodeUplink(uplink) {\n //print(JSON.stringify(uplink));\n if (!uplink || typeof uplink !== 'object') return uplink;\n\n // If already decoded, just return\n if (uplink.decoded_payload != null) return uplink;\n\n const hex = uplink.payload;\n if (!hex || typeof hex !== 'string') return uplink;\n\n let bytes;\n try {\n bytes = hexToBytes(hex);\n } catch (e) {\n return uplink;\n }\n\n print(\"MARAMBA\" + bytes);\n\n let res;\n res = decodeLt22222L(bytes);\n \n\n if (res && res.data) {\n return { ...uplink, decodedPayload: res.data };\n }\n\n return uplink;\n}\n\n\n/* ---------- helpers ---------- */\n\nfunction hexToBytes(hex) {\n const clean = hex.trim().replace(/^0x/i, '');\n if (clean.length % 2 !== 0) throw new Error('hex length must be even');\n const out = [];\n for (let i = 0; i < clean.length; i += 2) {\n const b = parseInt(clean.slice(i, i + 2), 16);\n if (Number.isNaN(b)) throw new Error('invalid hex byte at ' + i);\n out.push(b);\n }\n return out;\n}\n\nfunction u32be(b, i) {\n return ((b[i] << 24) | (b[i + 1] << 16) | (b[i + 2] << 8) | b[i + 3]) >>> 0;\n}\nfunction u16be(b, i) {\n return ((b[i] << 8) | b[i + 1]) >>> 0;\n}\n\nfunction decodeLt22222L(bytes) {\n if (!bytes || !Array.isArray(bytes)) {\n return { errors: ['bytes must be an array'] };\n }\n if (bytes.length < 11) {\n return { errors: ['payload too short for LT22222L data (need >=11 bytes)'] };\n }\n\n // Helpers (unsigned)\n const u16 = (hi, lo) => ((hi << 8) | lo) & 0xFFFF;\n const u32 = (b0,b1,b2,b3) =>\n (((b0 << 24) >>> 0) + (b1 << 16) + (b2 << 8) + b3) >>> 0;\n\n const modeByte = bytes[10] & 0xFF;\n const mode = modeByte & 0x3F; // 0..63\n\n const data = { hardwareMode: 'LT22222L', mode };\n\n if (mode !== 6) {\n data.DO1_status = (bytes[8] & 0x01) ? 'L' : 'H';\n data.DO2_status = (bytes[8] & 0x02) ? 'L' : 'H';\n data.RO1_status = (bytes[8] & 0x80) ? 'ON' : 'OFF';\n data.RO2_status = (bytes[8] & 0x40) ? 'ON' : 'OFF';\n if (mode !== 1) {\n if (mode !== 5) {\n data.Count1_times = u32(bytes[0], bytes[1], bytes[2], bytes[3]);\n }\n data.First_status = (bytes[8] & 0x20) ? 'Yes' : 'No';\n }\n }\n\n if (mode === 1) {\n data.Work_mode = '2ACI+2AVI';\n data.AVI1_V = +(u16(bytes[0], bytes[1]) / 1000).toFixed(3);\n data.AVI2_V = +(u16(bytes[2], bytes[3]) / 1000).toFixed(3);\n data.ACI1_mA = +(u16(bytes[4], bytes[5]) / 1000).toFixed(3);\n data.ACI2_mA = +(u16(bytes[6], bytes[7]) / 1000).toFixed(3);\n data.DI1_status = (bytes[8] & 0x08) ? 'H' : 'L';\n data.DI2_status = (bytes[8] & 0x10) ? 'H' : 'L';\n\n } else if (mode === 2) {\n data.Work_mode = 'Count mode 1';\n data.Count2_times = u32(bytes[4], bytes[5], bytes[6], bytes[7]);\n\n } else if (mode === 3) {\n data.Work_mode = '2ACI+1Count';\n data.ACI1_mA = +(u16(bytes[4], bytes[5]) / 1000).toFixed(3);\n data.ACI2_mA = +(u16(bytes[6], bytes[7]) / 1000).toFixed(3);\n\n } else if (mode === 4) {\n data.Work_mode = 'Count mode 2';\n data.Acount_times = u32(bytes[4], bytes[5], bytes[6], bytes[7]);\n\n } else if (mode === 5) {\n data.Work_mode = '1ACI+2AVI+1Count';\n data.AVI1_V = +(u16(bytes[0], bytes[1]) / 1000).toFixed(3);\n data.AVI2_V = +(u16(bytes[2], bytes[3]) / 1000).toFixed(3);\n data.ACI1_mA = +(u16(bytes[4], bytes[5]) / 1000).toFixed(3);\n data.Count1_times = ((bytes[6] << 8) | bytes[7]) & 0xFFFF; // si es 16‑bit aquÃ\n\n } else if (mode === 6) {\n data.Work_mode = 'Exit mode';\n data.Mode_status = !!bytes[9];\n data.AV1L_flag = !!(bytes[0] & 0x80);\n data.AV1H_flag = !!(bytes[0] & 0x40);\n data.AV2L_flag = !!(bytes[0] & 0x20);\n data.AV2H_flag = !!(bytes[0] & 0x10);\n data.AC1L_flag = !!(bytes[0] & 0x08);\n data.AC1H_flag = !!(bytes[0] & 0x04);\n data.AC2L_flag = !!(bytes[0] & 0x02);\n data.AC2H_flag = !!(bytes[0] & 0x01);\n\n data.AV1L_status = !!(bytes[1] & 0x80);\n data.AV1H_status = !!(bytes[1] & 0x40);\n data.AV2L_status = !!(bytes[1] & 0x20);\n data.AV2H_status = !!(bytes[1] & 0x10);\n data.AC1L_status = !!(bytes[1] & 0x08);\n data.AC1H_status = !!(bytes[1] & 0x04);\n data.AC2L_status = !!(bytes[1] & 0x02);\n data.AC2H_status = !!(bytes[1] & 0x01);\n\n data.DI2_status = !!(bytes[2] & 0x08);\n data.DI2_flag = !!(bytes[2] & 0x04);\n data.DI1_status = !!(bytes[2] & 0x02);\n data.DI1_flag = !!(bytes[2] & 0x01);\n }\n\n return { data };\n}\n\n\nfunction prepareDownlink(payload) {\n print(JSON.stringify(payload));\n const priorityMap = {\n \"LOW\": 0,\n \"NORMAL\": 3,\n \"HIGH\": 6\n };\n\n let res = {\n data: payload.payload.Message.replace(/\\s+/g, \"\").toUpperCase(),\n port: 2,\n priority: priorityMap[payload.payload.Priority?.toUpperCase()] ?? 3,\n confirm: payload.payload.Confirmed ? true : false,\n uplink: payload.uplink\n };\n\n print(JSON.stringify(res));\n\n return res;\n}\n\nfunction hexToBase64(hexStr) {\n const hex = hexStr.replace(/\\s+/g, '');\n const bytes = [];\n for(let i = 0; i < hex.length; i += 2) {\n bytes.push(parseInt(hex.substr(i, 2), 16));\n }\n return Buffer.from(bytes).toString('base64');\n}\n\n",
"environment": "javascript",
"storage": "",
"version": "1.0"
},
"endpoints": {},
"flows": {
"downlink_flow": {
"data": {
"event": "device_property_update",
"filter": {
"property": "dragino_downlink_sender"
},
"payload": "{{payload}}",
"payload_function": "",
"payload_type": "source_payload",
"source": "event"
},
"enabled": true,
"sink": {
"payload": "{{payload}}",
"payload_function": "",
"payload_type": "source_payload",
"resource": "downlink",
"target": "resource"
},
"split_data": false
}
},
"properties": {
"ACI1_mA": {
"data": {
"payload": "{{payload.decodedPayload.aci1mA}}",
"payload_function": "get_ACI1_mA",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Current reading of Analog Input 1 in milliamps",
"enabled": true
},
"ACI2_mA": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_ACI2_mA",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Current reading of Analog Input 2 in milliamps",
"enabled": true
},
"AVI1_V": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_AVI1_V",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Voltage reading of Analog Input 1 in volts",
"enabled": true
},
"AVI2_V": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_AVI2_V",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Voltage reading of Analog Input 2 in volts",
"enabled": true
},
"DI1_status": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_DI1_status",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Status of Digital Input 1 (0 = LOW, 1 = HIGH)",
"enabled": true
},
"DI2_status": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_DI2_status",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Status of Digital Input 2 (0 = LOW, 1 = HIGH)",
"enabled": true
},
"DO1_status": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_DO1_status",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Status of Digital Output 1 (0 = OFF, 1 = ON)",
"enabled": true
},
"DO2_status": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_DO2_status",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Status of Digital Output 2 (0 = OFF, 1 = ON)",
"enabled": true
},
"Hardware_mode": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_Hardware_mode",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"enabled": true
},
"RO1_status": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_RO1_status",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Status of Relay Output 1 (0 = OFF, 1 = ON)",
"enabled": true
},
"RO2_status": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_RO2_status",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Status of Relay Output 2 (0 = OFF, 1 = ON)",
"enabled": true
},
"Work_mode": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_Work_mode",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"description": "Logical operating mode",
"enabled": true
},
"battery_percent": {
"data": {
"payload": "{{payload}}",
"payload_function": "get_battery_percent",
"payload_type": "source_payload",
"resource_stream": "uplink",
"source": "resource_stream"
},
"default": {
"source": "value"
},
"enabled": true
},
"dragino_downlink_sender": {
"data": {},
"default": {
"source": "value",
"value": ""
},
"enabled": true,
"form": {
"fields": [
{
"key": "Message",
"props": {
"description": "Message of Downlink (in hexadecimal)",
"label": "Message",
"placeholder": "Message",
"required": true
},
"type": "input"
},
{
"key": "Priority",
"props": {
"description": "Priority of Downlink Message",
"label": "Priority",
"options": [
{
"label": "LOW",
"value": "LOW"
},
{
"label": "NORMAL",
"value": "NORMAL"
},
{
"label": "HIGH",
"value": "HIGH"
}
],
"placeholder": "Choose Priority",
"required": true
},
"type": "select"
},
{
"key": "Replace_downlink",
"props": {
"description": "Select Replace Downlink or Push to Queue",
"label": "Mode",
"options": [
{
"label": "Replace",
"value": true
},
{
"label": "Push",
"value": false
}
],
"placeholder": "Select Mode",
"required": true
},
"type": "select"
},
{
"key": "Confirmed",
"props": {
"description": "Confirmed Downlink Message",
"label": "Confirmed",
"options": [
{
"label": "True",
"value": true
},
{
"label": "False",
"value": false
}
],
"placeholder": "Select Confirmation Mode",
"required": true
},
"type": "select"
}
]
}
},
"uplink": {
"data": {
"payload": "{{payload}}",
"payload_function": "",
"payload_type": "source_payload",
"resource": "uplink",
"source": "resource",
"update": "events"
},
"default": {
"source": "value"
},
"enabled": true
}
}
},
"_resources": {
"properties": [
{
"description": "",
"form": {
"fields": [
{
"key": "Message",
"props": {
"description": "Message of Downlink (in hexadecimal)",
"label": "Message",
"placeholder": "Message",
"required": true
},
"type": "input"
},
{
"key": "Priority",
"props": {
"description": "Priority of Downlink Message",
"label": "Priority",
"options": [
{
"label": "LOW",
"value": "LOW"
},
{
"label": "NORMAL",
"value": "NORMAL"
},
{
"label": "HIGH",
"value": "HIGH"
}
],
"placeholder": "Choose Priority",
"required": true
},
"type": "select"
},
{
"key": "Replace_downlink",
"props": {
"description": "Select Replace Downlink or Push to Queue",
"label": "Mode",
"options": [
{
"label": "Replace",
"value": true
},
{
"label": "Push",
"value": false
}
],
"placeholder": "Select Mode",
"required": true
},
"type": "select"
},
{
"key": "Confirmed",
"props": {
"description": "Confirmed Downlink Message",
"label": "Confirmed",
"options": [
{
"label": "True",
"value": true
},
{
"label": "False",
"value": false
}
],
"placeholder": "Select Confirmation Mode",
"required": true
},
"type": "select"
}
]
},
"name": "",
"property": "dragino_downlink_sender",
"type": "",
"value": ""
},
{
"property": "dashboard",
"value": {
"name": "Dragino LT-22222-L",
"placeholders": {
"sources": []
},
"properties": {
"background_image": "#E7ECEF",
"border_radius": "10",
"hide_header": true,
"template": true
},
"tabs": [
{
"icon": "fas fa-tachometer-alt",
"widgets": [
{
"layout": {
"col": 0,
"row": 0,
"sizeX": 2,
"sizeY": 5
},
"panel": {
"color": "#ffffff0F",
"currentColor": "#ffffff0F",
"showOffline": {
"type": "none"
},
"title": "Downlink Sender"
},
"properties": {
"icon": "fal fa-angle-double-right"
},
"sources": [
{
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "dragino_downlink_sender"
},
"source": "device_property"
}
],
"type": "property_button"
},
{
"layout": {
"col": 2,
"row": 5,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"subtitle": "Current Reading of Analog Input 1",
"title": "Analog Input 1"
},
"properties": {
"color": "#1E313E",
"gradient": true,
"icon": "",
"iconSize": "",
"max": 100,
"min": 0,
"unit": "V"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "AVI1_V"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "gauge"
},
{
"layout": {
"col": 2,
"row": 0,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"subtitle": "Current Reading of Analog Input 1",
"title": "Analog Input 1"
},
"properties": {
"color": "#1E313E",
"gradient": true,
"icon": "",
"iconSize": "",
"max": 100,
"min": 0,
"unit": "mA"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "ACI1_mA"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "gauge"
},
{
"layout": {
"col": 5,
"row": 0,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#274C77",
"currentColor": "#274C77",
"showOffline": {
"type": "none"
},
"title": "Digital Input 2 Status"
},
"properties": {
"color": "#000000",
"colors": [
{
"blink": false,
"color": "#ff1414",
"max": 0,
"min": 0
},
{
"blink": false,
"color": "#01c101",
"max": 2,
"min": 1
}
],
"size": "75px"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "DI2_status"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "led"
},
{
"layout": {
"col": 5,
"row": 5,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#6096BA",
"currentColor": "#6096BA",
"showOffline": {
"type": "none"
},
"title": "Digital Output 2 Status"
},
"properties": {
"color": "#000000",
"colors": [
{
"blink": false,
"color": "#ff1414",
"max": 0,
"min": 0
},
{
"blink": false,
"color": "#01c101",
"max": 2,
"min": 1
}
],
"size": "75px"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "DO2_status"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "led"
},
{
"layout": {
"col": 4,
"row": 0,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#274C77",
"currentColor": "#274C77",
"showOffline": {
"type": "none"
},
"title": "Digital Input 1 Status"
},
"properties": {
"color": "#000000",
"colors": [
{
"blink": false,
"color": "#ff1414",
"max": 0,
"min": 0
},
{
"blink": false,
"color": "#01c101",
"max": 2,
"min": 1
}
],
"size": "75px"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "DI1_status"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "led"
},
{
"layout": {
"col": 5,
"row": 10,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#A3CEF1",
"currentColor": "#A3CEF1",
"showOffline": {
"type": "none"
},
"title": "Relay Output 2 Status"
},
"properties": {
"color": "#000000",
"colors": [
{
"blink": false,
"color": "#ff1414",
"max": 0,
"min": 0
},
{
"blink": false,
"color": "#01c101",
"max": 2,
"min": 1
}
],
"size": "75px"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "RO2_status"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "led"
},
{
"layout": {
"col": 4,
"row": 5,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#6096BA",
"currentColor": "#6096BA",
"showOffline": {
"type": "none"
},
"title": "Digital Output 1 Status"
},
"properties": {
"color": "#000000",
"colors": [
{
"blink": false,
"color": "#ff1414",
"max": 0,
"min": 0
},
{
"blink": false,
"color": "#01c101",
"max": 2,
"min": 1
}
],
"size": "75px"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "DO1_status"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "led"
},
{
"layout": {
"col": 4,
"row": 10,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#A3CEF1",
"currentColor": "#A3CEF1",
"showOffline": {
"type": "none"
},
"title": "Relay Output 1 Status"
},
"properties": {
"color": "#000000",
"colors": [
{
"blink": false,
"color": "#ff1414",
"max": 0,
"min": 0
},
{
"blink": false,
"color": "#01c101",
"max": 2,
"min": 1
}
],
"size": "75px"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "RO1_status"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "led"
},
{
"layout": {
"col": 0,
"row": 5,
"sizeX": 2,
"sizeY": 3
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"title": "Device Battery"
},
"properties": {
"icon": "",
"iconSize": "",
"max": 100,
"min": 0,
"unit": "%"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "battery_percent"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "progressbar"
},
{
"layout": {
"col": 3,
"row": 0,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"subtitle": "Current Reading of Analog Input 2",
"title": "Analog Input 2"
},
"properties": {
"color": "#1E313E",
"gradient": true,
"icon": "",
"iconSize": "",
"max": 100,
"min": 0,
"unit": "mA"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "ACI2_mA"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "gauge"
},
{
"layout": {
"col": 3,
"row": 5,
"sizeX": 1,
"sizeY": 5
},
"panel": {
"color": "#ffffff",
"currentColor": "#ffffff",
"showOffline": {
"type": "none"
},
"subtitle": "Current Reading of Analog Input 2",
"title": "Analog Input 2"
},
"properties": {
"color": "#1E313E",
"gradient": true,
"icon": "",
"iconSize": "",
"max": 100,
"min": 0,
"unit": "V"
},
"sources": [
{
"color": "#1abc9c",
"device_property": {
"device": "dragino_A84041E98182ABFE",
"property": "AVI2_V"
},
"name": "Source 1",
"source": "device_property"
}
],
"type": "gauge"
}
]
}
]
}
}
]
}
}
]
}
}