oischinger / ha_vicare

Inofficial Home Assistant custom component for Viessmann ViCare API
61 stars 34 forks source link

Error setting up entry ViCare for vicare #113

Closed Tinka106 closed 1 year ago

Tinka106 commented 1 year ago

Hello, i have a problem to start the ViCare Integration.

I get the following Error by installation the Integration

Logger: homeassistant.config_entries Source: components/vicare/init.py:82 First occurred: 7. Dezember 2022 um 22:49:02 (4 occurrences) Last logged: 08:46:06

Error setting up entry ViCare for vicare Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 52, in async_setup_entry await hass.async_add_executor_job(setup_vicare_api, hass, entry) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/vicare/init.py", line 82, in setup_vicare_api device = vicare_api.devices[0] IndexError: list index out of range

I have red, that the problem sometimes could be solved with new installation, another API-Key or/and deleting the token. In my case the Error is still there.

In the developer Plattform, i can see, that the API ist answering, so i think the connection is stabile.
One more fakt, i don`t habe a heating from Viessmann just a photovoltaic-System with Viessmann Batterie.

I would be very thankful for help.

Tinka106 commented 1 year ago

@oischinger do you have an idea?

oischinger commented 1 year ago

if vicare_api.devices[0] being out of range indicates that the viessmann API reports no devices for your API. Can you see your device in the Vicare app with the same login/credentials?

Tinka106 commented 1 year ago

Hello, thanks for your answer. The credentials are the same as in the ViCare-App and there I can see my System. I have already make a new API-Key but also without a positive result.

Figo81 commented 1 year ago

Got the same problem. Still no solution?

woehrl01 commented 1 year ago

Hi @Figo81, @Tinka106

I just read that you don't have a heating system. Unfortunately the underlying library, searches for heating devices. Therfore it looks like it returns 0 in the devices list.

So this requires some changes under the hood,to make this work. Do have a bit of dev/scripting experience?

Figo81 commented 1 year ago

My System @Home only has PV+WR/Battery from Viessmann. No Heating Devices in this system. I´m sorry, but my experiences in dev/scripting are very poor. What do I have to do?

woehrl01 commented 1 year ago

@Figo81 I need example responses like in this PR: https://github.com/somm15/PyViCare/pull/293/ and you likely have to modify the device filter the same way, to return you device. An explanation how to create a dump can be found in the Readme: https://github.com/somm15/PyViCare/blob/master/README.md#more-different-devices-for-test-cases-needed

oischinger commented 1 year ago

please retry with 1.0.0-beta.1 which has multi-device support. If your device is not showing up please follow @woehrl01 's suggestion and contribute device data to the PyVicare repo