Closed sanderlv closed 1 year ago
I'm experiencing exactly the same. The cant-connect issues are completely back since two weeks. NEFIT app directly is always working.
Maybe they are using a new server.. Someone needs to check the app again using Wireshark
One thing that is different between app and HA is that HA actively polls the endpoints to fetch all data. The app is more passive, if you change between tabs it'll update. Also it gets push updates when someone else changes something. Also we don't know how the app would handle disconnects. It could experience the same thing but not complain about it. Maybe that's the best approach for this integration as well, if a disconnect is experienced simply reconnect and don't log these as error but as debug info. The Shelly integration kind of does the same, when a device is offline it doesn't complain, once it's online again it simply reconnects.
My disconnect issues started when I updated to version 0.2.1. Before I was on 0.1.0 and saw a disconnect maybe once every few days, now there is a disconnect every 10-20 minutes.
Nothing has changed in the connection area, so I can't explain that. Some entities were added, but should be disabled by default. You could try to disable some unused entities to see if it improves?
I haven't upgraded yet, because I'm on holiday and I don't want the update to mess things up, when I'm not around. Better safe than sorry.
So I think it's safe to say these problems are not related to the new version in my case. The problems started more or less the same time as the new version was released. Coincidence?
I'm also experiencing the same connection error. Nefit app works fine, HA connect error.
I'm also experiencing the same connection error. Nefit app works fine, HA connect error.
If you can't connect at all, please make a separate issue. That seems different than what is described here.
Also, info like 'the app is working fine' does not add useful info. Please keep the app open for a longer time and check with network analysis tools like wireshark whether it doesn't also disconnect. The fact that no error or warning is presented doesn't mean anything.
I used to have the Bosch server added to uptime robot and 9 of 10 times the Bosch server just went down when I got a disconnect.
I would suspect the same thing. I think the app silently reconnects...
That's probably what we should do here as well, reconnect and add some debug logging, but don't log as error.
We are also keeping the connection alive way longer than the Nefit app does, so comparing behavior of app and integration is like comparing apples and pears.
I would be happy to have disconnects. mine is not connecting @ all.
Maybe some more clarification on the 3 credential like on the creation of the integration window. serial # is the serial # of my installation. access code ?? is it my account name? or the passcode for the CV. password. of which is this the password ? the password of my Bosch/nefit account?
also cannot figure out to which domain the connect is ? no where I see in the code any url like www.netfiteasy.com or else configured.
I would be happy to help, but could you open a new issue?
have found the correct settings for serial, passcode/key and password. it is working ok now, sorry for this.
thanks for the quick response.
I only get error show up when I use the Phone App, using it blocks anything else (and vice versa), the phone app takes a lot longer to connect waiting for a slot to get access to the servers first. Is there anyway to slow down the polling, I see no need for it to be as constant as it is. Other than energy usage, but that doesn't need to be constant either. Room tamp doesn't change much and boiler on/off maybe the only thing, even temp change done via an app or the console doesn't need a quick update as well you know it's changed.
Basically unless it cannot regularly reconnect then it's not a problem, only then flag it up a 'lost connection'.
Just my thoughts.
I agree, as mentioned above, disconnect is logged as critical error, but as long as reconnect works it shouldn't do that. I'm working on refactoring the init code, there are some more things that could be done more in line with how HA works nowadays.
There is an open issue to make an option flow, once I get to that we could make the update rate configurable. Now it's 60 seconds by the way, not crazy fast. The more entities you have enabled though, the more data is will fetch.
Note that the Nefit Easy can also be broken. That is how it started with mine. I could also see the disconnects in the router.
But that's something out of our control right? Is there something else that can be done other than simply reconnect?
Exactly that's the ony thing we can do
Indeed, my proposal was to do it more silent not to fill HA with errors logs. Could perhaps be added as debug log.
By the way, I think you got some mails from Github workflow right? Sorry for that :) I was trying something, which worked in the end after a few attempts.
I refactored the connect/disconnect code to handle disconnects more gracefully. Instead of generating a persistent notification, it will now just silently try to disconnect.
I published a pre-release, feel free to test it. If nothing breaks in my own setup the coming weeks, I'll promote it to release.
Recently (1-2 weeks?) I have a lot of disconnects:
but via my app all is fine?
What can be the issue?