Katoomba Sound - Speaker Switch Owners Manual (SPKR7)


ContentsNoticesGetting StartedQuick Start GuideSpeaker WiringNetwork SetupGeneral SetupAdvanced SetupOperatingProgrammers GuideSoftware Release NotesHelp

Programmers Guide

Introduction
HTML Requests

Introduction

The Katoomba Sound Speaker Switch (SPKR7) does not implement a full API (application programming interface) (JSON or SOAP). Instead, simple URL requests can be made to control the speaker switches. The following section describes the format and use of the special HTML requests.

HTML Requests

You can make special HTML requests to control each of the speaker switches. You can explicitly turn a speaker on or off. You can also toggle speaker switches.

The examples below show "wget" commands where the speaker switch IP address is 192.168.1.134. Remember to replace that IP address with the IP address (or FQDN) of your targeted speaker switch.

Method 1: Turn Speakers On or Off

Example 1: Turn speaker 7 on:

wget -q -O /dev/null http://192.168.1.134/index.php?spkr=7&mode=On

Example 2: Turn speaker 5 off:

wget -q -O /dev/null http://192.168.1.134/index.php?spkr=5&mode=Off

NOTE: The example shown use command line parameters "-q -O /dev/null", which suppresses local output. If you want to capture the response from the speaker switch then remove those options.

Method 2: Using remotecontrol.php

You can also turn speakers on, off, or toggle them, using remotecontrol.php:

wget -q -O /dev/null http://192.168.1.134/remotecontrol.php?spkr=1&COMMAND=SPKR_OFF

wget -q -O /dev/null http://192.168.1.134/remotecontrol.php?spkr=8&COMMAND=SPKR_ON

wget -q -O /dev/null http://192.168.1.134/remotecontrol.php?spkr=3&COMMAND=TOGGLE

IMPORTANT
1) The query string "spkr" must be all lower case.
2) The command text ("COMMAND") must be all upper case.
3) The commands themselves ("SPKR_OFF","SPKR_ON","TOGGLE") must be all upper case.

You can embed all of the above URL's directly into web pages or add them into automation system scripts and home controller scripts etc.

Get the Status of All Speakers

You can get a JSON file that represents the state (on or off) of all of the speakers using:

wget http://192.168.1.134/state/speakers.state

Example JSON response:

{"Spkr1":"On","Spkr2":"Off","Spkr3":"Off","Spkr4":"Off","Spkr5":"Off","Spkr6":"Off","Spkr7":"On","Spkr8":"Off","Order":["Spkr7","Spkr1"]}