georgegebbett / recipe-buddy

Recipe Buddy is a tool that enables the easy adding of recipes to Grocy through web scraping.
GNU General Public License v3.0
163 stars 28 forks source link

Unable to connect to Grocy #492

Open Bush-cat opened 3 months ago

Bush-cat commented 3 months ago

I wanted to try out the Application, wanted to add a Recipe but I couldn't choose any Products, in the Settings I saw the message "Not connected to Grocy, Unable to connect to Grocy - check your URL and API key" In Grocy at the API Keys, it says Last used is Never for my recipe-buddy api key I can ping my Server from the container and added other Applications like Grocy Android with a differrent API Key before. I tried a new API key and tried my nginx proxy manager domain and ip+port.

Here is my docker compose which I run in Portainer

services:
    recipe-buddy:
        ports:
            - 3005:3000
        volumes:
            - /volume1/smarthome/configs/recipe-buddy/config:/home/node/app/data
        environment:
            - GROCY_API_KEY=REDACTED
            # - GROCY_BASE_URL="https://grocy.REDACTED"
            - GROCY_BASE_URL="http://192.168.111.100:9192"
            - NEXTAUTH_SECRET=REDACTED
            - NEXTAUTH_URL=https://recipe.REDACTED
        image: ghcr.io/georgegebbett/recipe-buddy
georgegebbett commented 3 months ago

That's odd - are you saying that you are able to ping the Grocy server from within the Recipe Buddy container? If so I can't think of a reason you wouldn't be able to connect from one to the other... What version of Grocy are you running?

Bush-cat commented 3 months ago

Correct, with the sh shell in the recive buddy container, I can ping the grocy IP and port.

I installed grocy as a homeassistant addon a week ago, apparrently it's running Version 4.0.3, there seems to be a newer Version available 4.2.0. I will try setting grocy up again outside homeassistant

Bush-cat commented 3 months ago

I tried again, completely new containers, latest recipe-buddy and latest grocy 4.2.0, I tried many methods to connect the containers, network mode, host mode, all that stuff but still no success.

It would be great to have more details on on where it fails in the logs

lionelripoll commented 3 months ago

I think I have the same issue. I can't connect to the server:

image

Grocy is running in home assistant. I can ping home assistant in the contener ping homeassistant.local or ping homeassistant.local:8123

this is the command I used: docker run \ -p 3005:3000 \ -v rb_data:/home/node/app/data \ --env GROCY_API_KEY=AgplxUgwoqxnLPqDUXdotDOLcvCNg7nQZ1Zv5kEp6x1CAL0u** \ --env GROCY_BASE_URL=http://homeassistant.local:8123 \ --env NEXTAUTH_SECRET=7LO8hR4dl3+V8L7UawOkfv19qMA6MEzl5O9XIHAHN3** \ --env NEXTAUTH_URL=http://localhost:3005 \ ghcr.io/georgegebbett/recipe-buddy

I also tried to add the subdirectory: docker run \ -p 3005:3000 \ -v rb_data:/home/node/app/data \ --env GROCY_API_KEY=AgplxUgwoqxnLPqDUXdotDOLcvCNg7nQZ1Zv5kEp6x1CAL0u** \ --env GROCY_BASE_URL=http://homeassistant.local:8123/a0d7b954_grocy/ \ --env NEXTAUTH_SECRET=7LO8hR4dl3+V8L7UawOkfv19qMA6MEzl5O9XIHAHN3** \ --env NEXTAUTH_URL=http://localhost:3005 \ ghcr.io/georgegebbett/recipe-buddy

Bush-cat commented 3 months ago

@lionelripoll port 8123 only runs the homeassistant webui, it has nothing to do with grocy, there was an option to open a port or network for the grocy addon configuration, use that and then you can use the grocy api with the port you set there.

Bush-cat commented 3 months ago

I was hoping to be able to use grocy with this project but making items manually in grocy is too annoying for me so I will have to uninstall grocy, I'm willing to try it again sometime if the Software works

valerian-guichard commented 3 weeks ago

Hi ! i have the same problem : here is my docker compose file :

image

I get the same "Not connected to grocy" message and can't find out why nor how to solve it, (of course i've put my api key in the code, i juste changed it for the screenshot)

I would really appreciate help :))