mirror of
https://github.com/thorsten-gehrig/alexa-remote-control.git
synced 2024-11-22 16:59:03 +01:00
commit
c3aff91556
@ -189,6 +189,7 @@ usage()
|
|||||||
echo " -m : delete multiroom and/or create new multiroom containing devices"
|
echo " -m : delete multiroom and/or create new multiroom containing devices"
|
||||||
echo " -lastalexa : print device that received the last voice command"
|
echo " -lastalexa : print device that received the last voice command"
|
||||||
echo " -z : print current volume level"
|
echo " -z : print current volume level"
|
||||||
|
echo " -login : Logs in, without further command"
|
||||||
echo " -l : logoff"
|
echo " -l : logoff"
|
||||||
echo " -h : help"
|
echo " -h : help"
|
||||||
}
|
}
|
||||||
@ -306,6 +307,9 @@ while [ "$#" -gt 0 ] ; do
|
|||||||
PLIST=$2
|
PLIST=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-login)
|
||||||
|
LOGIN="true"
|
||||||
|
;;
|
||||||
-l)
|
-l)
|
||||||
LOGOFF="true"
|
LOGOFF="true"
|
||||||
;;
|
;;
|
||||||
@ -1019,6 +1023,11 @@ if [ ! -f ${DEVLIST} ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$LOGIN" ] ; then
|
||||||
|
echo "logged in"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$COMMAND" -o -n "$QUEUE" -o -n "$NOTIFICATIONS" -o -n "$GETVOL" ] ; then
|
if [ -n "$COMMAND" -o -n "$QUEUE" -o -n "$NOTIFICATIONS" -o -n "$GETVOL" ] ; then
|
||||||
if [ "${DEVICE}" = "ALL" ] ; then
|
if [ "${DEVICE}" = "ALL" ] ; then
|
||||||
for DEVICE in $( jq -r '.devices[] | select( ( .deviceFamily == "ECHO" or .deviceFamily == "KNIGHT" or .deviceFamily == "ROOK" or .deviceFamily == "WHA" ) and .online == true ) | .accountName' ${DEVLIST} | sed -r 's/ /%20/g') ; do
|
for DEVICE in $( jq -r '.devices[] | select( ( .deviceFamily == "ECHO" or .deviceFamily == "KNIGHT" or .deviceFamily == "ROOK" or .deviceFamily == "WHA" ) and .online == true ) | .accountName' ${DEVLIST} | sed -r 's/ /%20/g') ; do
|
||||||
|
@ -133,6 +133,7 @@ usage()
|
|||||||
echo " -a : list available devices"
|
echo " -a : list available devices"
|
||||||
echo " -m : delete multiroom and/or create new multiroom containing devices"
|
echo " -m : delete multiroom and/or create new multiroom containing devices"
|
||||||
echo " -lastalexa : print serial number that received the last voice command"
|
echo " -lastalexa : print serial number that received the last voice command"
|
||||||
|
echo " -login : Logs in, without further command"
|
||||||
echo " -l : logoff"
|
echo " -l : logoff"
|
||||||
echo " -h : help"
|
echo " -h : help"
|
||||||
}
|
}
|
||||||
@ -250,6 +251,9 @@ while [ "$#" -gt 0 ] ; do
|
|||||||
DEVICE=$2
|
DEVICE=$2
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-login)
|
||||||
|
LOGIN="true"
|
||||||
|
;;
|
||||||
-l)
|
-l)
|
||||||
LOGOFF="true"
|
LOGOFF="true"
|
||||||
;;
|
;;
|
||||||
@ -920,6 +924,11 @@ if [ ! -f ${DEVTXT} -o ! -f ${DEVALL} ] ; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$LOGIN" ] ; then
|
||||||
|
echo "logged in"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$COMMAND" -o -n "$QUEUE" -o -n "$NOTIFICATIONS" ] ; then
|
if [ -n "$COMMAND" -o -n "$QUEUE" -o -n "$NOTIFICATIONS" ] ; then
|
||||||
if [ "${DEVICE}" = "ALL" ] ; then
|
if [ "${DEVICE}" = "ALL" ] ; then
|
||||||
while IFS= read -r DEVICE ; do
|
while IFS= read -r DEVICE ; do
|
||||||
|
Loading…
Reference in New Issue
Block a user