Skip to content

Instantly share code, notes, and snippets.

@ashvayka
Created March 2, 2023 11:35
Show Gist options
  • Save ashvayka/2374b1b6ebd8be5dca3d5252dee4c212 to your computer and use it in GitHub Desktop.
Save ashvayka/2374b1b6ebd8be5dca3d5252dee4c212 to your computer and use it in GitHub Desktop.
Simple LwM2M dashboard
{
"title": "LwM2M Operations",
"image": null,
"mobileHide": false,
"mobileOrder": null,
"configuration": {
"description": "",
"widgets": {
"38246cc5-3c7c-633a-9240-78895978e4ae": {
"isSystemType": true,
"bundleAlias": "control_widgets",
"typeAlias": "rpcbutton",
"type": "rpc",
"title": "New widget",
"image": null,
"description": null,
"sizeX": 4,
"sizeY": 2,
"config": {
"targetDeviceAliases": [],
"showTitle": false,
"backgroundColor": "#e6e7e8",
"color": "rgba(0, 0, 0, 0.87)",
"padding": "0px",
"settings": {
"buttonText": "Reboot",
"oneWayElseTwoWay": false,
"methodName": "Execute",
"methodParams": "{\n \"id\": \"/3/0/4\"\n}",
"requestTimeout": 3000,
"showError": true,
"requestPersistent": true,
"persistentPollingInterval": 5000,
"styleButton": {
"isRaised": true,
"isPrimary": false
}
},
"title": "New RPC Button",
"dropShadow": true,
"enableFullscreen": false,
"widgetStyle": {},
"titleStyle": {
"fontSize": "16px",
"fontWeight": 400
},
"useDashboardTimewindow": true,
"showLegend": false,
"actions": {},
"datasources": [],
"targetDeviceAliasIds": [
"1dc1564b-d765-cbc7-7a38-06103fcebc1b"
]
},
"row": 0,
"col": 0,
"id": "38246cc5-3c7c-633a-9240-78895978e4ae"
},
"bba2c958-7244-8d50-8e99-6b89e55ca474": {
"isSystemType": true,
"bundleAlias": "control_widgets",
"typeAlias": "rpc_debug_terminal",
"type": "rpc",
"title": "New widget",
"image": null,
"description": null,
"sizeX": 9.5,
"sizeY": 5.5,
"config": {
"targetDeviceAliases": [],
"showTitle": true,
"backgroundColor": "#010101",
"color": "rgba(255, 254, 254, 0.87)",
"padding": "0px",
"settings": {
"requestTimeout": 30000,
"requestPersistent": false
},
"title": "Interactive commands with 30 seconds expiration time (not persistent)",
"dropShadow": true,
"enableFullscreen": true,
"widgetStyle": {},
"titleStyle": {
"fontSize": "16px",
"fontWeight": 400
},
"useDashboardTimewindow": true,
"showLegend": false,
"actions": {},
"datasources": [],
"targetDeviceAliasIds": [
"1dc1564b-d765-cbc7-7a38-06103fcebc1b"
],
"showTitleIcon": false,
"titleTooltip": "",
"widgetCss": "",
"pageSize": 1024,
"noDataDisplayMessage": ""
},
"row": 0,
"col": 0,
"id": "bba2c958-7244-8d50-8e99-6b89e55ca474"
},
"daa7f4ed-efba-ca0c-4caa-7606c878c736": {
"isSystemType": true,
"bundleAlias": "control_widgets",
"typeAlias": "persistent_table",
"type": "rpc",
"title": "New widget",
"image": null,
"description": null,
"sizeX": 7.5,
"sizeY": 4,
"config": {
"showTitle": true,
"backgroundColor": "#fff",
"color": "rgba(0, 0, 0, 0.87)",
"padding": "8px",
"settings": {
"enableStickyAction": true,
"enableFilter": true,
"displayPagination": true,
"defaultPageSize": 10,
"enableStickyHeader": true,
"displayColumns": [
"rpcId",
"messageType",
"status",
"method",
"createdTime",
"expirationTime"
],
"displayDetails": true,
"defaultSortOrder": "-createdTime",
"allowSendRequest": true,
"allowDelete": true
},
"title": "Rersistent commands to device",
"titleStyle": {
"fontSize": "16px",
"fontWeight": 400,
"padding": "5px 10px"
},
"targetDeviceAliasIds": [
"1dc1564b-d765-cbc7-7a38-06103fcebc1b"
],
"datasources": [],
"showTitleIcon": false,
"titleTooltip": "",
"dropShadow": true,
"enableFullscreen": true,
"widgetStyle": {},
"widgetCss": "",
"pageSize": 1024,
"noDataDisplayMessage": "",
"showLegend": false
},
"row": 0,
"col": 0,
"id": "daa7f4ed-efba-ca0c-4caa-7606c878c736"
},
"138bef0a-bf28-c12b-d86e-9571593682e6": {
"isSystemType": true,
"bundleAlias": "input_widgets",
"typeAlias": "update_shared_string_attribute",
"type": "latest",
"title": "New widget",
"image": null,
"description": null,
"sizeX": 7.5,
"sizeY": 3,
"config": {
"datasources": [
{
"type": "entity",
"name": null,
"entityAliasId": "1dc1564b-d765-cbc7-7a38-06103fcebc1b",
"filterId": null,
"dataKeys": [
{
"name": "timezone",
"type": "attribute",
"label": "timezone",
"color": "#2196f3",
"settings": {},
"_hash": 0.8262904062535634
}
]
}
],
"timewindow": {
"displayValue": "",
"selectedTab": 0,
"realtime": {
"realtimeType": 1,
"interval": 1000,
"timewindowMs": 60000,
"quickInterval": "CURRENT_DAY"
},
"history": {
"historyType": 0,
"interval": 1000,
"timewindowMs": 60000,
"fixedTimewindow": {
"startTimeMs": 1677668859234,
"endTimeMs": 1677755259234
},
"quickInterval": "CURRENT_DAY"
},
"aggregation": {
"type": "AVG",
"limit": 25000
}
},
"showTitle": true,
"backgroundColor": "#fff",
"color": "rgba(0, 0, 0, 0.87)",
"padding": "8px",
"settings": {
"widgetTitle": "Device Timezone (/3/0/15)",
"showLabel": true,
"isRequired": true,
"showResultMessage": true
},
"title": "New Update shared string attribute",
"dropShadow": true,
"enableFullscreen": false,
"enableDataExport": false,
"widgetStyle": {},
"titleStyle": {
"fontSize": "16px",
"fontWeight": 400
},
"useDashboardTimewindow": true,
"showLegend": false,
"actions": {}
},
"row": 0,
"col": 0,
"id": "138bef0a-bf28-c12b-d86e-9571593682e6"
},
"74bc407a-b9b7-9412-f039-ac3f281f2050": {
"isSystemType": true,
"bundleAlias": "cards",
"typeAlias": "attributes_card",
"type": "latest",
"title": "New widget",
"image": null,
"description": null,
"sizeX": 7.5,
"sizeY": 3,
"config": {
"datasources": [
{
"type": "entity",
"name": null,
"entityAliasId": "1dc1564b-d765-cbc7-7a38-06103fcebc1b",
"filterId": null,
"dataKeys": [
{
"name": "batteryLevel",
"type": "timeseries",
"label": "Battery level",
"color": "#2196f3",
"settings": {},
"_hash": 0.3687929960035785,
"aggregationType": "NONE",
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
},
{
"name": "batteryStatus",
"type": "timeseries",
"label": "Battery status",
"color": "#4caf50",
"settings": {},
"_hash": 0.39394066346091083,
"aggregationType": "NONE",
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
},
{
"name": "memoryFree",
"type": "timeseries",
"label": "Free memory",
"color": "#f44336",
"settings": {},
"_hash": 0.14390171424221299,
"aggregationType": "NONE",
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
},
{
"name": "memoryTotal",
"type": "timeseries",
"label": "Total memory",
"color": "#ffc107",
"settings": {},
"_hash": 0.28430178859097355,
"aggregationType": "NONE",
"units": null,
"decimals": null,
"funcBody": null,
"usePostProcessing": null,
"postFuncBody": null
}
]
}
],
"timewindow": {
"displayValue": "",
"selectedTab": 0,
"realtime": {
"realtimeType": 1,
"interval": 1000,
"timewindowMs": 60000,
"quickInterval": "CURRENT_DAY"
},
"history": {
"historyType": 0,
"interval": 1000,
"timewindowMs": 60000,
"fixedTimewindow": {
"startTimeMs": 1677669090614,
"endTimeMs": 1677755490614
},
"quickInterval": "CURRENT_DAY"
},
"aggregation": {
"type": "AVG",
"limit": 25000
}
},
"showTitle": true,
"backgroundColor": "#fff",
"color": "rgba(0, 0, 0, 0.87)",
"padding": "8px",
"settings": {},
"title": "New Attributes card",
"useDashboardTimewindow": true
},
"row": 0,
"col": 0,
"id": "74bc407a-b9b7-9412-f039-ac3f281f2050"
}
},
"states": {
"default": {
"name": "LwM2M Operations",
"root": true,
"layouts": {
"main": {
"widgets": {
"38246cc5-3c7c-633a-9240-78895978e4ae": {
"sizeX": 7,
"sizeY": 1,
"row": 0,
"col": 10
},
"bba2c958-7244-8d50-8e99-6b89e55ca474": {
"sizeX": 10,
"sizeY": 12,
"row": 0,
"col": 0
},
"daa7f4ed-efba-ca0c-4caa-7606c878c736": {
"sizeX": 14,
"sizeY": 9,
"row": 3,
"col": 10
},
"138bef0a-bf28-c12b-d86e-9571593682e6": {
"sizeX": 7,
"sizeY": 2,
"row": 1,
"col": 10
},
"74bc407a-b9b7-9412-f039-ac3f281f2050": {
"sizeX": 7,
"sizeY": 3,
"row": 0,
"col": 17
}
},
"gridSettings": {
"backgroundColor": "#eeeeee",
"columns": 24,
"margin": 10,
"backgroundSizeMode": "100%",
"autoFillHeight": true,
"backgroundImageUrl": null,
"mobileAutoFillHeight": false,
"mobileRowHeight": 70
}
}
}
}
},
"entityAliases": {
"1dc1564b-d765-cbc7-7a38-06103fcebc1b": {
"id": "1dc1564b-d765-cbc7-7a38-06103fcebc1b",
"alias": "LwM2M Device",
"filter": {
"type": "singleEntity",
"resolveMultiple": false,
"singleEntity": {
"entityType": "DEVICE",
"id": "df9b7e70-b8e3-11ed-8cae-b7388dce2e35"
}
}
}
},
"filters": {},
"timewindow": {
"displayValue": "",
"hideInterval": false,
"hideLastInterval": false,
"hideQuickInterval": false,
"hideAggregation": false,
"hideAggInterval": false,
"hideTimezone": false,
"selectedTab": 0,
"realtime": {
"realtimeType": 0,
"interval": 1000,
"timewindowMs": 60000,
"quickInterval": "CURRENT_DAY"
},
"history": {
"historyType": 0,
"interval": 1000,
"timewindowMs": 60000,
"fixedTimewindow": {
"startTimeMs": 1677666338479,
"endTimeMs": 1677752738479
},
"quickInterval": "CURRENT_DAY"
},
"aggregation": {
"type": "AVG",
"limit": 25000
}
},
"settings": {
"stateControllerId": "entity",
"showTitle": false,
"showDashboardsSelect": true,
"showEntitiesSelect": true,
"showDashboardTimewindow": true,
"showDashboardExport": true,
"toolbarAlwaysOpen": true
}
},
"externalId": null,
"name": "LwM2M Operations"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment