Tips for Use and Testing

Tips

Example IP Addresses

I.P. addresses here are examples, and will generally be of the form 192.168.1.999 or 192.168.1.xx. You should replace the last segment with the correct I.P. address.

DONE Marker

When using the SmartThings LANdroid device handler, the DONE marker is appended automatically for you.  But when using other mechanisms, such as SMS from outside of SmartThings or curl commands, you may find reliability improved by tacking it on manually.

The DONE Marker is @DONE@.  It should be appended with a query separator (the ampersand – & ) – e.g.

	curl "192.168.1.999:1035/?ALARM=SIREN&@DONE@"

Speak Envelope

LANnouncer understands socket commands (and SMS commands) that SmartThings natively doesn’t know how to send.  And in many cases, SmartThings doesn’t have the flexibility to send arbitrary commands; it expects to support only specific devices in specific contexts.  This can be limiting.

To get around this, you can use the SPEAK ENVELOPE.  For example, if an alarm isn’t supported but voice is, you could “say” SPEAK=@|ALARM=CHIME to get the chime.

Multiple Commands

When firing several actions against the same LANnouncer at the same time, it’s better to issue them as one with a SPEAK Envelope than as individual commands.  This is because SmartThings does not handle
sockets well, so the best approach is to send few of them.

Commands can be strung together with &.  This can be done via the Speak Envelope or directly if using sockets.

For example, to send a chime and collect a sequence of photos, you can send the commands ?CHIME=ALARM&RETRIEVESEQ=MYCAMERA.

This even works with speech; you could send, e.g.,

curl “192.168.1.999:1035/?SPEAK=@|ALARM=CHIME&SPEAK=Hello daddy&@DONE@”

Testing

Use curl.  Heavily.  To test image retrieval, ensure the command should return images (rather than just saving them), and redirect the curl results to a file.