Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

404 errors and unresponsive sensors after configuring integration in HA #154

Closed
riddledaxis opened this issue Feb 25, 2021 · 5 comments
Closed

Comments

@riddledaxis
Copy link

riddledaxis commented Feb 25, 2021

I have set up Grocy as an HA-Addon and wanted to use the lovelace-grocy-chores-card which needs the grocy_chores sensor.

I installed this integration through HACS, and I was finally able to configure the integration by using my internal HA url https://10.0.2.3:9192/grocy/public/api/ even though I use a duckdns domain through the HA NGINX proxy manager.

The issue I am getting is that the new Grocy sensors are all showing as unknown. If I check the API key it shows that the integration is connecting ok.

image

I checked the logs and this is what it shows:

2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.config_flow] Step user
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.config_flow] Testing credentials
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.config_flow] Testing of credentials returned: 
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.config_flow] True
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.setup] Setting up grocy
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.setup] Setup of domain grocy took 0.0 seconds
2021-02-25 20:34:08 INFO (MainThread) [custom_components.grocy] 
-------------------------------------------------------------------
Grocy
Version: v2.2.2
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/custom-components/grocy/issues
-------------------------------------------------------------------

2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy] Finished fetching grocy data in 0.027 seconds
2021-02-25 20:34:08 WARNING (MainThread) [homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify GrocyBinarySensor to extend BinarySensorEntity
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.grocy
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.grocy
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.EXPIRED_PRODUCTS binary sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.EXPIRING_PRODUCTS binary sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.MISSING_PRODUCTS binary sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.OVERDUE_CHORES binary sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.OVERDUE_TASKS binary sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.CHORES sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.MEAL_PLAN sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.SHOPPING_LIST sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.STOCK sensor
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.TASKS sensor
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.grocy entity: binary_sensor.grocy_expiring_products
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.binary_sensor] Not adding entity Grocy expiring products because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.grocy entity: binary_sensor.grocy_missing_products
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.binary_sensor] Not adding entity Grocy missing products because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.grocy entity: binary_sensor.grocy_overdue_chores
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.binary_sensor] Not adding entity Grocy overdue chores because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.grocy entity: binary_sensor.grocy_overdue_tasks
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.binary_sensor] Not adding entity Grocy overdue tasks because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.grocy entity: sensor.grocy_chores
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Grocy chores because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.grocy entity: sensor.grocy_meal_plan
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Grocy meal plan because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.grocy entity: sensor.grocy_shopping_list
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Grocy shopping list because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.grocy entity: sensor.grocy_stock
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Grocy stock because it's disabled
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.grocy entity: sensor.grocy_tasks
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.sensor] Not adding entity Grocy tasks because it's disabled
2021-02-25 20:34:08 ERROR (MainThread) [custom_components.grocy] Update of Expired_products failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:34:08 DEBUG (MainThread) [custom_components.grocy] Finished fetching grocy data in 0.080 seconds
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.grocy entity: binary_sensor.grocy_expired_products
2021-02-25 20:34:08 INFO (MainThread) [homeassistant.components.binary_sensor] Not adding entity Grocy expired products because it's disabled

I have manually enabled the sensors, but the sensors still show as unknown.

2021-02-25 20:41:09 INFO (MainThread) [homeassistant.config_entries] Reloading configuration entries because disabled_by changed in entity registry: 
2021-02-25 20:41:09 DEBUG (MainThread) [custom_components.grocy] Unloading with state loaded
2021-02-25 20:41:09 DEBUG (MainThread) [custom_components.grocy] Unloaded? True
2021-02-25 20:41:09 INFO (MainThread) [custom_components.grocy] 
-------------------------------------------------------------------
Grocy
Version: v2.2.2
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/custom-components/grocy/issues
-------------------------------------------------------------------

2021-02-25 20:41:09 INFO (SyncWorker_35) [custom_components.authenticated.sensor] New successful login from known IP (172.30.33.10)
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy] Finished fetching grocy data in 0.359 seconds
2021-02-25 20:41:10 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.grocy
2021-02-25 20:41:10 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.grocy
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.EXPIRED_PRODUCTS binary sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.EXPIRING_PRODUCTS binary sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.MISSING_PRODUCTS binary sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.OVERDUE_CHORES binary sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.binary_sensor] Adding GrocyEntityType.OVERDUE_TASKS binary sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.CHORES sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.MEAL_PLAN sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.SHOPPING_LIST sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.STOCK sensor
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy.sensor] Adding GrocyEntityType.TASKS sensor
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Expired_products failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Expiring_products failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Missing_products failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Overdue_chores failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Overdue_tasks failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Chores failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Meal_plan failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Shopping_list failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Stock failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 ERROR (MainThread) [custom_components.grocy] Update of Tasks failed with 404 Client Error: Not Found for url: https://10.0.2.3:9192/grocy/public/api/:9192/api/system/db-changed-time
2021-02-25 20:41:10 DEBUG (MainThread) [custom_components.grocy] Finished fetching grocy data in 0.637 seconds

Clearly, I have done something wrong and I really believe that the api url is not right, but it is the only one I can get the integration to configure with.

Any help to find the error would be greatly appreciated.
Thank you

@isabellaalstrom
Copy link
Contributor

What version do you have installed of grocy?

@riddledaxis
Copy link
Author

I am running version 0.11.0 of the Hassio Add-on, which is version 3.0.1 of Grocy

@isabellaalstrom
Copy link
Contributor

Try beta version of custom component.

@SebRut
Copy link
Owner

SebRut commented Feb 25, 2021

The uri seems malformed, try adding the url with the trailing '/' as stated in the example.

Also not really a pygrocy issue but an issue belonging to the component ;)

@SebRut
Copy link
Owner

SebRut commented Feb 25, 2021

Closing this, open an issue at the custom component repo if fixing the url does bot resolve the problem.

@SebRut SebRut closed this as completed Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants