Get transfer data from FritzBox

Hi together,

I’m looking for a possibility to get the transfer volume (online counter) information from my FritzBox router since a few days. My goal is a at least a daily persistence for the transfer volume information. As I can see, there is no official API from AVM to read this value. In the past there was a option to get this information by a prepared html document

Did anyone already such a implementation?

Another variant would be a daily mail from the FritzBox with the online counter information (this is supporting by the FritzBox) and parse the mail. This would be my next question: Is there a possibility to parse incoming mails with openHAB directly? Is it possible to use the Mail control binding for this circumstances? In the end I could use a external script to parse these mails and save the parsed value to an item.

Any suggestions? Thx a lot!

I don’t think there is a built in solution in OH. You can use the exec binding or executeCommandLine from a rule to send those POSTs to your FritzBox using curl which is a common approach.

The wiki for the Mail binding says it supports parsing text of a very specific format. It does not support arbitrary email though so if you don’t have control over what gets sent it won’t work.

So, if I see it right there is a possibility to read the used (send/received) bytes from FritzBox via TR-064 API: http://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/wancommonifconfigSCPD.pdf

There exists already a binding for TR-064: https://github.com/openhab/openhab/wiki/FritzBox-TR064-Binding

So, is it possible to extend this? I’m not really a Java developer, so maybe the maintainer of this binding could do this?