JoDehli / PyLoxone

Python Loxone binding
Apache License 2.0
164 stars 40 forks source link

Cannot set up PYLoxone #75

Closed Alwyn989 closed 2 years ago

Alwyn989 commented 2 years ago

Hi there,

I have started with Home Assistant recently and have set up quite a few integrations already. the next/current one would have been my Loxone server, but i have failed miserably.

here is the situation: I run the latest core ha version (2021.6.2) and the latest hass.io (OS 5.13), as well as the latest Loxone version (12.1.5.20). my server is gen 1 server ip: 10.120.72.40, port 80 (that's where i can reach the LoxApp3.json). i installed the integration through hacs, exactly as per instructions on this site. rebooted, entered the credentials into the intergration. set logging in configuration.yaml to custom_components.loxone: debug.

nothing happens. hacs installation went fine without any hiccups or error messages, but the integration itself returns "Failed to set up" and "Check the logs", but there is not a single entry in the logs that refers to loxone. i even un- and re-installed the entire intergartion (through hacs) several times, same result.

that means, i cannot even send a log file as there is none.

is there any way to fault-find the situation?

thanks, Max

JoDehli commented 2 years ago
Alwyn989 commented 2 years ago

hi there,

i now changed my port to 8061 (tested access with Loxone config software, as well as external access through app), and i have never used any loxone related entries in configuration.yaml, except for the loggin. should i remove that as well?

still no chance, the integration won't set up and there are no entries in the logs.

thanks, Max

JoDehli commented 2 years ago

@Alwyn989 For the log config it is better to do it like this:

logger:
  default: critical
  logs:
    sensor: critical
    homeassistant: critical
    custom_components.loxone: debug
    custom_components.loxone.api: debug

What logs do you get with this config?

If you have Windows you can also try this little program I made: https://github.com/JoDehli/LoxGui/releases/download/v0.1/LoxGui_Windows_Executable.zip

Alwyn989 commented 2 years ago

still no log entries at all in HA.

as for the windows app, i am abit confused: where do i have to log into: loxone server? home assistant? if so, what port?

can you please provide some more details so that i can send you meaningfull feedback.

thanks, Max

JoDehli commented 2 years ago

It has the same python base as the custom component. Of course you have to provide the IP address of the loxone and also the port which have you configured in the loxone config software.

Alwyn989 commented 2 years ago

i did now as instructed: using your windows app i tried to log in to my Loxone server, using the same credentials, IP and port that i use when logging in through my android app or Loxone windows app. here is the result:

Try to connect...
Traceback (most recent call last):
  File "main.py", line 75, in connect_to_loxone
  File "C:\Users\Joachim\Desktop\gui\LoxGui\api.py", line 79, in getJson
  File "<string>", line 1, in <module>
NameError: name 'false' is not defined

that means, it does not log in at all, even though i can do so with my other apps.

JoDehli commented 2 years ago

Do you get the config json manually in the browser as described here:

https://github.com/JoDehli/PyLoxone#how-do-you-get-the-uuid

Alwyn989 commented 2 years ago

yes, i do. without any problems.

JoDehli commented 2 years ago

Do you use another user for loxone app?

Alwyn989 commented 2 years ago

there is, of course, also the installer user that is set up. both, the installer user as well as my own user credentials have the same permissions. meaning, with both credentials i can do anything in loxone. i have always only used my own credentials and they have worked well so far.

do you want me to log in with the installer credentials?

Alwyn989 commented 2 years ago

just answered my own question: tried to log in with the admin account it is the same problem: i just cannot log in using your windows app.

JoDehli commented 2 years ago

Sorry but I do not know what is wrong on your system.

JoDehli commented 2 years ago

@Alwyn989 Have you ever tried to install openhab2 with loxone? It also has a very good integration. I would try this only for testing.

Alwyn989 commented 2 years ago

I just started with HA and have no clue about openhab. i want to finish my configuration in HA, which is going to be a long project, so i have no capacity for openhab right now. i uninstalled the integration and will try again another time, maybe it works then. thank you so much for trying to help me, it's highly apreciated.

JoDehli commented 2 years ago

@Alwyn989 are you sure you have a gen1 because I have a different firmware version. And it is the latest one. If you have the gen2 you can not use the internal address and if you have the gen1 you can not use the external.

I think it will not work because there is something wrong with your credentials or with your user privileges

Alwyn989 commented 2 years ago

yes, i definitely a gen 1. the firmware was released earlier this month and i received it through a link my installer sent to me. it might not yet be available on their website but if you want (and if it is allowed) i can send the link. it works perfectly well and has a changelog somewhere. i was told that it addresses some of the issues i had (datastream between loxone and my SMA inverters), and, in fact, it is much more reliable.

JoDehli commented 2 years ago

@Alwyn989 I released a new version. You can try this one. It should work with your firmware. Can you give me feedback?

Alwyn989 commented 2 years ago

this new version (0.3.7) seems to work perfectly with the latest Loxone firmware (12.1.5.20). i installed the integration, rebooted, entered the credentials, and within seconds it was set up, showing 27 devices and 34 entities. these look familiar to me. i haven't had time to play around with them but it seems that the issue is resolved. and it seems it was a problem with the way this very new firmware acts.

thanks a lot for your support, this was really painless.