Skip to content

Add ability to fetch info for network interfaces and cellular modem connection info - #24

Open
doggkruse wants to merge 9 commits into
HarvsG:masterfrom
doggkruse:add_interfaces_and_modems
Open

Add ability to fetch info for network interfaces and cellular modem connection info#24
doggkruse wants to merge 9 commits into
HarvsG:masterfrom
doggkruse:add_interfaces_and_modems

Conversation

@doggkruse

Copy link
Copy Markdown

This is a preliminary step / companion commit to adding this info to the ha-glinet4-integration

Fetch Network interfaces status
Fetch Multi-WAN status
Determine the "Primary" WAN interface
Fetch Cellular Modem status
Fetch SIM Status
Fetch Cell Tower info
Command to Reboot Cellular modem

@HarvsG

HarvsG commented Jan 17, 2026

Copy link
Copy Markdown
Owner

Thanks for this.
At the moment we're handling a lot of the data validation etc in the component rather than in the library, but it makes sense to do it here - as you have done.
I'm time poor at the moment and this is a big PR.
A few discussion points.

  1. At the moment all the calls to the API happen in router.py. I am tempted to keep that the case and the new files can be helpers and import the calls from router.py as needed. I would be interested in your thoughts
  2. Have you tested this locally?
  3. How much of this code is AI and if > 0, are you happy with it.

@doggkruse

Copy link
Copy Markdown
Author

Appreciate that your time is limited, open to any feedback and happy to clean up as needed. Clearly I used AI for a lot of the grunt work here but can refactor to meet the need.

  1. I'm not sure I'm following this comment. router.py is in the integration and calls into the library, are you meaning to say API calls should be in glinet.py? I think it makes some sense to keep the APIs organized by module with a centralized RPC in the main file but I think I'm already following that pattern.

  2. Yes, I've been running it locally since mid-december and its working great

  3. See comment above :). Its not the most beautiful python but its working great

I'll get the PR for the integration in as well and then maybe the whole picture will be more clear and we can discuss further

@HarvsG

HarvsG commented Jan 17, 2026

Copy link
Copy Markdown
Owner

Lovely, thank you. I'll get to in time. The linting errors will need sorting at some poin.

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