kaklakariada / fritzbox-java-api

Java API for managing FritzBox HomeAutomation
GNU General Public License v3.0
20 stars 13 forks source link

Support new device "Blind" and suppy device statistics #34

Closed JunkerMartin closed 2 years ago

JunkerMartin commented 2 years ago

AVM supports a new device "Blind". The companies "Becker" (BoxCTRL) and "Rademacher" (Rollotron DECT 1213) supply the hardware for this. The "getdevicelist" fails because the xml provided by the fritzbox cannot be marshalled to a DeviceList-object. There is no class "Blind", so the tag cannot become instantiated.

The statistic retrieval in TestDriver ist commented out. When I tried, I found it failing due to unsupported commands. I added retrieval of statistics by adding (or updating) the classes "DeviceStats", "Statistics", "Energy", "Power", "Humidity" and "Voltage" (and some helping classes). I also added a JUnit-Test for marshalling the statistics. The code has been developed by the samples I got when retrieving the data. I'm not sure, whether to docu provided with "AVM Home Automation HTTP Interface" contains really all what is to be known about this. I fear, that, under some cirumstances there might come up another xml-tag which again will fail the marshalling. It looks more like a draft document.

I have added displaying of energy-statistics and power statistics to the sample "TestDriver"

kaklakariada commented 2 years ago

There are still some issues with the PR. I will merge it and fix the issues myself.

kaklakariada commented 2 years ago

I created release 1.5.0 and published it to Maven Central. It should be available soon at https://repo1.maven.org/maven2/com/github/kaklakariada/fritzbox-java-api/1.5.0/