Hello,

I'm trying to go head and add GPIO action directly in the JSON command

Note that i'm not a programmer and didn't know anything about JSON
untill now
So, here is my trial:


Code:
--------------------
    curl -X POST -sd 
'{"id":0,"params":["10.144.1.2",["status",0,1,"tags:T"]],"method":"slim.request"}'
 http://10.144.1.1:9000/jsonrpc.js | jq 'if 
'.result.playlist_loop[0].samplerate' == "48000" then 
  echo "4" > /sys/class/gpio/export echo "out" > 
/sys/class/gpio/gpio4/direction echo "1" > /sys/class/gpio/gpio4/value else 
echo "0" > /sys/class/gpio/gpio4/value end'
--------------------

> jq: 2 compile errors
> (23) Failed writing body
> 

Any help in the synthax, thank you.
Jean


------------------------------------------------------------------------
bidule's Profile: http://forums.slimdevices.com/member.php?userid=15337
View this thread: http://forums.slimdevices.com/showthread.php?t=113499

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to