custom-components / grocy

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

Unable to complete config flow, if addon ssl: true #204

Closed sym0nd0 closed 2 years ago

sym0nd0 commented 2 years ago

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

Describe the bug When trying to complete integration setup hitting an error of "something went wrong" on submit - doesn't matter if URL is http or https or verify ssl is enabled or not.

After some digging, it appears that the integration installation will only complete if the addon configuration is set to ssl: false.

Expected behavior Submitting completes integration install

To Reproduce Steps to reproduce the behavior:

  1. Follow the Adding the integration for Grocy add-on instructions to point 10
  2. Click submit
  3. Something went wrong
  4. Amend Grocy addon configuration, changing ssl: true to ssl: false
  5. Restart addon
  6. Goto 1
  7. Profit

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?

binary_sensor.grocy_expired_products
binary_sensor.grocy_expiring_products
binary_sensor.grocy_missing_products
binary_sensor.grocy_overdue_chores
binary_sensor.grocy_overdue_tasks
sensor.grocy_chores
sensor.grocy_meal_plan
sensor.grocy_shopping_list
sensor.grocy_stock
sensor.grocy_tasks

All entities showing as disabled. Only chores enabled in Grocy config.

What is your installed versions of Home Assistant, Grocy and this integration? HA core-2022.4.1 Grocy 3.2.0 HA integration 4.1.8

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

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

JSON service data (if related to using a service) N/A

Additional context Add any other context about the problem here. N/A

sym0nd0 commented 2 years ago

Decided to start fresh with Grocy, so uninstalled everything and reinstalled using 4.2.0b for the integration, to see if this problem is resolved in an upcoming release. Same issue.

Default addon config, with required port. image Trying with SSL. image Nope. image Trying without SSL. image Nope. image

Config amended, setting SSL to false and addon restarted. image Great success. image

¯\(ツ)

ludeeus commented 2 years ago

If addon have ssl: true, you need to use https not http If you are also using IP instead of the hostname the certificate is issued to, you can not enable SSL verification.

sym0nd0 commented 2 years ago

image

image

image

image

???

ludeeus commented 2 years ago
URL: https://xxxx.duckdns.org
PORT: 9192

This requires you to have opened that port in your firewall https://xxxx.duckdns.org:9192 you use to test