http XML Housebot protocol
Posted: Mon Jun 13, 2011 12:28 pm
Hi folks,
I'm at the point with my browser HB client project where I will developing the HB communications between the browser and web serve.
As a result I'm looking for suggestions, wish-lists, ideas, of what HB users would like to see in an XML communication protocol with the HB (web) server.
In it's simplest form I'm looking to send xml back and forth containing device names, property names, property values, task names and task status. I plan on providing at least two methods for getting data... An "all" request which will essentially grab everything it can and return it via xml, and a "specific" request that will return one or more values based on your request.
The requests & response format will be very similar in XML structure. However, a request will have no value or a blank value specified. If a value is specified, the server will interpret that as value change.
I think this feedback is important, as I suspect folks will use the xml protocol for other reasons than just the browser client.
Thanks
Tim
Example of pseudo protocol below:
To request all values...
<HBcom Type="Request-All"/>
Response from server to client...
<HBcom Type="Response-All">
<Devices>
<Device="Kitchen Light" Property="State">On</Device>
<Device="Amplifier" Property="Volume">11</Device>
</Devices>
<Tasks>
<Task="Get Weather">Running</Task>
</Tasks>
</HBcom>
Requesting a value(s) from the server...
<HBcom Type="Request">
<Devices>
<Device="Kitchen Light" Property="State"></Device>
</Devices>
<Tasks>
<Task="Get Weather"></Task>
</Tasks>
</HBcom>
Would yield something like this...
<HBcom Type="Response-Request">
<Devices>
<Device="Kitchen Light" Property="State">On</Device>
</Devices>
<Tasks>
<Task="Get Weather">Running</Task>
</Tasks>
</HBcom>
Setting a value would be something like...
<HBcom Type="Request">
<Devices>
<Device="Kitchen Light" Property="State">Off</Device>
</Devices>
</HBcom>
With a response back like...
<HBcom Type="Response-Request">
<Devices>
<Device="Kitchen Light" Property="State" Successful="Yes">Off</Device>
</Devices>
</HBcom>
I'm at the point with my browser HB client project where I will developing the HB communications between the browser and web serve.
As a result I'm looking for suggestions, wish-lists, ideas, of what HB users would like to see in an XML communication protocol with the HB (web) server.
In it's simplest form I'm looking to send xml back and forth containing device names, property names, property values, task names and task status. I plan on providing at least two methods for getting data... An "all" request which will essentially grab everything it can and return it via xml, and a "specific" request that will return one or more values based on your request.
The requests & response format will be very similar in XML structure. However, a request will have no value or a blank value specified. If a value is specified, the server will interpret that as value change.
I think this feedback is important, as I suspect folks will use the xml protocol for other reasons than just the browser client.
Thanks
Tim
Example of pseudo protocol below:
To request all values...
<HBcom Type="Request-All"/>
Response from server to client...
<HBcom Type="Response-All">
<Devices>
<Device="Kitchen Light" Property="State">On</Device>
<Device="Amplifier" Property="Volume">11</Device>
</Devices>
<Tasks>
<Task="Get Weather">Running</Task>
</Tasks>
</HBcom>
Requesting a value(s) from the server...
<HBcom Type="Request">
<Devices>
<Device="Kitchen Light" Property="State"></Device>
</Devices>
<Tasks>
<Task="Get Weather"></Task>
</Tasks>
</HBcom>
Would yield something like this...
<HBcom Type="Response-Request">
<Devices>
<Device="Kitchen Light" Property="State">On</Device>
</Devices>
<Tasks>
<Task="Get Weather">Running</Task>
</Tasks>
</HBcom>
Setting a value would be something like...
<HBcom Type="Request">
<Devices>
<Device="Kitchen Light" Property="State">Off</Device>
</Devices>
</HBcom>
With a response back like...
<HBcom Type="Response-Request">
<Devices>
<Device="Kitchen Light" Property="State" Successful="Yes">Off</Device>
</Devices>
</HBcom>