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

WIP: adapt to HN8010TS #2

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

jonkerj
Copy link

@jonkerj jonkerj commented Sep 9, 2024

No description provided.

@jonkerj jonkerj changed the title feat: adapt to HN8010TS WIP: adapt to HN8010TS Sep 9, 2024
@jonkerj
Copy link
Author

jonkerj commented Sep 9, 2024

Hi there,

I made some changes to make your exporter work on Huawei HN8010 ONT's. I deliberately broke compatibility with the EG8145v5 there, so this should not be merged. The reason I broke compatibility with EG8145v5 is that HN8010 are very similar from the web-gui-scrape perspective, but have differences, and these could be addressed without repeating code too much.

If you like this idea of extending your project to different Huawei devices, I'd like your thoughts on what could be the best approach. I was thinking - but I'm just brainstorming here - feel free to shoot:

  1. split huawei-webgui logic (Login, Logout, Session) into a shared package, use that as a field in model-specific Client (e.g. eg8145/hn8010).
  2. generalize the http-request part where the pages/scripts are fetched, as it is already repitive in eg8145 right now and will be repeated much more for hn8010
  3. something smart for the collector, maybe using an interface in the model specific types

@jonkerj jonkerj marked this pull request as draft September 9, 2024 15:09
@akhy
Copy link
Member

akhy commented Sep 10, 2024

@jonkerj Hi, thanks for the PR. Honestly I'm glad someone found it useful. eg8145 is the only model I own right now, so I created the lib after this model. Would love to generalize and extend it to support other models as well 😄

  • Agree with your 1-2 points. I believe it's a must do to move this project forward 👍
  • For point 3, are you suggesting to also generalize the exporter?

@akhy
Copy link
Member

akhy commented Sep 10, 2024

I'll check the PR to see the differences and find out which shared logic we can extract.

@jonkerj
Copy link
Author

jonkerj commented Oct 15, 2024

Hi @akhy, do you have any feedback?

@jonkerj
Copy link
Author

jonkerj commented Nov 14, 2024

hello?

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

Successfully merging this pull request may close these issues.

2 participants