Loxone Binding

Have you added the repo URL to hacs? It is not in the official repos.

Ok… Facepalm :frowning: thank you for you support and sorry bothering…

Im the loxone add-on and it works well but I would like to get the data from a particular temperature sensor to use in a calculation and Im not sure how to do this.

The event from Loxone is:

{
    "event_type": "loxone_event",
    "data": {
        "12e74a59-0063-7c71-ffffd159794dd12b": 20.217871485943775
    },
    "origin": "LOCAL",
    "time_fired": "2020-10-29T11:14:15.630076+00:00",
    "context": {
        "id": "f4f644ce698a06d94e55dc25ee2a755b",
        "parent_id": null,
        "user_id": null
    }
}

So far Ive got this, but not sure if its right. If it is, Im not sure on creating the template using the input from the event data:

- platform: template
  sensors:
    new_home_temp:
      friendly_name: "test home temp"
      unit_of_measurement: '°C'
      value_template: 

Can anyone help me with how to create this sensor please.

Hi all,

I am really new to HA and so far it looks amazing. I started using Loxone but at the end it became to expensive and wanted to check other options. Now I have Loxone, some Ikea stuff and also Sonoff. Hopefully I can find my way around and will I be able to create one GUI for all my home automation stuff.

@Jojo, thanks for putting time and effort in this Loxone integration, this really helps. I am able to see all my devices and see switches, possibilities to switch relays in the GUI but here is my question. How do I send this command to loxone because as it seems now, Loxone overwrites my setting. When I switch a light off in the GUI it jumps back on after 2 or 3 seconds. I don´t even know if the light actually switches off. Will test that soon.

Regards,
Marcel

No, the click in the app doesn´t result in a switch off of the lights. Just the button jumps back to on after short time.

As I understood you want to switch a light from home assistant on the loxone. Is the switch automatically created or did you made it via custom sensor? What happens when you switch it via the loxone app does the switch in home assistant changes the state?

Hi Jojo,

Good morning. I used the automatic created switches, not a custom one. When changing in loxone, HA also changes.

Can you provide log messages when you toggle the switch in ha? Maybe we can see the error message.

You can use this log config.

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

Do you use the same user for the loxone app and the connection from ha to loxone.

Last question what type of switch or light is it in loxone. Can share a pic of the loxone device in your config software.

Ok, I wanted to start the debug, added the values in yaml file and restarted. Then tested to capture the log…and guess what, I am controlling now without issues. Can control via loxone or HA and shows perfect in the apps.

Users are the same.

I am using the smart lightcontrols.

Hi,

I just setting up HA with Loxone. I get an error:

2020-12-29 16:50:12 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 236, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/config/custom_components/loxone/init.py”, line 129, in async_setup_entry
identify = hass.data[DOMAIN][‘loxconfig’][‘msInfo’][‘serialNr’]
KeyError: ‘loxone’
2020-12-29 16:50:24 ERROR (MainThread) [custom_components.hacs] custom-components/sensor.rpi_power - Repository is archived.

Can anybody help?

@madislammergas Do you still have this problem?

Yes, i didnt find a solution. I uninstalled it at the moment and trying openHAB. But if there is a solution then I am eager to try.

Openhab is also good. Good luck

Hi,

I reinstalled HA and loxone. Now I get a new error:

Logger: homeassistant.config_entries
Source: custom_components/loxone/api.py:54
First occurred: 13:29:14 (1 occurrences)
Last logged: 13:29:14

Error setting up entry PyLoxone for loxone
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/requests_async/adapters.py”, line 48, in send
response = await self.pool.request(
File “/usr/local/lib/python3.8/site-packages/http3/interfaces.py”, line 49, in request
return await self.send(request, verify=verify, cert=cert, timeout=timeout)
File “/usr/local/lib/python3.8/site-packages/http3/dispatch/connection_pool.py”, line 130, in send
raise exc
File “/usr/local/lib/python3.8/site-packages/http3/dispatch/connection_pool.py”, line 120, in send
response = await connection.send(
File “/usr/local/lib/python3.8/site-packages/http3/dispatch/connection.py”, line 53, in send
await self.connect(verify=verify, cert=cert, timeout=timeout)
File “/usr/local/lib/python3.8/site-packages/http3/dispatch/connection.py”, line 81, in connect
reader, writer, protocol = await self.backend.connect(
File “/usr/local/lib/python3.8/site-packages/http3/concurrency.py”, line 204, in connect
stream_reader, stream_writer = await asyncio.wait_for( # type: ignore
File “/usr/local/lib/python3.8/asyncio/tasks.py”, line 491, in wait_for
return fut.result()
File “/usr/local/lib/python3.8/asyncio/streams.py”, line 52, in open_connection
transport, _ = await loop.create_connection(
File “/usr/local/lib/python3.8/asyncio/base_events.py”, line 986, in create_connection
infos = await self._ensure_resolved(
File “/usr/local/lib/python3.8/asyncio/base_events.py”, line 1365, in _ensure_resolved
return await loop.getaddrinfo(host, port, family=family, type=type,
File “/usr/local/lib/python3.8/asyncio/base_events.py”, line 825, in getaddrinfo
return await self.run_in_executor(
File “/usr/local/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.8/socket.py”, line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 236, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/config/custom_components/loxone/init.py”, line 110, in async_setup_entry
request_code = await lox_config.getJson()
File “/config/custom_components/loxone/api.py”, line 54, in getJson
version_resp = await requests.get(url_version,
File “/usr/local/lib/python3.8/site-packages/requests_async/api.py”, line 11, in get
return await request(“get”, url, params=params, **kwargs)
File “/usr/local/lib/python3.8/site-packages/requests_async/api.py”, line 6, in request
return await session.request(method=method, url=url, **kwargs)
File “/usr/local/lib/python3.8/site-packages/requests_async/sessions.py”, line 79, in request
resp = await self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.8/site-packages/requests_async/sessions.py”, line 136, in send
r = await adapter.send(request, **kwargs)
File “/usr/local/lib/python3.8/site-packages/requests_async/adapters.py”, line 58, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: [Errno -3] Try again

@madislammergas Do you have the new loxone gen2?

How I can check that?

Firmware version is 11.0.5.5

You bought it you must know is :slight_smile: do you have the possibility to connect tree components direct to the loxone without extension?

Unfortunately, my apartment building company bought it and installed. I have no clue where the mini-server is located.

If it is new installed I think it is the be generation 2. So this version is not supported by my binding at the moment.