jhubig/FritzBoxShell

json instead of xml/soap

tik9 opened this issue ยท 1 comments

tik9 commented

Thanks for your code!

Is json instead of xml/soap possible?
I doubt it but might there be possible to use json instead of xml/soap one day for tr064? Here is json used for a callist.
Here I see xml all around.

Another question: FHEM is a user of TR064 as you and me or are they involved more deeply in developing the protocol?

Here is my output from the deviceinfo:
NewManufacturerName AVM
NewManufacturerOUI 00040E
NewModelName FRITZ!Box 6591 Cable (kdg)
NewDescription FRITZ!Box 6591 Cable (kdg) 161.07.21
NewProductClass FRITZ!Box
NewSerialNumber 2C91AB8FD991
NewSoftwareVersion 161.07.21
NewHardwareVersion FRITZ!Box 6591 Cable (kdg)
NewSpecVersion 1.0
NewProvisioningCode AXConfigured!
NewUpTime 2414644

I cannot see the Firmware in the output. Is it possible to show it or is mine 7.21? which is the os on the fritz.box site?

Here is the code I changed from your code, please also see README.
I focused on the deviceinfo and on the wlanstate for 2g.

I hope to find the time to answer my issues.

Hello,

sorry for my late response. I try to answer your points if I understood them correctly.

json and xml are ways how you get the data presented. Soap is the protocol used to communicate in that case with the FritzBox.
So simple answer. No ๐Ÿ˜€ There are other APIs (https://avm.de/service/schnittstellen/) but for this script mostly the TR064 protocol using SOAP request is used. For some cases (e.g. changing LEDs) the AHA-HTTP interface is used.

About FHEM I do not know, but maybe someone there in the community wrote a dedicated "plugin" (no idea if it is called like that in FHEM) to be used in FHEM. Something similar was also done in the ioBroker community: https://github.com/iobroker-community-adapters/ioBroker.tr-064

Firmware is the NewSoftwareVersion tag where you have 161.07.21 and indeed 07.21 is the firmware version. Please don't ask me for the three digits before. No idea ๐Ÿ˜€

What exactly did you change in your code? If there is something you would like to add here in the code which might be helpful for others please create a pull request.

I hope this helps. I will close this issue for now. But for sure feel free to open another one ๐Ÿ˜€