Loxone and Home Assistant

Hi.
Yes, I use loxone app (loxconfig) and webserver already. When I connect, i set only 192.168.1.xx (without port specification) what mean port number 80. When I se 192.168.1.xx:8080 it returns Page doesn exist.

Why do you have default port number 8080, when Loxone default port number is 80? Is there any reason to change it?

I dont set any virtual output or something else in Loxconfig (to communicate with Hass.io). Is it ok?

Or isnt need to install websocket in Hass.io? When I type http://192.168.1.zzz:8123/api/websocket (zzz=my Hass.io IP) it returns: No WebSocket UPGRADE hdr: None Can “Upgrade” only to “WebSocket”.

I use Loxone in version 9.3.3.26…

EDIT: When I try it again and restart Hass.io, there is no more any error about Loxone add-on. But there arent also any new Loxone entities in Developers Tools -> States.

First of all: thank you for this great integration! It seems to be working very nicely. Your efforts are very much appreciated!

Started to use Home Assistant and this Loxone integration to integrate few additional items to my Loxone installation (started with: Google Assistant, Media/Harmony Hub…).

I have a few questions:

Pulses
What is the recomended way to:

  • handle a Pulse from Loxone to HA
  • handle a Pulse from HA to Loxone

I now re-worked some Loxone logic to make a pulse into a switch but in some cases it just adds unnecessary logic. Sometimes a pulse just makes sense to remain a pulse and shouldn’t be a switch.

I might be missing something here?

Error
I have the following error that happened now about 150k times in the past 4-5 days.
Not really critical as it doesn’t seem to effect any functionality that I might be using.

Wed Jan 29 2020 08:36:27 GMT+0100
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/coroutines.py", line 120, in coro
    res = func(*args, **kw)
  File "/config/custom_components/loxone/sensor.py", line 91, in event_handler
    self.schedule_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 418, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

Hey,

what do you mean with Pulses? Somthing which triggers only a pulse event and you want
maybe increment something?

Can you describe it in more detail? I do not understand what you want do do?

How fast do you trigger this pulse?

Hi Jojo,

Thank you for replying.

Pulses could be used for various reasons but let’s take a very common and easy to understand use case.

You press a doorbell connected to Loxone Digital Input. This doorbell (pulse) you want to send to HA e.g. to integrate with a component like Sonos to do some TTS.

I could get it to work by creating a switch that the doorbell switches on, but that would mean i need to add logic that after e.g. few seconds i switch it back off.

In general i’m actually not really interested in the above use case, but all my wall push buttons basically generate a pulse in Loxone.

I know that in Loxone you can use a Pulse component as well where you can actually define the duration of the pulse. Maybe that helps if integration is needed? However I see that Loxone doesn’t offer to visualize this block.

Hi VRHA,

You press a doorbell connected to Loxone Digital Input. This doorbell (pulse) you want to send to HA e.g. to integrate with a component like Sonos to do some TTS.

for this I would create a Memory Flag of Type Digital (important is that you check “Use” to true in the User Interface section of the Loxone Config) and connect it to the doorbell for example. Then get an
Ditgtal Sensor in HA like this:

grafik

You can then use this input to do what you want on the HA side for example run a script or something
else.

Is it that what you want? When not can you sent me a picture of the “Pulse component”. I did not find it.

Hello Jojo,

I have been using your integration with ease. However, since this morning I get this error when starting up homeassistent:
2020-04-04 17:23:37 INFO (MainThread) [custom_components.loxone] Error
2020-04-04 17:23:37 INFO (MainThread) [homeassistant.setup] Setup of domain loxone took 0.8 seconds.
2020-04-04 17:23:37 ERROR (MainThread) [homeassistant.setup] Setup failed for loxone: Integration failed to initialize.
2020-04-04 17:23:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.alarm_control_panel: Unable to set up component.
2020-04-04 17:23:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.light: Unable to set up component.
2020-04-04 17:23:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform loxone.scene: Unable to set up component.

I have added some other components (like IOTlink and glances). Could there be any interference? I have installed an older version of home assistant 106.6 instead of 107.7 and I get the same error. What can I do now?
I can access loxone via http://192.168.1.xx:80/data/LoxAPP3.json.
I use loxconfig 10.3.11.25

Any ideas?

How do I create the unit_of_measurement from loxone. I’m not sure if this is done in loxone or home assistant. Thank you.

What unit du you want to use? The binding parses not all units. Only the common formats like °C or % for humidity.

It is one of the temperature measurements that’s not getting the unit_of_measurement

I have sorted the problem tonight thank you Jojo, I never had the sensor in a category in Loxon’s config so in home assistant it wasn’t recognised as a temperature reading. Thank you for your help.

Hi @Jojo,

Thank you for your help already!

Is it possible to use this integration to sync analog sensor value with direction from Home Assistant to Loxone?

Use case:
I have DSMR (digital utility meters) kW / kWh readings that arrive at Home Assistant. But would like to get these values as well into Loxone.

Is this currently possible? I tried setup of a Virtual Input (Analog) sensor in WAY4? The Virtual Input (Analog) sensor doesn’t seem to show in Home Assistant. If not, i’ll likely need look into HA UDP sending.

Hi @VRHA,

the Virtual Input shot show up in Home Assistant. Do you see the Input in the loxone App on your Phone.
The Input or any sensor must be enabled for the app. Otherwise it is not visible for any App or program.

When you have the sensor in home-assistant you can try to change the value from home-assistant or make a automation. But I never tried it like that. I can implement it if it is not working. It should no big deal.

I use most of the time nodred with the loxone binding to set values on the loxone.

Hi,

Is it possible to integrate intelligent roomcontrollerV2? Thank You!

I started to work on this just out of curiosity and I have a beta version so to say. Not sure how it can be shared the best way though, I’m new to GitHub and stuff. Will check with the original developer to see what’s best.

I created a pull request with my changes. Feel free to test and add comments.

https://github.com/JoDehli/PyLoxone/pull/35

Hi @Jojo,

I have setup the integration and I’m able to read the version number of my Loxone, connection seems to be fine, however the entities don’t seem to be auto-populated?
Any pointers as to what I might have done wrong, or is there still something that I need to trigger?

@N008 you have to make sure that entities show up in the loxone app. For this you must set the entities in the loxone config to visible. Also make sure that you have set a room and a category for each entity you want to display in ha.

Thanks for your quick reply Jojo, I double checked and eventhough room and category and app visiblity were set correctly, I messed up the user rights of the new user I created for access through HA!
Fixed that and it solved the problem.

Thanks for this great integration!!!

Anyone know if you can read sensor data or trigger a lawn mower for example in home assistant from Loxone. I know Loxone has virtual outputs, but I have no idea if home assistant can receive these and do stuff with it, same as with sensor data. Can home assistant send this to the Loxone server?

hello, i am new in using hack and homeassitant. I cant seem to find where in homeassitant/hack i need to add the repository GitHub - JoDehli/PyLoxone: Python Loxone binding . This is what i c in the repository folder under hacs:
image

Can someone tell me were to put the link of the repository,

thanks