Traceback (most recent call last):
File "plugin.py", line 843, in CameraCommand
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 98, in urlretrieve
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 245, in retrieve
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 213, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 364, in open_http
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 377, in http_error
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 702, in http_error_401
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 766, in retry_http_basic_auth
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 795, in get_user_passwd
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 804, in prompt_user_passwd
EOFError: EOF when reading a line
#!/bin/sh
IP_ADDR="userid:pass@192.168.1.1:PortNum"
case "$1" in
left)
curl http://$IP_ADDR/decoder_control.cgi?command=4
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
right)
curl http://$IP_ADDR/decoder_control.cgi?command=6
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
up)
curl http://$IP_ADDR/decoder_control.cgi?command=0
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
down)
curl http://$IP_ADDR/decoder_control.cgi?command=2
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
upleft)
curl http://$IP_ADDR/decoder_control.cgi?command=90
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
upright)
curl http://$IP_ADDR/decoder_control.cgi?command=91
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
downleft)
curl http://$IP_ADDR/decoder_control.cgi?command=92
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
downright)
curl http://$IP_ADDR/decoder_control.cgi?command=93
sleep 1
curl http://$IP_ADDR/decoder_control.cgi?command=1
;;
vpatrol)
curl http://$IP_ADDR/decoder_control.cgi?command=26
;;
stopvpatrol)
curl http://$IP_ADDR/decoder_control.cgi?command=27
;;
hpatrol)
curl http://$IP_ADDR/decoder_control.cgi?command=28
;;
stophpatrol)
curl http://$IP_ADDR/decoder_control.cgi?command=29
;;
pos)
curl http://$IP_ADDR/decoder_control.cgi?command=$((30 + ($2*2-1)))
;;
*)
echo "Syntax:"
echo " up, down, left, right"
echo " upleft : up and left diagonally"
echo " upright : up and right diagonally"
echo " downleft : down and left diagonally"
echo " downright : down and right diagonally"
echo " vpatrol : vertical patrol"
echo " stopvpatrol: stop vertical patrol"
echo " hpatrol : horizontal patrol"
echo " stophpatrol: stop horizontal patrol"
echo " pos N : recall stored position N"
exit 1
;;
esac
exit 0
using terms from application "IndigoServer"
tell application "IndigoServer"
set actionOrdered to the value of variable "Digital_Loggers" --This is the variable you create. Make a schedule, control page button etc, to insert one of the commands below into the variable. Then create a trigger that fires when the variable changes and executes this embedded AppleScript.
set actionListAll to {"1=ON", "1=OFF", "1=CCL", "2=ON", "2=OFF", "2=CCL", "3=ON", "3=OFF", "3=CCL", "4=ON", "4=OFF", "4=CCL", "5=ON", "5=OFF", "5=CCL", "6=ON", "6=OFF", "6=CCL", "7=ON", "7=OFF", "7=CCL", "8=ON", "8=OFF", "8=CCL"}
if actionListAll contains actionOrdered is true then
log actionOrdered & " the list works" --comment out once it is working
set theIP to "http://admin:xxxxx@10.x.x.x:80/outlet?" --change your ip, username and PW here
set theURL to theIP & actionOrdered
log theURL --comment this out once it is working
set curlURL to "curl -k" & " " & theURL
set shellscript to curlURL
log shellscript -- commment this out once it is working
do shell script shellscript
set value of variable "Digital_Loggers_Office" to "x" --this is so you can send a repeated command if you wish, such as cycling a receiver each day.
end if
end tell
end using terms from
from awake import wol
wol.send_magic_packet('8C:C1:21:xx:xx:xx')
curl http://192.168.100.1/reset.htm?&reset_modem=Restart%20Cable%20Modem
do shell script "curl http://192.168.100.1/reset.htm?&reset_modem=Restart%20Cable%20Modem"
subprocess.Popen( "curl http://192.168.100.1/reset.htm?reset_modem=Restart%20Cable%20Modem",shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE).communicate()