HA-Commander icon indicating copy to clipboard operation
HA-Commander copied to clipboard

Could not connect error

Open B4dC4rd opened this issue 2 years ago • 11 comments

I'm getting this error both if trying the https with fully qualified domain name or http with IP:port. Getting the error clears my settings.

B4dC4rd avatar May 24 '23 18:05 B4dC4rd

Keep in mind Flow Launcher only saves settings once the settings window is closed.

Please try entering your settings, closing the settings window and try to activate the plugin once more.

Garulf avatar May 24 '23 18:05 Garulf

Good to know. I tested both options, making sure to close the settings and reopen them to ensure proper persistance of my values. However, behavior is the same. Not sure how to troubleshoot further

B4dC4rd avatar May 24 '23 18:05 B4dC4rd

Please post your plugin.log located where HA-Commander is installed. This will help us find out what the issue is.

Be sure to replace any sensitive info such as your server URL or API key before posting.

Garulf avatar May 27 '23 13:05 Garulf

Hello,

I also have this issue. The plugin.log file is empty, and FlowLauncher's log has no mention of the issue.

image

The URL used in the settings works fine, the token was reissued and updated.

There is a log in HA about the attempted login:

image

This issue started happening after updating HA Core (currently using version 2023.5.2)

Ashden avatar Jun 02 '23 08:06 Ashden

Hello,

I also have this issue. The plugin.log file is empty, and FlowLauncher's log has no mention of the issue.

[image]

The URL used in the settings works fine, the token was reissued and updated.

There is a log in HA about the attempted login:

[image]

This issue started happening after updating HA Core (currently using version 2023.5.2) I can confirm it works for the latest version (see below).

I think your settings are not being saved correctly and the plugin is using old/incorrect settings.

Until I can issue a fix you can manual update these settings

  1. First Close Flow Launcher image (We dont want Flow Launcher to overwrite our new manual settings)

  2. Edit your settings file directly by going here: %AppData%\FlowLauncher\Settings\Plugins\HA-Commander

  3. Replace the values in your file with the correct settings: image

Working! image

Garulf avatar Jun 04 '23 15:06 Garulf

Right you are @Garulf, manually setting the data in the plugin Settings.json file works. Thank you!

Ashden avatar Jun 05 '23 16:06 Ashden

Even after changing the settings in the json file it doesn't work for me. The log just gives this (some personal info removed):

19:54:22 DEBUG (launcher.py): Request:
{
    "method": "query",
    "parameters": [
        ""
    ],
    "settings": {
        "url": "**************",
        "token": "*************",
        "verify_ssl": "true",
        "max_results": "50",
        "debug": true
    }
}
19:54:22 DEBUG (launcher.py): Params: ['']
19:54:22 DEBUG (main.py): Initializing Home Assistant Client
19:54:22 DEBUG (connectionpool.py): Starting new HTTPS connection (1): **************
19:54:22 DEBUG (launcher.py): ########## Total time: 52ms ##########

Patbott avatar Jul 30 '23 17:07 Patbott

After trying the manual edit tip, I progressed somewhat, but the plugin still is not fonctionning correctly it seems.

I do not have a connection error, but I retreive nothing :

2023-09-29_14h18_47

2023-09-29_14h21_20

B4dC4rd avatar Sep 29 '23 12:09 B4dC4rd

After trying the manual edit tip, I progressed somewhat, but the plugin still is not fonctionning correctly it seems.

I do not have a connection error, but I retreive nothing :

2023-09-29_14h18_47

2023-09-29_14h21_20 I confirm. Maybe the problem is the updated built-in Python?

asd2003ru avatar Sep 30 '23 15:09 asd2003ru

Hi @Garulf , any idea what could be causing the issue?

B4dC4rd avatar Oct 02 '23 18:10 B4dC4rd

I have the same 'Could not connect' error.

  1. the settings are saved once I fill in the details in the Flow plugins settings
  2. Close and reopen the settings window -> confirms the settings are as defined
  3. Try to invoke 'ha ' in the flow launcher text box. -> returns an error that ha could not connect. AND overrides the settings to defaults

earlier I had to manually edit the settings in the json file, and it worked for a couple of days. not sure how that got over written again.

EDIT: manually editing the file again seems to retain the values and ha is working. the only concern is it may get overwritten again

nabeelmoeen avatar Jun 04 '24 04:06 nabeelmoeen