Loxone Binding

I got some error :

Error during setup of component loxone
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/websockets/http.py”, line 139, in read_response
status_line = await read_line(stream)
File “/usr/local/lib/python3.7/site-packages/websockets/http.py”, line 219, in read_line
raise EOFError(“line without CRLF”)
EOFError: line without CRLF

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/websockets/client.py”, line 101, in read_http_response
status_code, reason, headers = await read_response(self.reader)
File “/usr/local/lib/python3.7/site-packages/websockets/http.py”, line 141, in read_response
raise EOFError(“connection closed while reading HTTP status line”) from exc
EOFError: connection closed while reading HTTP status line

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 170, in _async_setup_component
hass, processed_config
File “/config/custom_components/loxone/init.py”, line 309, in async_setup
res = await lox.async_init()
File “/config/custom_components/loxone/init.py”, line 600, in async_init
timeout=TIMEOUT)
File “/usr/local/lib/python3.7/site-packages/websockets/client.py”, line 547, in await_impl
extra_headers=protocol.extra_headers,

File “/usr/local/lib/python3.7/site-packages/websockets/client.py”, line 290, in handshake
status_code, response_headers = await self.read_http_response()
File “/usr/local/lib/python3.7/site-packages/websockets/client.py”, line 103, in read_http_response
raise InvalidMessage(“did not receive a valid HTTP response”) from exc
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response

Hey Leo,

have you checked the connection settings manually. Is the port and the IP address right? Did it ever work or is it the first time you use the binding? The standard port in my binding is 8080 so maybe you have a different port.

I connected & worked before , the port is 80 … I check the loxone json , in browser working nice …

the problem happened after reboot HA

There is the problem:
did not receive a valid HTTP response

It get no connection to the loxone. Pleas try a other port. In the past some users had
similar problems with the port 80. Only for test purpose. Maybe it helps.

Sorry bit I can not reproduce the problem on my system.

Hi Jojo,

Thanks for your work! I can’t get it to work. The component works but i’m only getting my screens but I want to control my lights and switches.

In my loxone config(Windows), I can see that al the lights are in a room and has a name…
Can you explain the ‘define the room and category in more detail?

I used a loxone home bridge plugin in the past. It sawed al my switches and lights.

Hi,
what do you mean with I get my screens?

You have to define the room and a category in you loxone config for each
entity which you want so expose to the loxone binding. How did you define you lights?
Did you see nothing from the loxone in home assistant?

‘You have to define the room and a category in you loxone config for each
entity which you want so expose to the loxone binding.’

Every entity has a ‘room’ and ‘category’ in Loxone Config.

I see 2 switches in Home assistant from the Loxone.
one 'aanwezigheidsimiluatie (Awareness simulation) and schemer (one scene?)

Important is that cat and room are not set du undefined.

Can you sent me the LoxAPP.json from you config. Maybe I see your
problem there.

When you mean lights do you mean lightcontroller?

Important is that cat and room are not set du undefined.

It’s all set with ‘livingroom, kitchen etc’.
I want to see all my light in HAS as entity’s. The homebridge plugin worked before.
Can i find the LoxAPP.json on windows in the working directory of the Loxone Config program?

First of all can you turn on the log for the loxone component and paste it?

My log settings in the configuration.yaml are

logger:
  default: info
  logs:
    homeassistant.components: critical
    custom_components.loxone: debug

You can retrieve the json by got to the url:

http://<ip-of-or-loyone:/data/LoxAPP3.json

Mine for example is http://192.168.1.225:8080/data/LoxAPP3.json

You can sent with a private Message.

I send you a private message with logs and the JSON output.

Converting al the light controllers to V2 has solved it! Great and thanks for your support Jojo!

Hi @Jojo,

I’m also having some issue with your binding.

Basically everything works ok except the LighControllerV2 that I’m not able to get it in HASSio.

Can you help?

Best regards,
André Azevedo

Just found the bug

On light.py from line 132 to 135 where is “dimmer” should be “switch”

Just change it and everything working fine now!

I changed a lot in the dev branch. Maybe you can test it also with the dev branch. I will release a new version very soon.

I’m new to HA. Installed the latest stable version (0.108.3) on a rasp pi 3 model B. That went without troubles.

Next I wanted to install the Loxone Binding from https://github.com/JoDehli/PyLoxone

I struggled somewhat with the documentation as well as with unpacking the zip file from github, so I wanted to share my experience as a first time user to the HA community:

  • The readme says to unpack the zip file in config/www but this doesn’t seem to be accurate. Instead the zip contains a folder custom_components which should go into config/custom_components and a folder www should go into config/www. I did the unzipping and moving using the File Editor (an addon to be installed from the official addon-store) which comes with the ability to execute shell commands.
  • config.yaml should be configuration.yaml instead

I hope this will help the next newbie.

Thanks for making this binding!

Thank you for your comment. I changed the read me.
Jojo

Hi @Jojo,

I am using Hass v0.110.3 and just update PyLoxone to v 0.2.3. Everything seem good.

When I turn on the light from Hass UI, the physical light is ON, but the status of it on UI remain ON for some seconds then change to OFF automatically. As a result , I can’t turn off the light from UI.

Can you support that case ?
Thanks!

Hoang Dung

Should be fixed in the next release. Of you can not wait you can try the Dev branch. I think I make a new release this weekend.

Hi @Jojo

unfortunately I cant find your repository in current version of HACS. Whats the matter with this?