meichthys / uptime_kuma

Uptime Kuma HACS integration
110 stars 23 forks source link

Cannot Add My Uptime Kuma to HA #61

Closed djcrawleravp closed 1 year ago

djcrawleravp commented 1 year ago

I have tried:

http://uptimekuma.casa:3001 http://uptimekuma.casa (port 3001 below) http://127.0.0.1:3001 http://127.0.0.1 (port 3001 below) http://ip-addr:3001 http://ip-addr (port 3001 below)

Even tried without http://

I don't have ssl certificates

Both are running on the same server on different docker containers same ip different port and both containers can see each other

Nothing on logs and the UI reads almost immediately "Failed to Connect"

Screen Shot 2023-07-28 at 12 59 44
meichthys commented 1 year ago

What version of HA?

enzowang404 commented 1 year ago

什么版本的HA?

I have the same question.

Home Assistant 2023.7.3 Supervisor 2023.07.1 Operating System 10.3

leodbrs commented 1 year ago

Same with

Uptime Kuma : Version: 1.22.1

Home Assistant 2023.7.3 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest

meichthys commented 1 year ago

As far as j know, it only works with https so you will need an SSL certificate. Its easy using something like nginxproxymanager.

Also make sure you can access the '/metrics' endpoint using a regular browser.

denix0 commented 1 year ago

FWIW, I ended up disabling Auth in Uptime Kuma completely, as it's local and I'm not exposing it outside. This allowed the integration to connect fine.

Momentum6890 commented 1 year ago

For me it helped that I took a password without special characters for Uptime Kuma. Only numbers and letters.

I had the same problem when mounting my Synology and then it worked, so i had remembered and tried it at Uptime Kuma also times.

1mfaasj commented 1 year ago

Same with

Uptime Kuma : Version: 1.22.1

Home Assistant 2023.7.3 Supervisor 2023.07.1 Operating System 10.3 Frontend 20230705.1 - latest

The same setup and issue here

meichthys commented 1 year ago

For me it helped that I took a password without special characters for Uptime Kuma. Only numbers and letters.

This is interesting @jboesh can you try that?

1mfaasj commented 1 year ago

For me it helped that I took a password without special characters for Uptime Kuma. Only numbers and letters.

This is interesting @jboesh can you try that?

Just changed the password to something simple without success

meichthys commented 1 year ago

OK thanks for trying

dzedler commented 1 year ago

Here is my setup:

Home Assistant 2023.8.3 Supervisor 2023.08.1 Operating System 10.5 Frontend 20230802.1 - latest

Uptime Kuma HA AddOn version 0.8.0 Uptime Kuma Version: 1.22.1 Frontend Version: 1.22.1

Uptime Kuma HACS integration v2.1.1

I am new to uptime kuma, so I do not know what changed. I started with this version and had issues to get the integration to connect to tha HA App as well. The hint to validate access to /metrics was very helpful and also the log for the app.

This line caught my attention: [API-AUTH] WARN: Failed API auth attempt: invalid API Key

I tested against the .../metrics URL and was denied login with my regular credentials. I created an API key in Uptime Kuma and set it to never expire. I tested again with a BLANK username, just the API key as password and I was granted access.

After validating that the credentials work, I tried to configure the integration again. I used the app's internal docker hostname as URL: http://-uptime-kuma on port 3001

Left the username blank and used the API key as password. I also unchecked the certificate validation as the HA app is HTTP only

The integration is now able to connect and I get the following in the log:

[AUTH] INFO: Login by token. IP=a.b.c.d
[AUTH] INFO: Username from JWT: <Uptime Kuma username>
[AUTH] INFO: Successfully logged in user <Uptime Kuma username>. IP=a.b.c.d
1mfaasj commented 1 year ago

My hero. Its working now!

meichthys commented 1 year ago

@dzedler Thanks for this. I've added a note to the readme.