Anrolosia / Shopping-List-with-Grocy

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

error installing integration #1

Closed eddysteurs closed 1 year ago

eddysteurs commented 1 year ago

when I install the installation after entering all parameters I keep getting this error message 2022-12-22 11:42:17.517 WARNING (MainThread) [homeassistant.config_entries] Config entry 'ShoppingListWithGrocy' for shopping_list_with_grocy integration not ready yet: 0, message='Attempt to decode JSON with unexpected mimetype: text/plain', url=URL('http://192.168.0.90:8123/api/hassio_ingress/inB-aTDbRNSNJz2Wj20-xpoFjyu-D8jUTTsfzgfEZW4/api/system/db-changed-time'); Retrying in background If I copy paste the url part in a browser I do get an normal answer

Anrolosia commented 1 year ago

This hacs module was tested with a self hosted instance of Grocy. I'll test today with the addon provided with HA to see what could be the issue. In the meantime, could you open the api REST browser and go on db-changed-time (should be http://192.168.0.90:8123/api/hassio_ingress/inB-aTDbRNSNJz2Wj20-xpoFjyu-D8jUTTsfzgfEZW4/api#/System/get_system_db_changed_time on your side), then click on Try out then Execute. Is it working?

eddysteurs commented 1 year ago

Screenshot_20221222_122931

Anrolosia commented 1 year ago

I checked, and it appears to be related to that issue: https://github.com/hassio-addons/addon-grocy/issues/315

Basically, hosting Grocy on homeassistant will require the API to be authentified in Home Assistant, to have a hass ingress valid session AND use the API Key from Grocy...

If the developer from the add-on could find a way for the API to be accessible as every other APIs, it will work.

I'll keep an eye on that to see if there is some evolution there.

Anrolosia commented 1 year ago

I pushed an update for the module, please go to HACS and update it. Then, follow doc at the end of https://github.com/Anrolosia/Shopping-List-with-Grocy#3-add-home-assistant-integration about using Grocy's add-on.

eddysteurs commented 1 year ago

fantastic, works perfect now