I manage to get the return of a simple bash 'date "order such as:
my Things:
Thing exec:command:Date_jour [command=“date”, interval=15, timeout=5 ]
my Item:
strong textString Date_du_jour “Date: [%s]” { channel=“exec:command:Date_jour:output” }
my exec.whitelist:
cat /sys/class/thermal/thermal_zone0/temp
** /opt/vc/bin/vcgencmd measure_temp**
** date**
the display is correct and gives:
“dimanche 19 avril 2020, 09:06:54 (UTC+0200)”
I wish to obtain the date in the form: “19/04/2020” so the bash command is: date +%D
I modify to get the return of a simple bash 'date +% D "command such as:
my Things 2:
Thing exec:command:Date_jour2 [command=“date +%D”, interval=15, timeout=5 ]
my Item:
Date_du_jour2 “Date: [%s]” { channel=“exec:command:Date_jour2:output” }
my exec.whitelist:
cat /sys/class/thermal/thermal_zone0/temp
/opt/vc/bin/vcgencmd measure_temp
date +%D
gives an error:
09:14:23.378 [WARN ] [ing.exec.internal.handler.ExecHandler] - An exception occurred while formatting the command line with the current time and input values : 'Conversion = ‘D’'
Thank’ for help