Anrolosia / Shopping-List-with-Grocy

A Shopping list integration with Grocy for Home Assistant
MIT License
41 stars 1 forks source link

Missing shopping_list_with_grocy services #10

Closed grzech1983 closed 1 year ago

grzech1983 commented 1 year ago

Hello,

I'm wondering if maybe someone had problem with missing shopping_list_with_grocy services in HA. In dev area -> services I only see services from official shopping list component and shopping_list_with_grocy script. I don't see 4 services mentioned in docs. I'm on HA 2023.2.5.

Thanks

Anrolosia commented 1 year ago

Hello! Hmmm, this is weird. I don't have any mention (yet?) about that kind of issue. Did you tried to unistall the HACS Shopping List with Grocy plugin, reboot/restart and install it again? Do you have any errors in the logs?

grzech1983 commented 1 year ago

Ok. I've removed addon, restarted HA, installed again and only services visible in dev tools is ones from grocy addon. Also I don't see anything related to installation process in logs. I'll wait some time and check if issue will occur on someone elses instance.

0x0aNL commented 1 year ago

This might be related to the new Large Attribute limitation: https://github.com/home-assistant/core/issues/89203

The new limitation blocks entities from having attributes larger than 16kb, so for example if the products in your Grocy instance have images, they won't be processed and the SLwG integration will fail to start and remain stuck on "Initializing". As a result, some services won't be created. @grzech1983 Do you see the integration stuck on "Initializing" in the Integrations overview as well?

(Incidentally, while SLwG continues to retry initialization, it can create some heavy load when you have 550+ products.. I've been trying to store the images in a frontend directory and only sending its filename, but I think the product list itself is also too large to be stored.)

grzech1983 commented 1 year ago

I've removed and readded addon once again and this time it worked. It's hard to tell what was the cause since I didn't saw any errors in logs. I'm also not having any products (only one) in Grocy since I was just testing it (onion without any image was my test subject) before let's call it production use.

Anrolosia commented 1 year ago

@grzech1983 I'm glad it's working now! It was weird but now at least you'll be able to use the plugin. I'll close the ticket and in the meantime I'll monitor the issue raised by @0x0aNL . I'll also try to find a way to use a paginated API, and if it's not already implemented in Grocy, I might create a feature request for that. Have a great one!

Anrolosia commented 1 year ago

@0x0aNL I published an update to fetch products by batches, could you confirm you're able to use the plugin now? I've also added an option to "remove" the images because it's the source of the issue you mentioned above.

grzech1983 commented 1 year ago

I've updated addon and it works also after update so thanks :-)