poulou0/nextcloud-homeassistant-integration

Widget never loads

Closed this issue · 4 comments

I am having trouble setting this up for the first time, and I wasn't able to find any documentation on setting it up so I hope asking here is OK.

Base URL is set to the URL I use to access home assistant. I have confirmed by copying and pasting into a browser that this is correct.

The long-lived access token is newly generated, was copy and pasted in, and does not contain any line breaks at the end (or anywhere).

The refresh interval is left as the default 30 seconds.

The template is set to: {{ now() }}

On the dashboard, it simply does not load. I have tried in a private window in case things were being interfered with, but this did not help.

Screen shot

In the logs I see:

LocalServerException Host violates local access rules
Error during dashboard widget loading: OCA\HassIntegration\Dashboard\TemplateWidget 

Any help appreciated!

This worked, thanks!

Of course, this has security implications. Is this a blanket requirement or is it something about my setup?

That's great!! As far as I understand it disallows hostname only.. im assuming you use something like http://nextcloud, if you can change it to something like http://nextcloud.local (or the ip address)?
Then you don't have to add this flag on the config file

https://help.nextcloud.com/t/cant-connect-to-onlyoffice-document-server-after-update-to-nc19/83958/2

I'm using https://nextcloud.domain.com but it resolves to a local IP because it's hosted on a machine within the same network. I also tried the IP address and it didn't work without this flag.

It sounds like it's not a blanket requirement, so I can play with it and see if I can work out what makes my setup special. Thanks for the help 🙂 .