After the wolflink runs for about 2 days without any issues, today all sensors appear as "unavailable".
When i've checked the logs, following error appears in log:
Unexpected error fetching wolflink data: 'Values'
Hardware: Raspberry Pi 3B
Software: Home Assistant 0.114.1
Logger: homeassistant.components.wolflink
Source: components/wolflink/__init__.py:53
Integration: Wolf SmartSet Service (documentation, issues)
First occurred: 7:35:51 AM (213 occurrences)
Last logged: 11:08:01 AM
Unexpected error fetching wolflink data: 'Values'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 131, in _async_update_data
return await self.update_method()
File "/usr/src/homeassistant/homeassistant/components/wolflink/__init__.py", line 53, in async_update_data
values = await wolf_client.fetch_value(gateway_id, device_id, parameters)
File "/usr/local/lib/python3.8/site-packages/wolf_smartset/wolf_client.py", line 98, in fetch_value
filter(None, map(lambda v: Value(v[VALUE_ID], v[VALUE], v[STATE]) if VALUE in v else None, res[VALUES])))
KeyError: 'Values'
After deleting this integration and add it back again, it works again for another 1-2 days.
I've exactly the same problem with same Error log! Thanks galex80 for reporting. HA 0.114.1 OS4.12 on rpi3B
I am working on solution of this. I also have such issues but It is very hard to track it.
But anyway it is good to know that someone else is using my integration :)
In the past I had maybe similar problems with other software/addon (I dont know exactly if it was FHEM or something else with a WOLF plugin). The problem was that the plugin contacts and collects the data from the cloud too often (~every 60s) and the WOLF cloud canceled AND BLOCKED! the connection.
@ottelo9 This would make sense, because i can replicate this every 2-3 days. The only way to solve it temporary is, remove the integration and add it again and login. Then it works again for another 2-3 days when the issue occures again.
It may be the issue. I am facing the same issue in my 'production' hassio but I thought that I am only user of this plugin so it is not so high in my private todo backlog, but as I can see know I have to speed up development :)
Anyway now plugin fetches data every 60 seconds as @ottelo9 said.
I have added some debug information in my wolf library. I will run it for few days in my test hassio to check errors and then fix them.
But if the problem is related with too often fetching then I think I will increase it to 2 minutes I think that it will be fine. Or maybe try to do some reconnection in the background.
I asked the manufacturer (Wolf Support) when my access was blocked. They wrote me that I used a self written script that used the wolf cloud interface not correct (e.g. too many logings without closing previous sessions). They blocked my Wolf cloud account manually! So I aksed how to use it correctly but they answered that they not release any scripts or help to use their interface. This was 2018.
I discussed the problem with the plugin creator for Symcon here. I checked my old postings and notice that some user were blocked even with 300s fetch interval. Maybe the script was too old or bad written I dont know.
I analyzed the whole web portal communication again and things I found are:
CreateSession
with fancy name CreateSession2
Anyway I also tried to read the communication between ISM and WebPortal but it is quite hard their using some binary protocol created by Lucon systems and I guess it will take a lot of time to break it (if it is possible).
any news/update?
I am still testing. As you know the issue occurs after few days so I need to have time to test it :) Also I had a problem with electricity at home so my wolf smartset device was turned off for a couple of days.
So after 16 days of testing (^^) do you have an update for us?
Still nothing. After changing few things (LastAccess usage, new token2 endpoint) I still get that error. I think that I will try recreating session, maybe this will help.
Edit:
But I noticed that somehow it can recover itself. I think that for the next 0.116 version I will create fix with what I have and maybe someone will be able to test it together with me :)
Another edit:
I forgot to tell you that someone mailed me with some questions about this integration and he told me that he doesn't have such issue.
@adamkrol93 I found this one here, which was designed for openhub, maybe this would be helpful for us to get this fixed?
https://github.com/BoBiene/Wolf-Smartset-to-openhab
@galex80 thank you for that. I cannot see any difference in my approach except one. In that plugin they are sending more headers in request. It is a bit hacky since he/she is passing parameter 'origin' with portal address. I wanted to avoid such things but after all this is solution I was thinking about if everything else fails.
Another update: After few changes in library I managed to have integration working for over 3 days. But I faced a problem that when device is offline (I just cut the power for the heating device) then integration is not able to recover. I will try to fix it now. But it is also cool that in 0.115.0 version is new option to restart integration without removing it and adding again and it works.
@adamkrol93 Thank you for your status update on this. Looking forward to get this this version.
And thank you again for your work. I really appreciate.
Ok guys. So I created PR for the error we are talking in this issue. But I didn't manage to fix the wolf gateway restart issue because I do not have time for that now. Anyway I have it in my mind. And I hope I will fix it soon.
Anyway I am running this integration for about week without issue.
Ok guys. So I created PR for the error we are talking in this issue. But I didn't manage to fix the wolf gateway restart issue because I do not have time for that now. Anyway I have it in my mind. And I hope I will fix it soon.
Anyway I am running this integration for about week without issue.
Thanks a lot for your good work!!
How can I see if this fix 40668 is inside the actual HA version?
@ottelo9 If i remember correctly, it was part of release 0.116.1. Since there, for me it works without any issues
Ok thanks. But how can I check it in github? On the #40668 page there is only one note that its merged into home-assistant:dev.
Most helpful comment
Ok guys. So I created PR for the error we are talking in this issue. But I didn't manage to fix the wolf gateway restart issue because I do not have time for that now. Anyway I have it in my mind. And I hope I will fix it soon.
Anyway I am running this integration for about week without issue.