Skip Menu |

This queue is for tickets about the WebService-FritzBox CPAN distribution.

Report information
The Basics
Id: 115063
Status: rejected
Worked: 30 min
Priority: 0/
Queue: WebService-FritzBox

People
Owner: Nobody in particular
Requestors: will.code.for.pizza [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: WebService::FritzBox - technical question
Date: Sat, 04 Jun 2016 14:37:22 +0200
To: bug-WebService-FritzBox [...] rt.cpan.org
From: "will.code.for.pizza [...] gmail.com" <will.code.for.pizza [...] gmail.com>
Hi Robin, first thanks a lot for this module. I think, it will help a lot in managing the FritzBox. Unfortunatelly, the module is not well documented. I think, you - as developer - assume too much internal knowledge from the end user. It would be nice to read some more examples. Additionally, the both examples for "get" and "post" doesn't fit together, which is didactically unsuitable. The "get" example belongs to inetstat_monitor, while the "post" example refers to deleting the syslog. The examples should be more congruent for easy understanding. But now to my real question. I want so set the wakeup call "alarm 1" to active. The line for $fritzbox->get( path => '/fon_devices/alarm.lua?useajax=1&xhr=1&action=get_graphic' ); shows <input type="checkbox" id="uiViewActive" name="active" onclick="OnActive(this.checked)" >&nbsp;<label for="uiViewActive">Weckruf aktivieren</label> My attempts with $fritzbox->post( path => '/fon_devices/alarm.lua?active=1' ); failed. Please could you explain, how to activate checkboxes in your module ? Many thanks and cheers! Mike
Hi Mike, Show quoted text
> Unfortunatelly, the module is not well documented. > I think, you - as developer - assume too much internal knowledge from > the end user.
Interacting with the FritzBox is a hacky process as there are no documented API endpoints, only some of them respond with "good" json (the rest need to be decoded from HTML), and so yes: much internal knowledge of FritzBox is necessary to implement anything which is not already done (e.g. I have already done methods for bandwidth and syslog). Show quoted text
> It would be nice to read some more examples. > > Additionally, the both examples for "get" and "post" doesn't fit > together, which is didactically unsuitable. > > The "get" example belongs to inetstat_monitor, while the "post" example > refers to deleting the syslog.
I agree - more examples would be great! :) As I said - FritzBox does not have a clean API to connect to, so it I don't know of any examples which would be easy to pair get/post with. Show quoted text
> I want so set the wakeup call "alarm 1" to active.
I haven't looked into the alarm settings at all, so I cannot help you there. Please let me know with a pull request if you manage to get it to work! As your comments are suggestions, and not actual bugs that I can fix, I'm going to close this, but if you do any reverse-engineering and are able to add more function encapsulating methods to the module, or would like to improve documentation I'd love to see some pull requests on github from you! :) Cheers, -Robin-
Hi Mike, Show quoted text
> Unfortunatelly, the module is not well documented. > I think, you - as developer - assume too much internal knowledge from > the end user.
Interacting with the FritzBox is a hacky process as there are no documented API endpoints, only some of them respond with "good" json (the rest need to be decoded from HTML), and so yes: much internal knowledge of FritzBox is necessary to implement anything which is not already done (e.g. I have already done methods for bandwidth and syslog). Show quoted text
> It would be nice to read some more examples. > > Additionally, the both examples for "get" and "post" doesn't fit > together, which is didactically unsuitable. > > The "get" example belongs to inetstat_monitor, while the "post" example > refers to deleting the syslog.
I agree - more examples would be great! :) As I said - FritzBox does not have a clean API to connect to, so it I don't know of any examples which would be easy to pair get/post with. Show quoted text
> I want so set the wakeup call "alarm 1" to active.
I haven't looked into the alarm settings at all, so I cannot help you there. Please let me know with a pull request if you manage to get it to work! As your comments are suggestions, and not actual bugs that I can fix, I'm going to close this, but if you do any reverse-engineering and are able to add more function encapsulating methods to the module, or would like to improve documentation I'd love to see some pull requests on github from you! :) Cheers, -Robin-