2012-02-26, 22:29
I'm looking at controlling my projector with XBMC. It has a horribly old web interface that magically only works in IE6. (The SSL is fubar, etc).
I finally figured out how to get it working through curl and I'd like to make it an addon. I tried System.Exec to run my bash script but it was not happy.
This is what I have right now:
I'd like to make it so that my python script will take parameters on what I want the projector to do and wire that to the remote.xml so power will turn the projector on.
Thanks.
I finally figured out how to get it working through curl and I'd like to make it an addon. I tried System.Exec to run my bash script but it was not happy.
This is what I have right now:
Code:
#!/bin/bash
curl -k -silent https://10.0.0.162/index.html -d "DATA1=Administrator&DATA2" -o /dev/null
if [ "$1" = "on" ] ; then
curl -k -silent https://10.0.0.162/admin/main.html -d "DATA1=Administrator&DATA2&D1=1&V1=1" -o /dev/null
fi
if [ "$1" = "off" ] ; then
curl -k -silent https://10.0.0.162/admin/main.html -d "DATA1=Administrator&DATA2&D2=0&V2=1" -o /dev/null
fi
if [ "$1" = "xbmc" ] ; then
curl -k -silent https://10.0.0.162/admin/main.html -d "DATA1=Administrator&DATA2&D3=3&V3=1" -o /dev/null
fi
if [ "$1" = "wii" ] ; then
curl -k -silent https://10.0.0.162/admin/main.html -d "DATA1=Administrator&DATA2&D3=5&V3=1" -o /dev/null
fi
I'd like to make it so that my python script will take parameters on what I want the projector to do and wire that to the remote.xml so power will turn the projector on.
Thanks.