Hello,
i want to use a shell switch for starting a python program.
The starting of the program is working but after a short time i get a timeout because pimatic do not recognize the current state.
Then pimatic switches to off.
For the getStateCommand i use the following small bash script, where i search for the process
#!/bin/bash
if [ $(ps -C Luefter_pilight_start -o pid=) ]; then echo on; else echo off; fi
And the configuration of the switch
{
"onCommand": "/home/pi/Luefter_pilight_start.py &",
"offCommand": "/home/pi/Luefter_pilight_stop.sh",
"id": "lufter",
"name": "Lüfter",
"class": "ShellSwitch",
"getStateCommand": "/home/pi/Luefter_state.sh"
}
I got no output (error, warning,de.) at the message section of pimatic.
Has someone a idea how i can fix this?