custom-components / grocy

Custom Grocy integration for Home Assistant
Apache License 2.0
162 stars 50 forks source link

Integration completely stopped working #184

Closed Dinth closed 2 years ago

Dinth commented 2 years ago

Unless all relevant information is provided, I can't help you

Describe the bug Hi. At some point in the past (it was a while, therefor im not sure if this was due to an update or something else) the integration completely stopped working. I dont think that any of the entities in HA is being populated.

General information to help debugging:

What sensors do you have enabled? Are they working and/or what state are they in? Do you have the corresponding functions enabled in Grocy?

Screenshot from 2022-02-06 20-13-37

What is your installed versions of Home Assistant, Grocy and this integration? Grocy integration - 4.1.0 Grocy - 3.1.3 Home Assistant 2022.2.2

How do you have Grocy installed? Add-on or external?

External docker container

Have you added debugging to the log, and what does the log say?

Logger: custom_components.grocy
Source: custom_components/grocy/__init__.py:104
Integration: Grocy ([documentation](https://github.com/custom-components/grocy), [issues](https://github.com/custom-components/grocy/issues))
First occurred: 8:06:15 PM (15 occurrences)
Last logged: 8:09:56 PM

Update of Expired_products failed with 82 validation errors for CurrentVolatilStockResponse due_products -> 0 -> product -> product_group_id value is not a valid integer (type=type_error.integer) due_products -> 1 -> product -> product_group_id value is not a valid integer (type=type_error.integer) due_products -> 2 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 0 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 1 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 2 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 3 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 4 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 5 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 6 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 7 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 8 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 9 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 10 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 11 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 12 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 13 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 14 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 15 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 16 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 17 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 18 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 19 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 20 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 21 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 22 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 23 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 24 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 25 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 26 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 27 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 28 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 29 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 30 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 31 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 32 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 33 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 34 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 35 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 36 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 37 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 38 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 39 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 40 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 41 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 42 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 43 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 44 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 45 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 46 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 47 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 48 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 49 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 50 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 51 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 52 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 53 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 54 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 55 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 56 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 57 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 58 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 59 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 60 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 61 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 62 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 63 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 64 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 65 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 66 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 67 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 68 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 69 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 70 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 71 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 72 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 73 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 74 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 75 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 76 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 77 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 78 -> product -> product_group_id value is not a valid integer (type=type_error.integer)
Update of Stock failed with 1 validation error for CurrentStockResponse product -> product_group_id value is not a valid integer (type=type_error.integer)

and some more https://gist.github.com/Dinth/a833a0a66acf056b16a470709371a23a

adrigrillo commented 2 years ago

I have just installed this integration, and I am receiving the same error:

Update of Expired_products failed with 2 validation errors for CurrentVolatilStockResponse overdue_products -> 9 -> product -> product_group_id value is not a valid integer (type=type_error.integer) overdue_products -> 10 -> product -> product_group_id value is not a valid integer (type=type_error.integer)

All the entities have been disabled since the beginning due to this error, so I cannot activate any.

What is your installed versions of Home Assistant, Grocy and this integration? Grocy integration - 4.1.0 Grocy - 3.1.3. I am using an external Grocy server, but the identification seems to work properly. Home Assistant 2022.2.5

kerozoli commented 2 years ago

Same issue here :

`Logger: custom_components.grocy Source: custom_components/grocy/init.py:104 Integration: Grocy (documentation, issues) First occurred: 8:12:47 AM (28 occurrences) Last logged: 8:20:28 AM

Update of Shopping_list failed with 1 validation error for ProductDetailsResponse product -> product_group_id value is not a valid integer (type=type_error.integer) Update of Stock failed with 1 validation error for CurrentStockResponse product -> product_group_id value is not a valid integer (type=type_error.integer)`

HomeAssistant : 2022.3.5 Grocy integration : 4.1.6 Grocy : 3.2.0

Additional info : Some sensors e.g. The Chores worked when I added it to the integration (tested with 2 Chores), and it's interesting that the issue affects Tasks(immediately fails when I add one task) but not Chores

Thank you for your help

Edit : the workaround for me is that I set a product_group_id/task_group_it for every product and task

ThrawnJL commented 2 years ago

I think I have the same issue. I just started trying out grocy as a way to managed our freezer inventory. I have added this integration in the hope that the sensors might be useful. But the sensors keeps saying “Unknown” I have disabled all sensors except stock because I have currently only activated stock in grocy.

I get this error in home asssistant log:

This error originated from a custom integration.

Logger: custom_components.grocy Source: custom_components/grocy/init.py:104 Integration: Grocy (documentation, issues) First occurred: 12:23:09 PM (39 occurrences) Last logged: 12:42:39 PM

Update of Stock failed with 1 validation error for CurrentStockResponse product -> product_group_id value is not a valid integer (type=type_error.integer)

How does one set a product ID for every product and task?

haeuslein commented 2 years ago

I am running into the same problem:

Update of Stock failed with 1 validation error for CurrentStockResponse product -> product_group_id value is not a valid integer (type=type_error.integer)

I run Grocy and HA in seperate Docker containers, connection is made via Grocy API key. The sensors show up in HA as "disabled". When I activate the stock sensor (the only one I am interested in) I stays in status "unknown", giving the above error.