http://www.squareconnect.com/index.html
Is there or will there be support for the SQ Blaster or how would I approach making an integration?
OH
Questions about hardware that can be controlled by Indigo (but not through the interfaces and plugins listed). If Indigo doesn't support some bit of hardware you're interested in, and you don't find a 3rd Party Plugin for it, add it to this forum. Be sure to include links to as much information as you can find about it.
Note: adding it here does not mean we're going to add it - in fact it's possible one of our 3rd party developers may decide to write a plugin for it. We add hardware/features based on a lot of different factors beyond just having a request for it.
wiery wrote:I integrated this with a shell script that worked quite well but to be honest it was a far better option to get the Global Cache ones. If you want the script I can get it for you if you want
jay (support) wrote:Assuming it has an API, you could build an Indigo Plugin for it using our Plugin API/SDK...
We have no current plans to build any integration ourselves.
#!/bin/bash
# Called as: send_ir_cmd <command name>
# e.g. send_ir_cmd POWER ON
# or send_ir_cmd "POWER ON"
# Get name and location of the script
me=${0##*/}
mydir=$(which $0)
mydir=${mydir%/*}
mydir=${mydir:-/}
mydir=$(cd "$mydir"; pwd)
# Command name (join command line arguments)
# If no arguments, reset them to UPPERCASED "_" seperated words of link call name
#if [[ $# -eq 0 && -L $0 ]]; then
#set -- $(echo "$me" | tr '_a-z' ' A-Z')
#fi
# Command name (join command line arguments)
cmd="$*"
# Set the server name
# (will make command line option later)
server=192.168.0.8
# Set the API to call
# (will make command line option later)
api=docmnd.xml
# Set the device
# (will make command line option later)
dev=dev2898133276
# Set location of XML ir_data file to use (based on script location and device name)
# (will make command line option later)
ir_data_file=$mydir/$dev.xml
# Just list command names if $1 is "-l"
if [[ $1 = "-l" ]]; then
awk '
BEGIN {RS="<"; FS="\""; rc=1}
$0~/ command_name="/ {sub(/^.* command_name="/,""); print $1}
' $ir_data_file |
sort
exit $?
elif [[ $1 = "-c" ]]; then
awk '
BEGIN {RS="<"; FS="\""; rc=1}
$0~/ command_name="/ {sub(/^.* command_name="/,""); print $1}
' $ir_data_file |
sort |
awk 'BEGIN {ORS=", "}; {printf "%-20s",$0}; NR%5==0 {printf "\n"}; END {printf "\n"}'
exit $?
fi
# Get the ir_data for the command passed, exit if not found
if ! ir_data=$(awk -v cmd="$cmd" '
BEGIN {RS="<"; FS="\""; rc=1}
rc!=0 && $0~"command_name=\""cmd"\"" {sub(/^.* ir_data="/,""); print $1; rc=0}
END {exit rc}
' $ir_data_file)
then
echo "$me: No IR data found for device \"$dev\" command \"$cmd\" in data file \"$ir_data_file\"" >&2
exit 1
fi
# Set the data to POST
data='<docommand
key="'$dev'"
repeat= "100"
seq = "0"
command="'"$cmd"'"
ir_data="'"$ir_data"'"
ch="0"
/>'
echo "--- Data to POST ---"
echo "$data"
echo "--- End of data to POST ---"
# Supply data on STDIN to curl to POST to server API
# (let response go to STDOUT - script exit code will be that of curl)
#echo "${data:?}" | curl -v -d @- --dump-header - http://${server:?}/${api:?}
/usr/bin/wget -O - -v --post-data="${data:?}" http://${server:?}/${api:?}
echo=$?
echo
exit $rc
Users browsing this forum: No registered users and 6 guests