Did anyone manage to add Nextcloud integration in Home Assistant? I’ve seen it just appeared in v0.108 (which I have installed), but I can’t get it working, I keep on getting a “Please check your config.” error notification whereas I’ve done exatly what is instructed on HA website.
Heyho! Had the same problem.
After activating “Monitoring” app in NC everything works.
You can check it by typing [NC url]/ocs/v2.php/apps/serverinfo/api/v1/info?format=json (when logged in as an admin user)
Turns out, that my url was the problem.
My Nextcloud runs on the same maschine as home assistant.
So at first i tried: https://localhost
Then i thought, hm maybe its because localhost is not a trusted domain in nextcloud.
So i tried https://raspberrypi where raspberrypi is is the hostname of my local machine (points at 192.168.xxx.yyy) and raspberrypi is a trusted domain in nextcloud.
That didn’t work too. But i remembered a difference when logging into nextcloud via my localnetwork (https://raspberrypi) and via the web (https://your-domain.xyz).
I always had to accept the certificate for my local network explicitly, but for access via the web i didn’t have to.
So i tried https://your-domain.xyz and it worked.
Seems to be an issue with the SSL-Certificate, since i configured the access via web with letsencrypt and got a real certificate there.
created an additional apache site config for nextcloud without ssl (i can only be accessed from the local network)
by nextcloud config, added the sitename with it’s port
by hass changed the config entrey to a the non ssl site.
Had the integration up and working a few weeks ago, then it decided to quite working. All my entities still exist in HA, have checked and rechecked settings…it just won’t connect any more.
Have the following in the logs below…seems to be coming with last 3 lines…any one familiar with this part of the code?
## Log Details (ERROR)
Logger: homeassistant.components.sensor
Source: components/nextcloud/sensor.py:48
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 7:49:37 AM (1 occurrences)
Last logged: 7:49:37 AM
Error while setting up nextcloud platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 192, in _async_setup_platform await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 301, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 346, in _async_add_entity
if entity.unique_id is not None:
File "/usr/src/homeassistant/homeassistant/components/nextcloud/sensor.py", line 48, in unique_id
return f"{self.hass.data[DOMAIN]['instance']}#{self._name}"
KeyError: 'instance'
It should be resolved in the 0.115.3 release. I logged a ticket for this a little while back. An update was made to fix it 0.115.1 and it looks like it regressed back in 0.115.2.