This driver can be used to create a virtual device to store and display information from from node-red-contrib-device-stat and node-red-contrib-cpu, in a fashion similar to the Hub Information Driver.
Driver is available in HPM or can be imported directly from https://raw.githubusercontent.com/thebearmay/hubitat/main/nrServerInfo.groovy
Node Red flow input flow:
Flow JSON
[
[
{
"id": "4d61cafd5eccfdd3",
"type": "tab",
"label": "Synology Stats",
"disabled": false,
"info": "",
"env": []
},
{
"id": "2eea6be6851faff2",
"type": "DeviceStats",
"z": "4d61cafd5eccfdd3",
"name": "",
"mem": true,
"nw": true,
"load": true,
"hostname": true,
"useString": true,
"x": 490,
"y": 160,
"wires": [
[
"1b5bd3141e5c2e34"
]
]
},
{
"id": "852338c59dc298d2",
"type": "cpu",
"z": "4d61cafd5eccfdd3",
"name": "CPU Usage",
"msgCore": false,
"msgOverall": true,
"msgArray": false,
"msgTemp": false,
"x": 490,
"y": 80,
"wires": [
[
"18feb93ea312994d"
]
]
},
{
"id": "e8da9d6dc02b2368",
"type": "inject",
"z": "4d61cafd5eccfdd3",
"name": "10min Interval",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "600",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 120,
"y": 80,
"wires": [
[
"852338c59dc298d2",
"0eefc3afe00224af",
"2eea6be6851faff2"
]
]
},
{
"id": "8cc82100a77843da",
"type": "hubitat command",
"z": "4d61cafd5eccfdd3",
"deviceLabel": "!syn",
"name": "cpuUsage",
"server": "d76c8fe2b1ed71b7",
"deviceId": "15",
"command": "setUsage",
"commandArgs": "",
"x": 960,
"y": 60,
"wires": [
[]
]
},
{
"id": "18feb93ea312994d",
"type": "change",
"z": "4d61cafd5eccfdd3",
"name": "",
"rules": [
{
"t": "set",
"p": "arguments",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 80,
"wires": [
[
"8cc82100a77843da"
]
]
},
{
"id": "0eefc3afe00224af",
"type": "cpu",
"z": "4d61cafd5eccfdd3",
"name": "CPU Temperature",
"msgCore": false,
"msgOverall": false,
"msgArray": false,
"msgTemp": true,
"x": 510,
"y": 120,
"wires": [
[
"8429f6fa65e4cfba"
]
]
},
{
"id": "8429f6fa65e4cfba",
"type": "change",
"z": "4d61cafd5eccfdd3",
"name": "",
"rules": [
{
"t": "set",
"p": "arguments",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 120,
"wires": [
[
"53f606ac113e4c74"
]
]
},
{
"id": "53f606ac113e4c74",
"type": "hubitat command",
"z": "4d61cafd5eccfdd3",
"deviceLabel": "!syn",
"name": "setTemp",
"server": "d76c8fe2b1ed71b7",
"deviceId": "15",
"command": "setTemp",
"commandArgs": "",
"x": 960,
"y": 120,
"wires": [
[]
]
},
{
"id": "1b5bd3141e5c2e34",
"type": "change",
"z": "4d61cafd5eccfdd3",
"name": "",
"rules": [
{
"t": "set",
"p": "arguments",
"pt": "msg",
"to": "payload",
"tot": "msg",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 160,
"wires": [
[
"67c296995a55a45f"
]
]
},
{
"id": "67c296995a55a45f",
"type": "hubitat command",
"z": "4d61cafd5eccfdd3",
"deviceLabel": "!syn",
"name": "jsonUpdate",
"server": "d76c8fe2b1ed71b7",
"deviceId": "15",
"command": "jsonUpdate",
"commandArgs": "",
"x": 970,
"y": 180,
"wires": [
[]
]
},
{
"id": "ada3746b87bdad74",
"type": "hubitat device",
"z": "4d61cafd5eccfdd3",
"deviceLabel": "!syn",
"name": "Refresh Request",
"server": "d76c8fe2b1ed71b7",
"deviceId": "15",
"attribute": "refreshRequested",
"sendEvent": true,
"x": 110,
"y": 200,
"wires": [
[
"33388a5b6a96bf49"
]
]
},
{
"id": "33388a5b6a96bf49",
"type": "switch",
"z": "4d61cafd5eccfdd3",
"name": "True",
"property": "payload.value",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "true",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 150,
"y": 140,
"wires": [
[
"0eefc3afe00224af",
"852338c59dc298d2",
"52783f592a136e79"
]
]
},
{
"id": "52783f592a136e79",
"type": "change",
"z": "4d61cafd5eccfdd3",
"name": "inject TS",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "date"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 300,
"y": 200,
"wires": [
[
"2eea6be6851faff2",
"0eefc3afe00224af",
"852338c59dc298d2"
]
]
},
{
"id": "d76c8fe2b1ed71b7",
"type": "hubitat config",
"name": "Hubitat Spare",
"usetls": false,
"host": "192.168.3.38",
"port": "80",
"appId": "14",
"nodeRedServer": "http://192.168.3.60:6335",
"webhookPath": "/hubitat/webhook__",
"autoRefresh": true,
"useWebsocket": false,
"colorEnabled": false,
"color": "#ace043"
}
]