Solved: See post 15.
I have a dummy thermostat with the current config with a set of rules like “when the temperature too low …” named like “opwarmen-als-temp-te-laag”
It sends the command to an espimatic via a shellswitch
{
"id": "warmte",
"name": "cv-modus",
"class": "ShellSwitch",
"onCommand": "curl --silent --data 'action=relay1&value=on' http://cv-control.local/api > /dev/null",
"offCommand": "curl --silent --data 'action=relay1&value=off' http://cv-control.local/api > /dev/null",
"getStateCommand": "curl --silent --data 'action=relay1&value=status' http://cv-control.local/api",
"interval": 6000,
"xOnLabel": "aan",
"xOffLabel": "uit"
},
I do get errors though like
error [pimatic-shell-execute]: [ShellSwitch#warmte] Error: Command failed: /bin/sh -c curl --silent --data 'action=relay1&value=status' http://cv-control.local/api
followed by:
error [pimatic]: Error on evaluation of rule condition of rule opwarmen-als-temp-te-laag: undefined
The simple shell script lacks functionality that the bash script has. How can I configure pimatic to use the bash script instead of the sh script
(note: bash is the default shell on my server and avery user on my server uses the bash shell).
when running these commands from the bash shell they function perfectly.