Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempted every possible combination I can think of, integration will not configure #286

Open
arretx opened this issue Aug 26, 2023 · 8 comments

Comments

@arretx
Copy link

arretx commented Aug 26, 2023

I've installed the add-on, it works.

I've installed the HACS custom component, but I don't know at this point...

I'm stuck at adding/configuring the integration. There's no combination of URL, API, and Port that works. I have a valid API that I created, and I'm able to open the Grocy interface using multiple methods, including ingress.

My HA is running on 192.168.1.101:8123 and SSL is handled by Apache on 192.168.1.200. It is a reverse proxy. The instructions indicate that I need to use port 9192. How does that work?

If I point to http://192.168.1.101:9192 (which is my HA virtual machine) I get 400 bad request. However, if I go to http://192.168.1.101:8123/a0d7b954_grocy/ingress I get the grocy interface.

According to the instruction, we're supposed to enter "our" instance of the Grocy URL. I have no idea what that is supposed to be as I'm able to pull up multiple URLS that all access the same instance of Grocy.

Not sure what to do at this point.

@arretx
Copy link
Author

arretx commented Aug 26, 2023

I also removed the add-on from Home Assistant and installed Grocy in a docker container on my server, which also works and is at 192.168.1.140:9192, but then when I try to configure the integration in HA, I get nowhere.

The prompt is a bit misleading as it asks for the API-URL, which in my case is http://192.168.1.140:9192/api, but also says not to use the port number in the URL.

When I submit the configuration, an entry is added to the log file on the Grocy docker container so I know that HA is reaching the instance of Grocy, but I either get "something went wrong" or if I use http with "veriy ssl" checked, I get a spinning wheel of death.

Stuck. Any help appreciated.

@arretx
Copy link
Author

arretx commented Aug 31, 2023

I'm attempting this again, and this is the error that I see when I try to install the integration:

2023-08-31 15:42:46.906 ERROR (MainThread) [custom_components.grocy.config_flow] No connection adapters were found for ':/:9192/192.168.1.140/api/system/info'

That address definitely doesn't look right.

@karwosts
Copy link
Contributor

karwosts commented Aug 31, 2023

If it helps, when I configure grocy (which I have standalone install, not the addon in HACS), I just use the following. I don't include "/api" in the url.

url: http://192.168.1.12
port: 80
ssl: no

@arretx
Copy link
Author

arretx commented Sep 1, 2023

There's confusion here. There's a Grocy Add-on and there's a HACS custom component. I ditched the add-on and run Grocy in a Docker container on my other server. The HACS component is the part that I need, i.e., this repo. The suggested URL and port combination above do not work. Mine is:

http://192.168.1.140 and the port that it's listening on is 9192, not 80. It's on port 80 in the container, but not the host. Same issue. "Something went wrong."

Every time I try, the Grocy log adds the following line to the access log:

192.168.1.101 - - [31/Aug/2023:19:07:22 -0700] "GET /api/system/info HTTP/1.1" 499 0 "-" "python-requests/2.31.0"

@karwosts
Copy link
Contributor

karwosts commented Sep 1, 2023

Ah you're right I mispoke. I meant I was using a standalone Grocy install on a separate server, not using the grocy addon.

@arretx
Copy link
Author

arretx commented Sep 1, 2023

Is your install listening on port 80? Mine is on 9192. I'm getting a 104 connection reset by peer in my HA logs.

2023-08-31 19:30:09.927 ERROR (MainThread) [custom_components.grocy.config_flow] ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

@karwosts
Copy link
Contributor

karwosts commented Sep 1, 2023

Yes I believe it's on port 80, regular http. Did you check the nginx error log?

Looks like you're maybe getting response 499 which I guess is client closed connection, though I couldn't speculate why. My logs just look like this:

192.168.1.31 - - [31/Aug/2023:20:57:12 -0700] "GET /api/chores/21 HTTP/1.1" 200 1043 "-" "python-requests/2.31.0"
192.168.1.31 - - [31/Aug/2023:20:57:12 -0700] "GET /api/chores/22 HTTP/1.1" 200 1043 "-" "python-requests/2.31.0"
192.168.1.31 - - [31/Aug/2023:20:57:12 -0700] "GET /api/chores/23 HTTP/1.1" 200 874 "-" "python-requests/2.31.0"
192.168.1.31 - - [31/Aug/2023:20:57:12 -0700] "GET /api/chores/24 HTTP/1.1" 200 874 "-" "python-requests/2.31.0"
192.168.1.31 - - [31/Aug/2023:20:57:12 -0700] "GET /api/tasks HTTP/1.1" 200 1955 "-" "python-requests/2.31.0"

Sorry couldn't be more helpful.

@mazetar
Copy link

mazetar commented Oct 6, 2024

Hi,
After much trail and error I was able to connect the integration by using the address which is equal to your
"http://192.168.1.140"
And setting the API Key.
And then blanking out the port number, so leave that blank.
Then the integration connected correctly.

I can see that the integration is able to extract the stock I have.
If I enable mealplan the integration crashes with an error.
But other stuff seems to work.
Update the Mealplan bug is reported in issue #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants