Oooops my bad !
[
{
"id": "d6cd57fac03f2437",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "64889f2be479953a",
"type": "exec",
"z": "d6cd57fac03f2437",
"command": "timedatectl status",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "",
"x": 710,
"y": 280,
"wires": [
[
"dee75bd8f498bd95"
],
[],
[]
]
},
{
"id": "547181a76e756d21",
"type": "inject",
"z": "d6cd57fac03f2437",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 500,
"y": 280,
"wires": [
[
"64889f2be479953a"
]
]
},
{
"id": "dee75bd8f498bd95",
"type": "switch",
"z": "d6cd57fac03f2437",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "Local time:",
"vt": "str"
},
{
"t": "cont",
"v": "Universal time:",
"vt": "str"
},
{
"t": "cont",
"v": "RTC time:",
"vt": "str"
},
{
"t": "cont",
"v": "Time zone:",
"vt": "str"
},
{
"t": "cont",
"v": "NTP synchronized:",
"vt": "str"
},
{
"t": "cont",
"v": "NTP enabled:",
"vt": "str"
},
{
"t": "cont",
"v": "RTC in local TZ:",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 7,
"x": 930,
"y": 280,
"wires": [
[
"9c38b86ef7bc180c",
"4b6de73a7bb007d1"
],
[],
[],
[],
[],
[],
[]
]
},
{
"id": "9c38b86ef7bc180c",
"type": "change",
"z": "d6cd57fac03f2437",
"name": "Create JSON Payload",
"rules": [
{
"t": "set",
"p": "ntp",
"pt": "msg",
"to": "{\t \"localTime\" : $substringAfter(msg.payload,'Local time: ')\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1260,
"y": 240,
"wires": [
[]
]
},
{
"id": "4b6de73a7bb007d1",
"type": "debug",
"z": "d6cd57fac03f2437",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"y": 160,
"wires": []
}
]