Turn off via lan/fhem?


Is ist possible to set an lan command over http via my fhem and turn off the vero 4k+?


curl --data-binary '{"jsonrpc":"2.0","method":"System.Shutdown","id":1}' -H 'content-type: application/json;' http://[ip of your osmc device]:[port of your www interface in kodi]/jsonrpc

Where you replace the ip and port, to your ip and port without the .

Thank you really very much, but ive got an error from my FHEM…

This is the DOIF Definition:

([TVTime:state] eq “off” or [KINOTime:state] eq “off”) {system(“curl --data-binary ‘{“jsonrpc”:“2.0”,“method”:“System.Shutdown”,“id”:1}’ -H ‘content-type: application/json;’”)}

and this is the ERROR:

{system(“curl --data-binary ‘{“jsonrpc”:2.0,“method”:“System.Shutdown”,“id”:1}’ -H ‘content-type: application/json;’”)}: syntax error at (eval 165579) line 1, near ""curl --data-binary '{“jsonrpc”

Can you maybe help me please?

Just a stabb in the dark, but since the command curl in needs " in the system call, like {system("
then in the curl command there is an other set of ", which might break the system string?

Don’t know how fhem works, if you can escape those other "?