Home assistant companion app keeps giving Websocket error

Hi, I recently started with home assistant and can’t wait to get some more advanced automations going. Unfortunantly I keep running into issues that consume a lot of time and make me wonder if I should invest time in the automations if I keep getting these.

Currently most annoying; the app gives errors. Yesterday I got this while setting up an external URL
Fout: De bewerking kan niet worden voltooid. (HAKit.HAConnectionImpl.ConnectError fout 0.)

I finally had to restart by clicking “herstel” (recover ?) in “Foutopsporing” (Error tracing?). It worked but I had to give my phone an other name and adjust all automations etc.

Today everything worked fine until a while ago, I noticed that my phone sensor status (charging) didn’t update and discoverd the app was offline again with; "Websocket
Fout: De bewerking kan niet worden voltooid. (HAKit.HAConnectionImpl.ConnectError fout 0.) "

From the log:
‘’’
2021-11-18 14:53:26.569 [Info] [com.apple.NSXPCConnection.user.endpoint] [PushProvider.swift:32] start(completionHandler:) > starting
2021-11-18 14:53:26.573 [Info] [com.apple.NSXPCConnection.user.endpoint] [LocalPushManager.swift:99] invalidate() > cancelling
2021-11-18 14:53:26.574 [Info] [com.apple.NSXPCConnection.user.endpoint] [LocalPushManager.swift:118] cancel() > cancelling subscription
2021-11-18 14:53:26.591 [Verbose] [main] [ConnectionInfo.swift:109] activeURLType > Updated URL from Externe URL (***.duckdns.org:8123) to Interne URL ..*.:8123
2021-11-18 14:53:26.608 [Error] [main] [Environment.swift:106] AppEnvironment > couldn’t create connection info: emptyHostname
2021-11-18 14:53:26.608 [Info] [main] [Environment.swift:53] init() > WebSocket: disconnecting; permanently: false, error: Optional(HAKit.HAConnectionImpl.ConnectError.noConnectionInfo)
2021-11-18 14:53:26.617 [Error] [main] [Environment.swift:106] AppEnvironment > couldn’t create connection info: emptyHostname
‘’’

How do I get a stable connection and how can I recover without having to change my phone name in home assistant!?

“empty hostname” means the URL you’ve entered is invalid in some way. Can you share what server URL you’re attempting to connect to?

You can delete the integration in Home Assistant’s Configuration to recover the device name on a new install.

The url worked fine before. Also I can acces it from my laptop without any problem or error.
For security reasons I replaced the digits/url with * but trust me it was a perfect functioning url, external url was is a duckdns url, internal the ip-adres of my home-assistant server followed by port :8123

Up-date: a few times this morning I noticed the connection was lost again. I changed the external url to http://url and it worked, after some time (doing other stuff) I lost connection again and in my app the external url is just the url whitout the http:// in front of it, if I put it in front of the url again I have connection.

Who can tell me who or what deletes the http:// part???