I do not have logs from HA anymore, but using your API without a higher timeout (minimum 15s), the same error as reported in this issue appears. After further investigation, I found out that XMO_AUTHENTICATION_ERR is returned by the router.
It seems like those Telekom routers need some more time…
The reboot service just did not work for me, but no errors in the log. With await in front of client.reboot() the router restarts as it should.
Unfortunately I don’t know how to create a pull request properly, I mainly program for myself and have a very rudimentary knowledge of GitHub, sorry
Trying to install it manually: copied the custom_components/sagemcom_fast to my custom_components folder. Rebooted HA but I do not see ‘Sagecom f@st’ among the integrations list… in integrations in HACS there is not Sagecom as well… How can I install it? HA 2021.12.5
Just refreshed a browser and the integration appeared in the list. maybe this note should be added to the Readme.md on github.
But face another issue. I managed to configured my 3890V3 with sha512 (with md5 it could not add this integration) type of Authentication only. but on the integration card I see an error ‘Failed to set up. See log’. This is the log entry (only one):
This error originated from a custom integration.
Logger: custom_components.sagemcom_fast
Source: custom_components/sagemcom_fast/__init__.py:60
Integration: Sagemcom F@st (documentation, issues)
First occurred: 9:13:08 PM (1 occurrences)
Last logged: 9:13:08 PM
{'code': 16777224, 'description': 'XMO_LOGIN_RETRY_ERR'}
Traceback (most recent call last):
File "/config/custom_components/sagemcom_fast/__init__.py", line 60, in async_setup_entry
await client.login()
File "/usr/local/lib/python3.9/site-packages/sagemcom_api/client.py", line 265, in login
response = await self.__api_request_async([actions], True)
File "/usr/local/lib/python3.9/site-packages/sagemcom_api/client.py", line 235, in __api_request_async
raise UnknownException(action_error)
sagemcom_api.exceptions.UnknownException: {'code': 16777224, 'description': 'XMO_LOGIN_RETRY_ERR'}
Could you perhaps create an issue on Github? I cannot promise that I can have a look soon, however this will at least make it more clear for other contributors.
First of all, I would like to say: Really good work!
I use a Speedport Pro and had to make a few adjustments.
Hi @M4D1NG3R : How did you configure the speedport? I tried “192.168.2.1” as host (as this is the IP where I can reach my speedport), leave username empty and use the password on the device, as well as MD5, but I can’t login. What do you provide as username?
@elfstone since the last update there are some bugs in python-sagemcom-api, which break the home assistant integration for my Speedport, I already created a pull request.
Therefore, you also need to edit the files as seen in the issue/pull request.
I missed your PR, but I will merge and release it now. Unfortunately I haven’t had much time lately to work on this integration, due to my work on other integrations, and since I don’t really use this myself.
Last release indeed added some bugs since some contributed code was only tested on a single device.
@M4D1NG3R , @imick: Thanks for your fast replies, but I’m still a bit lost.
I updated “ha-sagemcom-fast” to master via HACS, but this only includes the change about the reboot - and my setup still fails. Do I also need to install “python-sagemcom-api” myself? It’s not listed as a dependency in “ha-sagemcom-fast” - documentation.
Sorry, I’m still quite new to homeassistant, and especially to dealing with custom components and HACS.
Edit: I’ve looked a bit into the code, and I think that python-sagemcom-api is imported via python, so it’s a requirement. Maybe this should be mentioned in the doc as well? But I’m still unsure on how to install the api-package. The documentation says pip, but after googling pip and Homeassistant, I read that pip should not be used as updates will be overwritten with HA-updates. Is there a way to install the API via HACS as well?
Thanks! Is the integration at the moment usuable? Or do you miss some important features / face bugs.
The reason why I didn’t really pursue this eventually, is the usage. This is a very small niche, and analytics show that only 12 users are using the integration. (see https://analytics.home-assistant.io/custom_integrations.json → sagemcom_fast domain.
Version 0.2.6 works fine for me. But I mostly use it for a daily reboot of my router due to connectivity problems with the DSL/LTE combi I use.
The presence detection seems to work, but since I do not rely on it, I can’t guarantee that it will work perfectly.
Regarding the usage: I think this is because most of the users do not know, that the integration is compatible with Telekom (Speedport) routers.
I do not know much about how the search function in HACS works, but maybe you can add some router manufactures/providers to the description.
This way, the users would know that this integration enables compatibility with lots of routers:
Optus
Proximus
Delta / Zeelandnet
KPN
Bell
BT
Telia
MásMóvil
Telekom
… and probably many more.
Edit: I just noticed that the repo cannot be found at all via the search.
Maby you could add it to HACS
This way, many more people would benefit from your great work!
Hi,
thanks for the new release, I got it to work with 0.2.6. as well. For the record: the HACS updater works like a charm in this case, no need to install/reinstall the integration, just hit the update button in HACS and restart.
The only thing I’m struggling with is presence detection events: When I go to the integration, select a device and create an automation, I only get “XXX leaves a zone” or “XXX enters a zone” as suggestions, while “XXX is home” or “XXX is not home” is only available as condition.
However, the automation does not trigger in my case when I turn on/off wifi on my phone. When I look at the states/events in HomeAssistant I can see the device switching from “home” to “not home” though, so I can just create an automation by looking at those events. I was just a bit confused that the suggestions in Visual Editor don’t seem to work.
@imick For me this integration definitely looks usable and I’m very happy it exists. I agree with @M4D1NG3R that it needs a bit more marketing, the only way I found out about it in the first place was his comment here in the thread suggesting that it also supports the Telekom Speedport Pro.
Makes sense, my initial goal was to add it to core and add discovery (ssdp / dhcp), however I don’t think the integration is ready for that yet. (and I don’t have time currently to polish this).
A good first step would be to include it in the default HACS repositories indeed, and see from there. My understanding would be that Sagemcom F@st was pretty self explanatory, but good to understand that e.g. the Telekom Speedport Pro doesn’t mention the original manufacturer.
Would this potentially work for the KPN Box 12 (newest dutch KPN router, so probably a pretty huge user base). Apparently that’s a Sagemcom F5359. Don’t have it yet, so can’t test it.
Not sure, I don’t have that one as well! However, I don’t spend a lot of time on the development currently since there are only 12 active users of this integration.
However, everything is set up on GitHub to accept contributions and to merge and release them quickly.
Cool! In that case it should work . If there is a big enough userbase, I would be willing to see if we can polish the integration a bit and perhaps even bring it to core, however for twelve users that is not worth it.
Found this page via a fellow Home Assistant user (Experia Box v10 Device Tracker (KPN, Telfort) - #41 by maxdis), and indeed there is a large user base for this I believe. I have an Experiabox 12 (KPN) at home and I have just added your integration. It already shows a lot of devices, so I’m planning to do some more testing tonight or tomorrow.