core icon indicating copy to clipboard operation
core copied to clipboard

Error in wolflink integration

Open krisproger opened this issue 1 year ago • 23 comments

The problem

integration cant start

What version of Home Assistant Core has the issue?

core-2024.1.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

integration: wolflink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wolflink

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 22 января 2024 г. в 11:10:45 (4 occurrences)
Last logged: 08:27:21

Error setting up entry mwhome_wlf for wolflink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 46, in async_setup_entry
    parameters = await fetch_parameters_init(wolf_client, gateway_id, device_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 135, in fetch_parameters_init
    return await fetch_parameters(client, gateway_id, device_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 128, in fetch_parameters
    fetched_parameters = await client.fetch_parameters(gateway_id, device_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/wolf_smartset/wolf_client.py", line 97, in fetch_parameters
    tab_views = desc[MENU_ITEMS][0][TAB_VIEWS]
                ~~~~^^^^^^^^^^^^
KeyError: 'MenuItems'

Additional information

No response

krisproger avatar Jan 27 '24 01:01 krisproger

Hey there @adamkrol93, mind taking a look at this issue as it has been labeled with an integration (wolflink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of wolflink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign wolflink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


wolflink documentation wolflink source (message by IssueLinks)

home-assistant[bot] avatar Jan 27 '24 01:01 home-assistant[bot]

Hi, since today, I can not connect to wolf cloud :-( Bildschirmfoto 2024-02-04 um 06 07 40

Thanks for Help!

d3z1b3l avatar Feb 04 '24 05:02 d3z1b3l

Same here - it does not work anymore :(

eupesco avatar Feb 04 '24 08:02 eupesco

Exactly the same here since last night.

franky1808 avatar Feb 04 '24 08:02 franky1808

Same here, since 2:00am

macirony avatar Feb 04 '24 09:02 macirony

The token authenication stopped working. The website and app work again but this token implementation not as it was never ported over to the new method the website and mobile app use which is openid. In ioBroker adapter this implemented. Can anyone implement it so this integrations authentication is fixed again?

This is the error in the log:

Logger: homeassistant.config_entries Source: config_entries.py:406 First occurred: 11:17:05 AM (3 occurrences) Last logged: 11:43:00 AM

Error setting up entry Heating for wolflink Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/wolflink/init.py", line 46, in async_setup_entry parameters = await fetch_parameters_init(wolf_client, gateway_id, device_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/wolflink/init.py", line 135, in fetch_parameters_init return await fetch_parameters(client, gateway_id, device_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/wolflink/init.py", line 128, in fetch_parameters fetched_parameters = await client.fetch_parameters(gateway_id, device_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/wolf_smartset/wolf_client.py", line 95, in fetch_parameters desc = await self.__request('get', 'api/portal/GetGuiDescriptionForGateway', params=payload) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/wolf_smartset/wolf_client.py", line 35, in __request await self.__authorize() File "/usr/local/lib/python3.11/site-packages/wolf_smartset/wolf_client.py", line 66, in __authorize await self.__authorize_and_session() File "/usr/local/lib/python3.11/site-packages/wolf_smartset/wolf_client.py", line 70, in __authorize_and_session self.tokens = await self.token_auth.token(session) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/wolf_smartset/token_auth.py", line 39, in token raise InvalidAuth wolf_smartset.token_auth.InvalidAuth

The endpoint used on HA Lib retruns this:

// 20240204120612 // https://www.wolf-smartset.com/portal/api/portal/CreateSession2

{ "Message": "Der Portal-Server reagiert nicht. Bitte versuchen Sie es später nochmal.", "ErrorCode": 10, "ErrorType": 1, "Errors": null, "MessageParams": null }

mtielen avatar Feb 04 '24 10:02 mtielen

The same problem "wolf_smartset.token_auth.InvalidAuth" from 02:18

amadesu avatar Feb 04 '24 12:02 amadesu

Looks like the problem from OP is actually an unrelated older problem.

Everything from d3z1b3l's comment onwards seems to be the problem identified by mtielen.

Which points to adamkrol93/wolf-smartset.

EDIT: Surely, there IS someone knowing Python, using Wolf appliances AND Homeassistant? Sadly, that's not me; I already struggled to build the wolf-smartset package within a venv...

m6w6 avatar Feb 04 '24 14:02 m6w6

Same Problem here

tatadile avatar Feb 04 '24 14:02 tatadile

Reload and working again.

amadesu avatar Feb 04 '24 17:02 amadesu

Reload and working again.

Holy shit you are right....

Wank-ster avatar Feb 04 '24 17:02 Wank-ster

Works again!

eupesco avatar Feb 04 '24 17:02 eupesco

Yes! Working! ;-) Thanks!!!!

d3z1b3l avatar Feb 04 '24 17:02 d3z1b3l

Reload and working again.

Tried this 1.500 times this morning. Now it works. :)

franky1808 avatar Feb 04 '24 18:02 franky1808

Hallo

Nach HA Update geht es nun wieder nicht.

wartungsmonteur avatar Feb 05 '24 19:02 wartungsmonteur

Hallo

Nach HA Update geht es nun wieder nicht.

Ich hab das Update noch nicht gemacht, geht trotzdem nicht... Ich steige um auf ISM7mqtt :-)

d3z1b3l avatar Feb 05 '24 20:02 d3z1b3l

Ism7mqtt bekomme ich leider nicht zum laufen

Nach dem Super Visor Update ging es wieder, nach dem Core Update leider nicht mehr

wartungsmonteur avatar Feb 05 '24 20:02 wartungsmonteur

Gleiches hier. Wolf hat aber auch immer wieder Probleme mit den Servern. Was ein Mist.

franky1808 avatar Feb 05 '24 20:02 franky1808

The mobile app works and also IOBroker. So it’s really the old authentication vs the new Openid one

mtielen avatar Feb 05 '24 20:02 mtielen

Gleiches hier. Wolf hat aber auch immer wieder Probleme mit den Servern. Was ein Mist.

Im Wolf Portal sind meine beiden Anlagen online, im HA leider nicht mehr. Da Problem liegt am HA, jedes Core Update was gefühlt fast 30 Minuten läuft, killt mittlerweile immer mehr Addons. Ich hoffe nur das nicht irgendwann ein Update das ganze System lahm legt.

Problem gelöst. Das Wolf Addon bzw.die jeweilige Anlage auf deaktivieren setzen und dann wieder aktivieren. Geht wieder alles.

wartungsmonteur avatar Feb 05 '24 20:02 wartungsmonteur

I restarted the integration multiple times, and the entire server, didn't help. Now after supervisor update today I restarted it again, boom. Working again.

Is it just my incompetence or can you only view status of the system in the integration?

defilor avatar Feb 05 '24 21:02 defilor

I did not perform any update and it is not working either. So this is not about HA but Wolf. By the way: This is what I (as an architect) would also do: Make people aware that the API is going to become deprecated soon by making it unstable.

Meanwhile, I had a look into the authentication of ioBroker and also the Wolf website/portal. There is roughly a plan how this might work. However, I need first learn how to build and run a development container... and Python ^^ And then it is uncertain whether the changes will be integrated by someone from the dev team...

Anyone else working on this right now?

janrothkegel avatar Feb 06 '24 06:02 janrothkegel

@adamkrol93 I made my way through the Open ID jungle today. Shall I provide it to you so that you can integrate the new authentication method?

janrothkegel avatar Feb 06 '24 17:02 janrothkegel

Meanwhile I implemented the OpenID authentication and sent a pull request for https://github.com/adamkrol93/wolf-smartset. Could @adamkrol93 please merge and update the dependency in an upcoming HA release?

janrothkegel avatar Feb 08 '24 12:02 janrothkegel

I wasn’t able to apply changes to the programs or temperature within the app or the Smartset portal. Have tried rebooting the whole system and ever since the ism7 can’t connect and I am not able to operate the system remotely. And I constantly get email notifications that my connection is unstable. Does anyone of you experience similar things?

(already checked network connection and it works fine)

IMG_1350

Wank-ster avatar Feb 09 '24 05:02 Wank-ster

Ism7mqtt bekomme ich leider nicht zum laufen

Nach dem Super Visor Update ging es wieder, nach dem Core Update leider nicht mehr

ISM7mqtt now working for me! Very Nice! You can control every Parameter! All you can read at the end of this Thread:

https://community.smarthome-for-dummies.de/viewtopic.php?p=8751#p8751

d3z1b3l avatar Feb 09 '24 09:02 d3z1b3l

https://community.smarthome-for-dummies.de/viewtopic.php?p=8751#p8751

IF ANYONE WONDERS:

Obviously you can't have ism7mqtt and the smartset portal running in parallel. ISM7 tells you that it is connectet directly and doesn't connect to the Smartset portal.

Wank-ster avatar Feb 09 '24 10:02 Wank-ster

@mtielen: I saw that you forked wolf_comm. Are you currently also working on an HA fix?

janrothkegel avatar Feb 10 '24 19:02 janrothkegel

@janrothkegel Thank you for writing the code. And Yes I forked it as I'm using/testing it t in my own HA system. I'm not expecting the code owner to react. I saw you are put it up on PyPI under a new name. Can't wait to see it appear in one of the next releases of HA! Again thank you very much!

mtielen avatar Feb 11 '24 00:02 mtielen

@janrothkegel and @mtielen Can you give some feedback if the new code works as expected? I dearly need this integration to work again as all my automations for temperature depend on it.

Wank-ster avatar Feb 11 '24 06:02 Wank-ster