openhab/openhab — pull request #95 by dhufnagel (2013-11-09 00:02:07+00:00)
Title: Enhanced Fritzbox Binding

As described in https://code.google.com/p/openhab/issues/detail?id=272 I enhanced the FritzBox binding to easily switch on/off wlan, dect and tam#. Also there is the possibility to execute a query via telnet on the FritzBox and bind the result to an item. The same is possible for commands, but only for switch items.

The Telnet part is implemented using the TelnetClient from apache commons net. The implemented approach sends and receives in serial order, which is sufficient for this solution. The telnet part is extracted to a thread, because there are forced sleeps of about 1.5 seconds per receive command, to be sure that the answer is received from FB. Otherwise the reading of the input stream would block the whole thread.

For questions i can be reached via the issue thread.