Sagemcom router support

Great work!

I think would be nice to have a sensor for an network interface sent and received bytes. Maybe publish everything from a xpath expression. eg: “Device/PPP/Interfaces/Interface/Stats”

Every time the integration connects to do router it does a login?

Thanks @andrempo! Do you perhaps have Python skills? I am still looking for contributors for this integration, since I didn’t have much time to work on it. The API should be solid, but the Home Assistant integration needs a lot of love.

It keeps the session open, thus it will just re login when required.

My python skills are a little rusty, I was able to use the library but I need to learn how to integrate with home assistant.

1 Like

Any chances this integration will work with Sagemcom Funbox3 (router used by Orange - common ISP in Poland)?

Quick way to check?

You could give https://github.com/iMicknl/ha-sagemcom-fast a try! Just make sure you try both login methods for your device, and check the log for errors.

I’ve just tried running the code from “Getting Started” on the sagecom-api (you are using this one, right?).

I’m just getting UnknownException, without much info in it, when I try to call client.login().
I’ve tried both encryption methods.

So I guess api is specific for those F@st Sagemcom routers :frowning:

There was just a great contribution from arunpoudel, thus the issues with home/unavailable should be fixed!

It will be merged soon, but in the mean-time you could give this version a try. Extract the custom_components/sagemcom_fast to your custom_components folder.

Hi @imick , could you tell me how to save the JSON you need? I would like to add a new box to your list :wink:

Did you try using the current integration and didn’t it work?

If everything works, easiest would be to create an issue here with your device details, or do a pull request to add it the README.

If it doesn’t work, you can create an issue on the same repository with your device details and we will see if we can help you further.

Just registered an account to be able to give a shout out. Nice work! :slight_smile:

I just installed it with HACS and will test it out.

1 Like

@eraced, does it work? :slight_smile:

I wonder if it would make sense to eventually add this integration to Home Assistant core. Are people actually using this integration?

Could you share the first 6 digits (vendor) of the MAC address of your router? I wonder if all Sagemcom F@st routers share the same vendor id, thus we could add auto discover.

iMicknl/ha-sagemcom-fast: Home Assistant integration to enable presence detection via Sagemcom F@st routers. (github.com)

If you want, ine

If you want here is my MAC 6c9961 .
Hope it will help

Hello, I have a quick question, is reboot working ok for devices? As tried and it does not works for my Sagemcom F@st5360, wonder if the problem is with this model only

This works great.

I think it would be useful to add a sensor that tracks your external IP from “Device/IP/Interfaces/Interface[1]” (with other subnet, gateway etc in sensor attributes)

Add sensor entities · Issue #7 · iMicknl/ha-sagemcom-fast (github.com)

This is currently tracked here, however I don’t have the bandwith to implement this.

Hi Mick, I’m using a router privided by my ISP labeled as Sagemcom FAST3890V2. I saw that FAST3890V3 is supported, so I tried to integrate with HA expecting either to work flawlessly :smiley: or to see some errors in log viewer :face_with_monocle:. Despite configuring the log for this custom component to critical nothing shows up. I tested another custom component (tuya v2 integration) and I know for sure that logger used to show info from it. Any idea what might be going on?

This is the only line refered to this integration

2021-08-05 00:43:23 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration sagemcom_fast which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

What happens when you try to configure the integration via the Config Flow?

Hi, i managed to install your addon by uploading the files.
since the repo did not work.
.
and it was all success i see all my devices in the entity. i use Sagemcom F@st 3890V3.

This is SUPER awsome tool! please keep working on this feaure.

First of all, I would like to say: Really good work!

I use a Speedport Pro and had to make a few adjustments.

Firstly, the timeout had to be changed, otherwise errors would keep occurring:
init.py line 54:
from:
session = aiohttp_client.async_get_clientsession(hass)
to:
session = aiohttp_client.async_create_clientsession(hass, timeout=ClientTimeout(20))

and at the beginning of the file:
from aiohttp import ClientTimeout

Maybe you could make the timeout adjustable during the setup?

Furthermore, the reboot service did not work, so I adapted the following:
init.py line 131:
from
client.reboot()
to
await client.reboot()

now everything works as it should,
However, I only use the reboot function myself.

Thanks for reporting! What kind of errors did you face with the default time out? In my tests I only faced these errors during login, when I chose the wrong authentication method.

Are you able to do a pull request on GitHub with your changes? Otherwise I will see if I can adapt them in the coming weeks. :slight_smile: