vinteo / hass-opensprinkler

OpenSprinkler Integration for Home Assistant
MIT License
211 stars 40 forks source link

Error installing integration/Failed to setup #318

Open Mattat01 opened 2 days ago

Mattat01 commented 2 days ago

Sorry, I'm sure I've done something dumb. This used to work on my Home Assistant, I have had it running for years, but at some point some update must have killed it and I can't get it going again.

I have 2 HA's, one that has been running for years and a new one I'm switching over to (because I updated to Pi5 and wanted to leave the bloat of my oly system behind). Both are still on and updated to: Core - 2024.10.4 Supervisor - 2024.10.3 Operating System - 13.2 Frontend - 20241002.4

The old system still has the integration installed in hass (and the login/setup that used to work). The new one I deleted everything (removed from hass, integrations, deleted folder, etc) and tried reinstalling from hass. Both have the same errors:

2024-10-31 09:41:17.797 INFO (MainThread) [backoff] Backing off _request_http(...) for 0.5s (pyopensprinkler.OpenSprinklerConnectionError: Cannot connect to controller)
2024-10-31 09:41:21.413 INFO (MainThread) [backoff] Backing off _request_http(...) for 1.7s (pyopensprinkler.OpenSprinklerConnectionError: Cannot connect to controller)
2024-10-31 09:41:26.213 ERROR (MainThread) [backoff] Giving up _request_http(...) after 3 tries (pyopensprinkler.OpenSprinklerConnectionError: Cannot connect to controller)

My Hardware is: Firmware: 2.1.8(2) Hardware: OSPi

I don't have ssl turned on and I uncheck that box in the setup (although I've tried it on and off) I have also followed the instructions to update the firmware, in case that was a problem. It pulled in ned code and updated via SSH but don't see any update to the firmware number in the app, so that's odd.

I can access the Pi via the open sprinkler app or web with the URL and password (and can ssh into it), but I can't work out why I cannot connect.

Any help would be appreciated.

Mattat01 commented 2 days ago

I've managed to update my firmware to 2.2.1 (needed to remake a fresh copy as my old Raspian was very old)., and I've removed and reinstalled hass-opensprinkler completely (version 1.4.0) and am still getting the same errors.

EdLeckert commented 1 day ago

Anything in the logs? Settings\System\Logs and Search Logs "OpenSprinkler". Also LOAD FULL LOGS.

You could even put this in your configuration.yaml:

logger:
  default: warn
  logs:
    custom_components.opensprinkler: debug
    pyopensprinkler: debug

Then restart HA.

Mattat01 commented 1 day ago

Thanks for getting back to me. Unfortunately there is nothing other than those 2 info lines and one error about backing off the connection request, which is why it is so confusing. I had the opensprinkler logging setup, but hadn't thought to add pyopensprinkler, but nothing new came up with that either.

Thanks for the thoughts though. I may take a look at the network traffic to see if I can see what is going on with the API request to log in, as I'm certain it is available at the URL I'm trying.

Mattat01 commented 1 day ago

If it gives anyone any ideas, when I try to log in the Developer Console payload and response is below, but it is nothing that seems unusual or helpful.

Payload

name: "OpenSprinkler"
password: "redacted"
url: "http://10.0.0.102:8080/"
verify_ssl: false

Response

data_schema: [{type: "string", name: "url", required: true}, {type: "string", name: "password", required: true},…]
description_placeholders: null
errors: {base: "cannot_connect"}
  base: "cannot_connect"
flow_id: "01JBJ7XVY2DJ5NS257W3ECTFV8"
handler: "opensprinkler"
last_step: null
preview: null
step_id: "user"
type: "form"

I've also tried logging out of opensprinkler in case it was having trouble with multiple sessions/connections, although that wasn't a problem in the past, but no effect.

Thanks.