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

[Help needed] Freebox device scanner #799

Closed
jokob-sk opened this issue Sep 21, 2024 · 6 comments
Closed

[Help needed] Freebox device scanner #799

jokob-sk opened this issue Sep 21, 2024 · 6 comments
Labels
Contributors 🙏 Open for contributors to step in & help as I don't have time & expertise for everything myself. help wanted 🆘 Extra attention is needed next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed.

Comments

@jokob-sk
Copy link
Owner

It would be amazing if someone from the community could add a Freebox plugin.

The API (https://dev.freebox.fr/sdk/os/) seems to be documented, but unsure if devices and their status is available.

You can check the UNIFI plugin to get inspired/as a starting point: https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/unifi_import

There is also a 15-minute video on how to create a plugin: https://github.com/jokob-sk/NetAlertX/blob/main/docs/PLUGINS_DEV.md

Thanks in adbvance for your help!

Users who would benefit from this: @azertylr

@jokob-sk jokob-sk added help wanted 🆘 Extra attention is needed Contributors 🙏 Open for contributors to step in & help as I don't have time & expertise for everything myself. labels Sep 21, 2024
@jokob-sk jokob-sk changed the title [Help needed] Feebox device scanner [Help needed] Freebox device scanner Sep 21, 2024
@azertylr
Copy link

Hello,
The connected devices seem to be available here : https://dev.freebox.fr/sdk/os/lan/#lan-browser

@leiweibau
Copy link

A Freebox appears to have several interfaces. You would first have to determine the list of interfaces with “/api/v4/lan/browser/interfaces/” and then query the list of hosts per interface via “/api/v4/lan/browser/{interface}/”. At least that's what the API documentation leads me to believe.

I cannot say whether the “uid” is sufficient for authentication or whether it is necessary for all things. In case of doubt, you would first have to determine this via “/api_version”. If authentication is necessary, which I can well imagine in the case of the Lan browser, then the first step is to log in via “/api/v4/login/authorize/”.

At the end, I would also recommend logging out, otherwise you may reach the session limit of the Freebox.

Why can I say so much about this topic? I've been struggling with the Pi-hole 6 API for days 😉

@jokob-sk
Copy link
Owner Author

Thanks a lot for the details @leiweibau - figuring put APIs can be FUN - let's see if someone from the community can help 🙏

@KayJay7
Copy link
Contributor

KayJay7 commented Nov 30, 2024

I have published a pull request adding a plugin for the Freebox API (!901).

There's one evident inconvenience here: a device can report various names under different protocols.. some will be user-definable, some won't (and might be useless). The gateway'a API correctly stores all the names of a given device.
It would be useful if a plugin had a proper way to store multiple names for a device, so that the user can navigate them and choose an appropriate display name.

For this plugin, we have chosen to use the primary name set on the freebox. In this way, the user can use the freebox's webUI to chose one from a list (or set a custom one). This should be considered a workaround.

I see this issue will require lots of work, seeing how the db is structured. Perhaps in the future a dictionary-oriented dbms could be considered (mongo?). We are primarily storing objects here.

@jokob-sk
Copy link
Owner Author

thanks @KayJay7 for your ongoing work and contributions 🙏
re DB - I might consider it in the future, but as you noted, that would be a significant piece of work with probably limited benefits. thinking about having a field, similar as the comment field which could be used for additional data passed from a plugin... maybe in the future...

@jokob-sk jokob-sk added the next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed. label Dec 2, 2024
@jokob-sk
Copy link
Owner Author

Releasing -> Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributors 🙏 Open for contributors to step in & help as I don't have time & expertise for everything myself. help wanted 🆘 Extra attention is needed next release/in dev image🚀 This is coming in the next release or was already released if the issue is Closed.
Projects
None yet
Development

No branches or pull requests

4 participants