JoDehli / PyLoxone

Python Loxone binding
Apache License 2.0
184 stars 41 forks source link

Error setting up entry PyLoxone for loxone #157

Closed jantalloen closed 1 year ago

jantalloen commented 1 year ago

Loxone Miniserver Gen2 Miniserver version 13.1.11.17 Remote access via 'Remote Connect'is enabled and working Install over Hassio on Odroid N2+ (home assistant blue) HomeAssistant system information: Version : core-2023.1.4 Installation Type: Home Assistant OS Development: false Supervisor: true Docker: true Bug description: From the log: 2023-01-13 13:59:27.008 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry PyLoxone for loxone Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup result = await component.async_setup_entry(hass, self) File "/config/custom_components/loxone/init.py", line 195, in async_setup_entry if not await miniserver.async_setup(): File "/config/custom_components/loxone/miniserver.py", line 140, in async_setup request_code = await self.lox_config.getJson() File "/config/custom_components/loxone/api.py", line 122, in getJson api_resp = await client.get("/jdev/cfg/apiKey") File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1757, in get return await self.request( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1533, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1620, in send response = await self._send_handling_auth( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1648, in _send_handling_auth response = await self._send_handling_redirects( File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1706, in _send_handling_redirects raise exc File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1688, in _send_handling_redirects await hook(response) File "/config/custom_components/loxone/api.py", line 84, in raise_if_not_200 raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 307

Settings for the integration: Miniserver Ip: dns.loxonecloud.com/ Port: 80 Generate scenes: not enabled Generate subcontrols for lightcontrollerV2: enabled

Additional info: Via Chrome I have HTTP access to URLs like http:///data/LoxAPP3.json Using OpenHAB + Loxone Binding on my Macbook the communication with my miniserver works flawlessly

JoDehli commented 1 year ago

Use the local IP address

jantalloen commented 1 year ago

Thanks for the quick reply. It works now! I should have tried that myself instead of sticking to your example config in the documentation ;-)