2 issues with Grocy , any advice to fix this is appreciated or alternative works too

Hello -

I have recently started with HA and installed HACS and then Grocy.

Use case - I want to track chores around the home and update them using a telegram notification response and/or NFC tag. This means If I scan the NFS tag the chore should be considered done, same with the telegram bot’s actionable notification. I have come so far with half of it only but ended with the below issues.

My system info -

Version 	core-2022.4.7
Installation Type 	Home Assistant OS
Development 	false
Supervisor 	true
Docker 	true
User 	root
Virtual Environment 	false
Python Version 	3.9.9
Operating System Family 	Linux
Operating System Version 	5.15.32

Issue1 :

After the restart of HA , I immediately started seeing these logs. gone through the documentation and I see no info on how to use this add-on now.

How should I proceed and what are my options?

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration grocy which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-25 02:19:03 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that uses str for device registry entry_type. This is deprecated and will stop working in Home Assistant 2022.3, it should be updated to use DeviceEntryType instead. Please report this issue.
Stack (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/src/homeassistant/homeassistant/__main__.py", line 203, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 191, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 119, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 629, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 596, in run_forever
self._run_once()
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1890, in _run_once
handle._run()
File "/usr/local/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 501, in _async_add_entity
device = device_registry.async_get_or_create(**processed_dev_info) # type: ignore[arg-type]
File "/usr/src/homeassistant/homeassistant/helpers/device_registry.py", line 369, in async_get_or_create
report( # type: ignore[unreachable]
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 74, in report
_LOGGER.warning(msg, stack_info=True)

Issue2:

I went ahead and proceed to create sensors to test, surprisingly after every restart sensors are behaving weird, for a while I see all the created sensors, and then after a restart one of the sensors shows unavailable.

Here is my sensor config (somehow the formatting isn’t looking good , but this is valid configuration, which I tested with “check configuration” )


---

platform: rest

name: water plants outside

resource: http://192.168.50.77:9283/api/chores/1

method: GET

value_template: "{{ (((as_timestamp(value_json.next_estimated_execution_time))-as_timestamp(now())) | int /60/1440) | round(0) }}"

json_attributes:

  - last_tracked

  - estimated_execution_time

headers:

  Accept: application/json

  Content-Type: application/json

  GROCY-API-KEY: !secret grocy_api

unit_of_measurement: "days"

platform: rest

name: water plants inside

resource: http://192.168.50.77:9283/api/chores/2

method: GET

value_template: "{{ (((as_timestamp(value_json.next_estimated_execution_time))-as_timestamp(now())) | int /60/1440) | round(0) }}"

json_attributes:

  - last_tracked

  - estimated_execution_time

headers:

  Accept: application/json

  Content-Type: application/json

  GROCY-API-KEY: !secret grocy_api

unit_of_measurement: "days"

and also I see few logs like this , I believe there are just warning and can ignore for now.

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "platform". Check lines 3 and 17

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "name". Check lines 4 and 18

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "resource". Check lines 5 and 19

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "method". Check lines 6 and 20

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "value_template". Check lines 7 and 21

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "json_attributes". Check lines 8 and 22

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "headers". Check lines 11 and 25

2022-04-25 02:18:58 WARNING (SyncWorker_0) [homeassistant.util.yaml.loader] YAML file /config/integrations/../sensors/Grocy/grocy.yaml contains duplicate key "unit_of_measurement". Check lines 15 and 29

image

so, bottom line it seems either there is some issue with Grocy app with the latest version of OS or I am overlooking something here.

can someone help me on this issue and/or is there an easy alternate solution to achieve to track chores.

The first two lines of your error messages are common and no problem.

The rest does not seem to relate to grocy or hacs.

As far as your sensors are concerned, I am not sure what you are doing with rest. There are sensors created by the integration, although they were disabled when I first set it up. I have enabled these two, and I suspect the overdue tasks is “unknown” because I have no overdue tasks.

Thanks, I gonna check that what you mentioned.

Do you see the same errors as I get (ignoring first two lines?) reason is I have tested twice that I see them coming right after adding grocy.

Also is your use case just to display? Or do you action them like task complete?

Yes I see it and it does seem to relate to grocy. The authors need to tidy some syntax up by the look deprecated code warning in HA 2022.3.8 · Issue #197 · custom-components/grocy · GitHub

I am not really using it for anything at the moment. I installed it this morning so I could hopefully help a new user.

1 Like

I am using Grocy to display the next due chore, and then clicking it to call grocy.execute_chore to action it as completed. I’m not using REST though, just the entities created by the integration.

I don’t see that I’m getting those warnings either (I’m on 2022.4.5). I assume you’re seeing them under the “load full home assistant log”.

Thank you, Somehow all my entities are disabled and unable to enable them. Would you mind sharing some info about how I can achieve the same?

That’s correct. Safe to ignore you think?

Grocy entities that have no data show up as unknown, but I don’t have any as disabled and I didn’t do anything special. Maybe it’s related to the errors you’re getting.

I have most things turned off in the config for Grocy in Supervisor as I only use chores and battery reminders. Maybe try the same?

certfile: fullchain.pem
culture: en
currency: USD
entry_page: stock
features:
  batteries: true
  calendar: false
  chores: true
  equipment: false
  recipes: false
  shoppinglist: false
  stock: false
  tasks: false
grocy_ingress_user: ''
keyfile: privkey.pem
ssl: false
tweaks:
  chores_assignment: true
  multiple_shopping_lists: false
  stock_best_before_date_tracking: false
  stock_count_opened_products_against_minimum_stock_amount: 0
  stock_location_tracking: false
  stock_price_tracking: false
  stock_product_freezing: false
  stock_product_opened_tracking: false

I am having an issue all of a sudden that Grocy is not able to send entities to HomeAssistant. Here is the type of install I am running on my RPI4 with logger data. Not sure how to fix.

Home Assistant 2023.8.0
Supervisor 2023.07.1
Operating System 10.4
Frontend 20230802.0 - latest

Logger: homeassistant.components.binary_sensor
Source: helpers/entity_platform.py:619
Integration: Binary sensor (documentation, issues)
First occurred: 11:29:53 AM (4 occurrences)
Last logged: 11:30:04 AM

Error adding entities for domain binary_sensor with platform grocy
Error while setting up grocy platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
    device = dev_reg.async_get(self.hass).async_get_or_create(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'software_version'

/config/custom_components/grocy/entity.py

Replace line 40:
software_version=VERSION,
with
sw_version=VERSION,

Restart HA… or wait for the custom component to be updated.

1 Like

Thank you so much! That worked! Greatly appreciate your help!