[RELEASE HousePanel 2.072]
Minor but useful update that enables multiple tiles to be queried at once using the API. I also updated the sample python file called hpapi.py to work with the current version.
To use this feature, invoke the API as usual and separate the tile numbers by a comma as below:
http://192.168.11.20/smartthings/housepanel.php?api=doquery&tile=51,381
This will return an array of results - one for tile 51 and one for tile 381. Tile numbers are obtained from the Show Info page.
The original multi-tile API feature to turn things on at once is still there. As a reminder one does this using the attr feature and doaction as follows:
http://192.168.11.20/smartthings/housepanel.php?api=doaction&tile=51,381&attr=toggle
This will toggle the lights of tiles 51 and 381. Any number of tiles can be listed with each separated by a comma.
One important change is the results are now a proper json array where before it was not. So the above commands will return something like:
[{“switch”:“off”},{“switch”:“off”}]
Types can be mixed and matched. This example returns one of my thermostats in between the two lights:
http://192.168.11.20/smartthings/housepanel.php?api=doquery&tile=51,121,381
[{“name”:“Stairway”,“switch”:“off”,“event_1”:“off 6/16 5:01”,“event_2”:“on 6/16 5:01”},{“name”:“Main Thermostat”,“temperature”:70,“heatingSetpoint”:67,“coolingSetpoint”:72,“thermostatFanMode”:“auto”,“thermostatMode”:“heat”,“thermostatOperatingState”:“idle”,“humidity”:58,“event_1”:“67 6/16 3:03”,“event_2”:“setCoolingSetpoint 6/16 3:02”,“event_3”:“setHeatingSetpoint 6/16 3:02”,“event_4”:“64 6/16 10:28”},{“name”:“Office Lamp”,“switch”:“off”,“event_1”:“off 6/16 5:01”,“event_2”:“on 6/16 5:01”}]
The only restriction is all tiles must be from the same hub. The hubnum must be given if you want to access anything other than the first hub.