andig / pimatic-fritz

Pimatic plugin for Fritz!Box SmartHome and FritzDect!200 Node
GNU General Public License v2.0
8 stars 6 forks source link

Enhancement: add temp reading of fritz box #2

Closed RenGro closed 9 years ago

RenGro commented 9 years ago

Hi Andig,

first of all: it's a really nice plugin to control Fritz!Dect by Pimatic. State, power and energy attributes are working fine. Since some weeks Fritz!Dect is able to measure and display the temperature within offical firmware.

Would you be able to enhance your plugin, so that the temperature could also be used within Pimatic?

Thanks in advance RenGro

andig commented 9 years ago

Will do asap. Do you by chance have a pointer to the current api docs?

RenGro commented 9 years ago

Hi Andig,

Sounds great!

But I cannot understand your question :-(

Maybe you can write in German :-)

Von meinem iPad gesendet

Am 28.12.2014 um 17:51 schrieb andig notifications@github.com:

Will do asap. Do you by chance have a pointer to the current api docs?

— Reply to this email directly or view it on GitHub.

andig commented 9 years ago

Ich finde bei Avm keine Doku wie die Temperatur auszulesen ist?

RenGro commented 9 years ago

Hi,   habe Google mal gequält und auch nicht wirklich viel Infos gefunden.   Über http://www.tdressler.net/ipsymcon/fritz_aha.html bin ich auf die AVM Schnittstellendokus gestoßen. Und dort steht, dass über getdevicelistinfos die Temperatur ausgelesen werden kann (mittels AHA HTTP Interface)   Grüße René   -----Original-Nachricht----- Betreff: Re: [pimatic-fritz] Enhancement: (#2) Datum: Sun, 28 Dec 2014 19:59:49 +0100 Von: andig notifications@github.com An: andig/pimatic-fritz pimatic-fritz@noreply.github.com    

Ich finde bei Avm keine Doku wie die Temperatur auszulesen ist? —Reply to this email directly or view it on GitHub.  

mwittig commented 9 years ago

According to http://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf the temperature can only be read using the "getdevicelistinfos" method. As this method also provides switch state, power, energy values, an update can now be obtained with a single fritzcall rather than performing three calls per update cycle. However, as "getdevicelistinfos" returns XML I had to integrate an XML Parser. I have chosen xml2js to map the XML document to a simplified JSON object. This way, the code is easier to read a no xpath expressions are required for scoping.

I have also added support for xAttributeOptions and xLink extensions

andig commented 9 years ago

Thank you for this PR!