mknx/smarthome — pull request #49 by ohinckel (2013-11-21 11:38:37+00:00)
Title: wetter.com plugin: check if expected nodes exist in result XML

I tried to use the `wettercom` plugin and it did not work properly since some nodes do not exist in the XML response (for example in my case it was `pc`, `ws`, `wd` and `wd_txt`).

This patch changes the plugin to check for the existence of the requested node before accessing the nodes' content. The value `None` will be returned in case the node does not exist.

Btw. I can't find any documentation describing the XML structure. It could be possible, that some more parameter needs to be transmitted to the service to retrieve the missing data but the API is not well-documented and I can't find something about it.

Further, it also offers a JSON result instead of XML. Handling JSON instead of XML could be a little bit more easy and requires less resources (guess).