Home Assistant Community Add-on: Grocy

Is barcode buddy going to be integrated with Hass.io addon?

1 Like

Do you need it? I use a barcode scanner connected via bluetooth to an android tab and track items in Grocy using that. It works perfectly

Interesting. Can you use an iPhone to do the scanning that connects to grocy? I assume there is an app that would work?

Not sure, I don’t use Apple products however there are barcode apps for both OS’s, it would just be a matter of seeing how they can interface with the Grocy HA page…

I found that the bluetooth barcode scanner was really handy as I can leave the android tablet sitting on the bench while I go through all the products with the scanner

Maybe I’m confused. How does grocy know about the barcode scanner? How does it interface with it? By being Bluetooth it automatically picks it up?

I open the Grocy page on the tablet, the barcode scanner is connected to the android tab. The tab uses the input from the scanner just like it would using the on-screen keyboard, or for that matter a bluetooth keyboard if I had one connected

This is what I wanted. I made a few small changes to fit my needs better, but this is great! Thank you!

If you’re interested, the changes I made were to the math of diffDays. I removed the absolute value and swapped the subtraction order along with returning “Today” if diffDays <= 0. Now I can show only chores that are due today (show_days: 1) or that are overdue (negative diffDays) which is exactly what I want.

1 Like

Nice work have to try it when I get home

Im in need for help, trying to get the custom component grocy to work but cant figure out the config for the grocy addon. :frowning: Im running it on hassio on a rpi. I have managed to get the api key but what is my URL for grocy?

https://YOUR_GROCY_URL/api/

My config is this:

 grocy:
   url: https://xxxx.duckdns.org/api
   api_key: pO2J6xxxxxxxxxxxxxxxxxxxxxxxxxxxx
   sensor:
     - enabled: true

This is the error message in the logs when restarting homeassistant.

2019-07-23 19:25:33 ERROR (MainThread) [custom_components.grocy] Could not update data - HTTPSConnectionPool(host=‘xxxxxx.duckdns.org’, port=443): Max retries exceeded with url: /stock (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x6c141e90>: Failed to establish a new connection: [Errno 111] Connection refused’))

Are you sure that’s the URL? Mine is smthn along the lines of https://xxx.duckdns.org/randomstring_grocy/api/ - mouseover the Grocy link in the sidebar to see what it is.

Im not sure to be honest. Feels like i tried everything.

With this I get this message

grocy:
  url: https://xxxxx.duckdns.org/a0d7b954_grocy/api/
  api_key: pO2J6K0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  sensor:
    - enabled: true

[custom_components.grocy] Could not update data - HTTPSConnectionPool(host=‘xxxxx.duckdns.org’, port=443): Max retries exceeded with url: /a0d7b954_grocy/api/stock (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x6be3afb0>: Failed to establish a new connection: [Errno 111] Conn ection refused’))

Do you have https on your URL in real life or did you copy it from the template?

Yes i have https running with duckdns addon.

I got it to work if I’m not using Ingress url. If you using hassio and define a special port for Grocy it works. But I think this should be fixed, Also, if grocy component fail to establish connection, the whole web interface seems to be stuck for HA. That not ok.

Sorry to hear the custom component is locking up your system. Please report it to the author of the custom Grocy integration. This is out of scope for this topic and not related or affiliated with the add-on at all.

Quick peek at the custom component: The author uses async/sync incorrectly and mixed in the custom component. So yeah…

That is the price to pay for going with custom component, the quality isn’t checked by Home Assistant devs, no code review took place.

You are 100 % right about that. Not easy for everyone to separate addons for components, especially when they integrates together.

Hi!
I’m configuring this for the first time and I have detected that if I change the “equipment” value to false the server doen’st go live:

My config:

{
  "culture": "es",
  "currency": "EUR",
  "features": {
    "batteries": false,
    "calendar": true,
    "chores": true,
    "equipment": false,
    "recipes": false,
    "shoppinglist": true,
    "stock": true,
    "tasks": true
  },
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Console log:

-----------------------------------------------------------
 Hass.io Add-on: Grocy
 ERP beyond your fridge! A groceries & household management solution for your home
-----------------------------------------------------------
 Add-on version: 0.3.1
 You are running the latest version of this add-on.
 System: Ubuntu 18.04.2 LTS  (amd64 / qemux86-64)
 Home Assistant version: 0.96.5
 Supervisor version: 170
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] grocy.sh: executing... 
[cont-init.d] grocy.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:35:30] INFO: Starting PHP-FPM...
[17:35:31] INFO: Starting NGinx....
[07/Aug/2019:17:35:38 +0200] 302 81.34.44.156, 172.30.32.1(172.30.32.2) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36)
[07/Aug/2019:17:35:39 +0200] 404 81.34.44.156, 172.30.32.1(172.30.32.2) GET /equipment HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.87 Safari/537.36)

Those who have grocy hassio addon set up, but struggle getting the component and sensor to work can try this:

In hassio’s grocy config page, scroll to the bottom and see network option. It is disabled by default. Give it a port, f.ex. 9192 and save/restart.

If needed, allow port through firewall and set up forwarding rule in router.

Grocy is now accessible on https://xxx.duckdns.org:9192 (ex, use IP if you prefer). Refer to https://xxx.duckdns.org:9192/api/ in components setup in configuration.yaml.