shelly_pool/eval_script

15 lines
303 B
Plaintext
Raw Permalink Normal View History

2022-04-21 09:32:57 +02:00
#!/bin/bash -e
source $(dirname $0)/shelly.conf
id=1
curl -s -X POST \
-d '{"id":1, "method":"Script.Eval", "params":{"id":'$SCRIPT_ID', "code":"'$@'"}}' \
$SHELLY_RPC > .inspect.json
2022-04-24 16:19:27 +02:00
cat .inspect.json | jq .error.message
2022-04-21 09:32:57 +02:00
cat .inspect.json | jq .result.result -r | jq .
rm -f .inspect.json