LordMike / MBW.BlueRiiot2MQTT

Utility to map between Blue Riiots pool API, and Home Assistant MQTT
47 stars 2 forks source link

API connection error ? #92

Closed scifi1 closed 6 months ago

scifi1 commented 7 months ago

Hi!

I've been struggling for quite some time. It seems as I cannot reach blueriiot servers or not authenticate properly. I am using the same credentials as in my BlueConnect APP which works fine.

So I am kind of stuck. Can you give any hint on what this can be?

I'm running the latest container in a Debian 12 VM on a ProxMox host.

Below logs are from "docker logs -f

[23:47:52 ERR] An error occurred while performing the update System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at MBW.Client.BlueRiiotApi.BlueClient.LoginWithUsernamePassword(String email, String password, CancellationToken token) at MBW.Client.BlueRiiotApi.Builder.UsernamePasswordRequestSigner.LoginIfNeeded(BlueClient client, CancellationToken token) at MBW.Client.BlueRiiotApi.BlueClient.PerformHttp[TRequest,TResponse](String path, HttpMethod method, TRequest requestBody, CancellationToken token) at MBW.Client.BlueRiiotApi.BlueClient.GetSwimmingPools(Boolean deleted, CancellationToken token) at MBW.BlueRiiot2MQTT.Service.BlueRiiotMqttService.PerformUpdate(CancellationToken stoppingToken) in /src/MBW.BlueRiiot2MQTT/Service/BlueRiiotMqttService.cs:line 132 at MBW.BlueRiiot2MQTT.Service.BlueRiiotMqttService.ExecuteAsync(CancellationToken stoppingToken) in /src/MBW.BlueRiiot2MQTT/Service/BlueRiiotMqttService.cs:line 72

scifi1 commented 6 months ago

After some investigations I have these findings

So my conclusion is that HassOS and Vanilla Debian installations differs, but where? :-) SSL/HTTPS keys..

LordMike commented 6 months ago

Do you have any special characters in your password by any chance? Maybe the way you're running the addon is the problem.

I assume you don't have any network specialties like proxies/tls proxies/dns hijacks/dns adblocks/.. and so on.

scifi1 commented 6 months ago

The thing is that the Addon (using the HA OS virtual machine ) works fine.

It is the docker installation which is problematic. The example is an vanilla Debian installation with two containers (mqtt + BlueConnect ).

Same username and password is used in both HA OS Addon as well as in the standalone Docker configuration. I've tested with encapsulating the password with both ' ' or " " (single or double hyphens)

I wonder - when you verified the latest version, how was your environment set up ? Standalone Debian containers or Addon installed in HA OS ?

scifi1 commented 6 months ago

Hi again,

I have moved over to HASS OS and with that Blue Connect works fine. So from my point of view, this issue therefor be closed