Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility issue: data.lua responds json instead of html now #27

Open
No3x opened this issue Mar 12, 2020 · 3 comments
Open

Compatibility issue: data.lua responds json instead of html now #27

No3x opened this issue Mar 12, 2020 · 3 comments

Comments

@No3x
Copy link

No3x commented Mar 12, 2020

Method: getGuestWLAN
The method queries data.lua and the request works fine. On my FRITZ!OS-Version 07.12 data.lua responds with json but the current implementation assumes html. Therefore no valid data is extracted.

Example response - click to expand
{
  "data": {
    "timestamp": 153,
    "guestAccess": {
      "lPTxt": "",
      "psk": "MyPSKKKKK123123123",
      "isIpClient": false,
      "supportsRegulation": true,
      "notification": "0",
      "notificationEnabled": "0",
      "autoUpdate": "1",
      "showGuest": true,
      "mode": "1",
      "lPEnabled": "0",
      "lPRedirect": "0",
      "activeNexusClient": false,
      "hideRepAutoUpdate": true,
      "timeout": "30",
      "isMaster": true,
      "lPImg": "0",
      "timeoutNoForcedOff": "0",
      "lPReguire": "0",
      "defaultSsid": {
        "private": "FRITZ!Box Gastzugang",
        "public": "FRITZ! Hotspot"
      },
      "guestGroupAccess": "1",
      "isolated": "1",
      "boxType": "box",
      "ssid": "FRITZ!Box MYName",
      "isEnabled": "0",
      "lPRedirectUrl": "",
      "wpsActive": true,
      "isTimeoutActive": "0"
    }
  },
  "hide": {
    "ssoEmail": true,
    "shareUsb": true,
    "liveTv": true,
    "faxSet": true,
    "dectMoniEx": true,
    "rss": true,
    "mobile": true,
    "dectMail": true,
    "ssoSet": true,
    "liveImg": true
  },
  "pid": "wGuest",
  "sid": "9eeef9918eb956f7"
}

I checked if the same is true for data.lua with page homeNet but this API returns still HTML.

@FlorianWendelborn
Copy link
Owner

Don’t have much time to work on this project right now, but I’d gladly accept a pull request that implements this functionality

Thanks for reporting it in any case, the first step to solving this is to be aware of it. ;)

@No3x
Copy link
Author

No3x commented Apr 12, 2020

I fixed what I need in my fork for the newer FRITZ!OS-Version. To merge this one would need a setting/toggle/switch to choose the right parsing or try the other parsing if the first one fails. Furthermore my current implementation does support parsing of a subset of values only. But I don't have time/need to fix this properly.
Thanks for making this lib public 👍

@filly82
Copy link

filly82 commented Jun 2, 2020

would also appreciate a fix for the newer versions of FRITZ!OS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants