We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9896770 commit 30fac3dCopy full SHA for 30fac3d
scripts/getvoltage.sh
@@ -2,6 +2,7 @@
2
3
command -v socat >/dev/null 2>&1 || { echo >&2 "I require socat but it's not installed. Aborting."; exit 1; }
4
5
+[[ $RESPONSE == "{}" ]] && unset RESPONSE
6
RESPONSE=`echo '{"command":"read_voltage"}' | socat -,ignoreeof ~/src/openaps-menu/socket-server.sock | sed -n 's/.*"response":\([^}]*\)}/\1/p'`
7
[[ $RESPONSE = *[![:space:]]* ]] && echo $RESPONSE
8
#./getvoltage.sh | sed -n 's/.*"response":\([^}]*\)}/\1/p'
0 commit comments