/** * @page TellStickNet TellStick Net protocol * * \section Introduction * * TellStick Net will eventually support local access through the LAN. This is * unsupported by Telldus Technologies but can be useful in some cases. For * instance in mobile devices or when the internet is not available. Using * TellStick Net through Telldus Live! is still the prefered and supported * method. * * This interface is still under development and is not ready for * production. * * \section autodiscovery Auto discovery * * The TellStick Net can be auto discovered on the LAN using UDP broadcast. * Sending a package to the broadcast address 255.255.255.255 port 30303 will * be responded by any TellStick Net on the network. The packet should only * contain the single character 'D' (ascii number 68). * * The response from the device will be sent back to the same host and port as * the originated packet. So any dynamically port can be assigned by the host * implementing the auto discovery. * The returning packet is constructed in the following way: * product:mac address:activation code:firmware * * Example:
* TellStickNet:ABCDEFGHIJKL:ABDCEFGHIJ:2
* Product: TellStick Net (TSNET)
* Mac address: AB:CD:EF:GH:IJ:KL
* Code for activation: ABCDEFGHIJ
* Firmware version: 2 * * Use the source ip-address to determine the address to the device. * * \section messageformat Message format * * The message format used to communicate with TellStick Net is designed to be * easily parsed but still be flexible. It can be converted to and from json * without losing information. * * There exists four datatypes; string, integer, list and dictionary: * * - Strings are length-prefixed base sixteen followed by a colon and the * string. For example 6:FooBar corresponds to 'FooBar'. * * - Integers are represented by an 'i' followed by the number in base 16 * followed by an 's'. For example i3s corresponds to 3 and i-3s corresponds * to -3. Integers have no size limitation. i-0s is invalid. All encodings * with a leading zero, such as i03s, are invalid, other than i0s, which of * course corresponds to 0. * * - Lists are encoded as an 'l' followed by their elements (also encoded) * followed by an 's'. For example l3:foo3:bars corresponds to ['foo', 'bar']. * * - Dictionaries are encoded as a 'h' followed by a list of alternating keys and * their corresponding values followed by an 's'. For example, * h3:foo3:bar5:hello5:worlds corresponds to {'foo': 'bar', 'hello': 'world'} * and h3:fool3:bar3:bazss corresponds to {'foo': ['bar', 'baz']}. Keys must * be strings. */