Loxone anyone?

Hi Pawel, all,

tried with 2 different openHab installations on Raspberry (existing with items & new without items).
Both show the same error with LoxAPP3.json - see logs snippet below.

Do you have a hint for me???

Thank you.
Markus

See logs below
2020-08-30 12:37:29.446 [DEBUG] [.binding.loxone.internal.LxWebSocket] - [5] Releasing command sender with response: authwithtoken/C242BDDF40B31F342F86C89D92A147411246BD7E/Reigl, 200
2020-08-30 12:37:29.450 [DEBUG] [.internal.security.LxWsSecurityToken] - [5] Token will expire on: 2020-10-25 10:55.
2020-08-30 12:37:29.452 [DEBUG] [.internal.security.LxWsSecurityToken] - [5] Setting token refresh in 54 days.
2020-08-30 12:37:29.455 [DEBUG] [.internal.security.LxWsSecurityToken] - [5] Authenticated - used stored token.
2020-08-30 12:37:29.456 [DEBUG] [.binding.loxone.internal.LxWebSocket] - [5] Websocket authentication successfull.
2020-08-30 12:37:29.459 [DEBUG] [.binding.loxone.internal.LxWebSocket] - [5] Sending unencrypted string: data/LoxAPP3.json
2020-08-30 12:37:29.544 [DEBUG] [.binding.loxone.internal.LxWebSocket] - [5] Websocket error : org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte B2 in state 0
2020-08-30 12:37:29.546 [DEBUG] [.binding.loxone.internal.LxWebSocket] - [5] Websocket connection closed with code 1007 reason : org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte B2 in state 0
2020-08-30 12:37:29.548 [DEBUG] [.internal.security.LxWsSecurityToken] - [5] Cancelling token refresh.
2020-08-30 12:37:29.550 [DEBUG] [ding.loxone.internal.LxServerHandler] - [5] set offline code=COMMUNICATION_ERROR reason=org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte B2 in state 0

This looks like the response from Loxone contains some data that causes websocket to fail. One way to go would be send me in a private message the content of your /data/LoxAPP3.json file, Just remove any sensitive data from it. You can also look for byte B2 in that file with some hex editor and send where it appears.

1 Like

HI Pawel,
thank you for your check of the issue.
I did today a brand new setup with OpenHABian. The result: I get the same error again…

As I have it now with 2 different ways of installation etc. again the same error I expect there is something else wrong…
If you have a hint for me, I would be very happy.

Thank you.

Did a further test…
Reloaded very old loxone config which was working some month ago to be able to identify if something changed on the config side and do a diff between “old” and “new” LoxApp.json file in case it would work.
Bad news: It also doesn’t work :frowning:

With this step I realizied there was a new Loxone Miniserver Software version. Do you expect it does influence it?

Thx.

I will try to install from scratch on my RPI and see. Can you send the exact links you used for installation?

Posted these two problems related to Loxone binding, but never got a reaction?

Anyone some tips? Thanks in advance!

Hi @Joe_Vray, sorry for not responding to your questions earlier, but I have to admit I do not read community pages too often and have not seen them. I have posted answers thanks for reminding about them here.

New to Loxone with OH3… For normal relays (ON/OFF), it works.
But I’m having an issues to control some RGBW-lights on the loxone tree.

Color: doesn’t do anything? But the dimmer in here trigger the light to blue (always same value?)

Color ZD_L_Salont “Salontafel” {channel=“loxone:miniserver:d26c26e6:14A0BCE4-00FA-BD24-FFFF13887F83ECC5”}

ON/OFF doesn’t do anything?

Switch ZD_L_SalontS “Salontafel” {channel=“loxone:miniserver:d26c26e6:14A0BCE4-00FA-BD24-FFFF13887F83ECC5”}

Dimmer doesn’t do anything?

Number ZD_L_SalontN “Salontafel” {channel=“loxone:miniserver:d26c26e6:14A0BCE4-00FA-BD24-FFFF13887F83ECC5”}

I read that the color ares based on HSB instead of RGB? Do I need to use a special colorwheel?

I’ve also noticed that when I change something in the loxone app, OH doesn’t notice this. When I change something in OH, loxone noticed it? This is also the case for normal switches. So not only for RGB tree devices.

Hi @brononius.
Can you provide info about the loxone:miniserver:d26c26e6:14A0BCE4-00FA-BD24-FFFF13887F83ECC5 channel, what type of functional block this is? You can do it either by providing type of the block in the Loxone config it corresponds to it or by reading miniserver-IP/data/LoxAPP3.json and looking for that ID.

About that problem: I’ve also noticed that when I change something in the loxone app, OH doesn’t notice this
what do you mean by something and what do you mean by change?

Thanks
Pawel

Not sure what you just need, it’s a bit much or unreadable to me, but here a dirty copy/paste:

“14a0bce4-00fa-bd24-ffff13887f83ecc5”:{“name”:“Salontafel”,“type”:“LightControllerV2”,“uuidAction”:“14a0bce4-00fa-bd24-ffff13887f83ecc5”,“room”:“144dc05b-0153-2265-ffffafdc6af65df3”,“cat”:“144dc05b-010d-2110-ffffafdc6af65df3”,“defaultRating”:10,“isFavorite”:false,“isSecured”:false,“details”:{},“states”:{“activeMoods”:“14a0bce4-00fc-bd6e-ffff13887f83ecc5”,“moodList”:“14a0bce4-00fc-bd6f-ffff13887f83ecc5”,“favoriteMoods”:“14a0bce4-00fc-bd70-ffff13887f83ecc5”,“additionalMoods”:“14a0bce4-00fc-bd71-ffff13887f83ecc5”},“subControls”:{“14a0bce4-00fa-bd24-ffff13887f83ecc5/AI1”:{“name”:“groep 1”,“type”:“ColorPickerV2”,“uuidAction”:“14a0bce4-00fa-bd24-ffff13887f83ecc5/AI1”,“defaultRating”:0,“isFavorite”:false,“isSecured”:false,“details”:{“pickerType”:“Rgb”},“states”:{“color”:“14a0bce4-00fb-bd53-ffff13887f83ecc5”,“sequence”:“14a0bce4-0118-bddf-ffff405672790083”,“sequenceColorIdx”:“14a0bce4-0118-bdf4-ffff405672790083”}}}},“144ed48c-00ca-4521-ffffafdc6af65df3”:{“name”:“Sfeer”,“type”:“LightControllerV2”,“uuidAction”:“144ed48c-00ca-4521-ffffafdc6af65df3”,“room”:“144dc05b-0153-2265-ffffafdc6af65df3”,“cat”:“144dc05b-010d-2110-ffffafdc6af65df3”,“defaultRating”:1,“isFavorite”:false,“isSecured”:false,“details”:{},“states”:{“activeMoods”:“144ed48c-00ca-44d9-ffff19d75db7581b”,“moodList”:“144ed48c-00ca-44da-ffff19d75db7581b”,“favoriteMoods”:“144ed48c-00ca-44db-ffff19d75db7581b”,“additionalMoods”:“144ed48c-00ca-44dc-ffff19d75db7581b”},“subControls”:{“144ed48c-00ca-4521-ffffafdc6af65df3/AI1”:{“name”:“groep 1”,“type”:“ColorPickerV2”,“uuidAction”:“144ed48c-00ca-4521-ffffafdc6af65df3/AI1”,“defaultRating”:0,“isFavorite”:false,“isSecured”:false,“details”:{“pickerType”:“Rgb”},“states”:{“color”:“144ed48c-00ca-450a-ffff19d75db7581b”,“sequence”:“144ed500-0092-eadd-ffff76466caa8a0d”,“sequenceColorIdx”:“144ed500-0092-eaf1-ffff76466caa8a0d”}}}},“14507b7e-0332-9400-ffffab1bc9724980”:

Fe a light in the toilet, is just ON or OFF.
When I put the light ON (or OFF) through the Loxone app, I don’t see this in openHAB.
When I put the light ON (or OFF) through the openhab app, I see this in the Loxone app.


ps the Loxone installation is located on another site, and is iconnected over ‘normal’ internet, port 80. Not sure if it’s important, but can explain a certain latency, or issues with UDP? But ON/OFF from openhab is fast, not noteable that it’s on another site.

Thanks. What you try to operate is a lighting controller. Channel 14a0bce4-00fa-bd24-ffff13887f83ecc5 accepts only numerical or UP/DOWN values that selects a mood. To mix moods you can send ON/OFF to an individual mood for example 14a0bce4-00fa-bd24-ffff13887f83ecc5-M1.
To control an output, for example ColorPickerV2, where you can send HSB values and ON/OFF commands, you need to send the commands to an output channel, for example 14a0bce4-00fa-bd24-ffff13887f83ecc5-AI1.
You can check out the documentation where are the details about what commands are accepted by which channel types: Loxone - Bindings | openHAB

For the other problem, could you also provide what exactly functional block do you operate (from LoxAPP3.json).

Thanks
Pawel

Sounds complicated. But that’s the reason why I want to remove the loxone app and replace it with openhab. :wink:

With your direction, I noticed that I use the 'light controller modules" in loxone, and not the actual lights. When I visualise the actor in loxone, I can now see nicely the status in openHAB. Sadly I can’t control it (yet)?

When I check the “light controller” in the openHAB log, I see following in my logs when I switch the light in the Loxone app from OFF to ON, and from ON to OFF:

2021-03-03 14:38:21.773 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ZD_H_Verlichting2’ changed from ON to UNDEF
2021-03-03 14:40:29.782 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘ZD_H_Verlichting2’ changed from UNDEF to ON

So this look like to be inverted?
Guess that I need to have a kind of virtual switch in Loxone for this?

ps I’ll focus myself just on a normal light (ON/OFF) before starting with the tree RGBW lights. :blush:

You have to realize that hierarchy:

  • Lighting controller
  • Lights connected to lighting controller as subcontrols (their channels end with -AIn)
  • Moods defined in lighting controller (their channels end with -Mn)

You can only send numbers to lighting controller, not ON nor OFF. The number selects a mood in the controller.
You can send ON/OFF to lights, when they are represented as switches in Loxone Config
You can send ON/OFF to moods to mix them in or out

When you turn the light on in Loxone app, you need to look at the state of lights, not the lighting controller. What you look at is likely lighting controller. It goes to UNDEF, because there is no mood that corresponds to the single individual light you turned on or off or OH does not know how to translate the number (mood) to switch value.

At first sight, the lights (actor ON/OFF) are working now, with the light controller + AIn.
Sadly, this is a remote site, so I can’t test right now all functions. Just a view on a camera. :blush: So later on, I’ll test if all works as expected (in combination with hardware swichtes in the room and so).

I was trying to figure out the tree RGBW lights, but seems these aren’t working the same way? These are known as SMA block after the AQn (see printscreen below). But I can’t visualise these? That option isn’t there.

Schermafdruk van 2021-03-04 17.42.54

Great, I am glad you got switches working.
SMA output is smart actuator. You can control is through the output of the lighting controller, but first we need to figure out what kind of an output this is. Please look at LoxAPP3.json and find the lighting controller part and post the part which corresponds to this output.

Sorry for my late respond. Couldn’t find 5 minutes for this. How bad is that?

This is the json part:

{“name”:“Salontafel”,“type”:“LightControllerV2”,“uuidAction”:“14a0bce4-00fa-bd24-ffff13887f83ecc5”,“room”:“144dc05b-0153-2265-ffffafdc6af65df3”,“cat”:“144dc05b-010d-2110-ffffafdc6af65df3”,“defaultRating”:10,“isFavorite”:false,“isSecured”:false,“details”:{},“states”:{“activeMoods”:“14a0bce4-00fc-bd6e-ffff13887f83ecc5”,“moodList”:“14a0bce4-00fc-bd6f-ffff13887f83ecc5”,“favoriteMoods”:“14a0bce4-00fc-bd70-ffff13887f83ecc5”,“additionalMoods”:“14a0bce4-00fc-bd71-ffff13887f83ecc5”},“subControls”:{“14a0bce4-00fa-bd24-ffff13887f83ecc5/AI1”:{“name”:“groep 1”,“type”:“ColorPickerV2”,“uuidAction”:“14a0bce4-00fa-bd24-ffff13887f83ecc5/AI1”,“defaultRating”:0,“isFavorite”:false,“isSecured”:false,“details”:{“pickerType”:“Rgb”},“states”:{“color”:“14a0bce4-00fb-bd53-ffff13887f83ecc5”,“sequence”:“14a0bce4-0118-bddf-ffff405672790083”,“sequenceColorIdx”:“14a0bce4-0118-bdf4-ffff405672790083”}}}},“144ed48c-00ca-4521-ffffafdc6af65df3”:

Not sure what you’re seeing in this, but I hope it makes sense to you. :blush:

ps does it also mean that I’ll need to create for each light a seperate ‘lightcontrollerv2’? That the lights itself will not be controlled directly?

You can see in this JSON you have 1 subcontrol of ColorPickerV2 type. It has UUID of 14a0bce4-00fa-bd24-ffff13887f83ecc5/AI1. You can control the corresponding RGB light by sending HSB commands to the channel 14a0bce4-00fa-bd24-ffff13887f83ecc5-AI1. It will also accept on, off and Increase, Decrease, Percent and Number for brightness levels.
If you want more lights, you can connect them to the same controller, different outputs. Controller can be used to set and change scenes using all the lights. I don’t know if you can have RGB light as a standalone light without the controller, you need to consult Loxone documentation.

1 Like

Works great!!!
At least what I can see over camera’s to the remote site. :wink:

Just with following item:

Color   ZD_L_SalonC   "Salontafel"   <light>   {channel="loxone:miniserver:99d7bd282f:14A0BCE4-00FA-BD24-FFFF13887F83ECC5-AI1"}

In the sitemap 1 line:

Colorpicker item=ZD_L_SalonC

And in the logs when you play with some colors. Also the dimmer and ON/OFF (arrow UP/Down) is working.

2021-03-09 18:56:27.786 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'ZD_L_SalonC' received command 301,95,100
2021-03-09 18:56:27.790 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'ZD_L_SalonC' predicted to become 301,95,100
2021-03-09 18:56:27.792 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZD_L_SalonC' changed from 359,95,100 to 301,95,100
2021-03-09 18:56:31.312 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'ZD_L_SalonC' received command 246,94,100
2021-03-09 18:56:31.316 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'ZD_L_SalonC' predicted to become 246,94,100
2021-03-09 18:56:31.318 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZD_L_SalonC' changed from 301,95,100 to 246,94,100

I was already trying to create rules to convert RGB to HSB and so on. But seems it works just with 2 rules. As long as you’ve got the correct channel, and config in Loxone… Maybe a nice addition to the binding manual could be some basic things you need in the loxone app, and how to find the correct channel ID?

I am glad you got this working. The way this needs to be programmed is a consequence of how this is designed by Loxone. This is described in their documentation.

Hi There, maybe an easy question, but i cant find a solution yet.
i just implemented Openhab 3 with a fresh installation of Openhabian.
I use openhab right now just to connect 3rd Party systems to loxone. GUI will come later on.

I have connected some shellies to openhab with the shelly binding. Everything is working fine there. I can switch the relais and see the power consumption in Openhab
The connection to loxone with the loxone binding works as well . so i can control the light from loxone and openhab.

My last goal is now to take the power consumption from the shelly and push it with openhab to a loxone virtual input as status information.

For this i create a virtual Input in Loxone (analogue value, visible) and connected it with the channel from shelly (Loxone Channel is set to profile: Follow)

As long the virtual input is configured without “only status view” i can see the power consumption.
But this doenst make sense, cause i can then change the forwarded value in Loxone UI.
For Example: Openhab reports to Loxone 9,2 Watts and i have a up/down Button in Loxone GUI to raise it zu 10.2 Watts.
image

For this i want to set the setting “only Status View” so the value is just displayed and cant be changed in Loxone.
image

But as soon this setting is set, the value of power Consumption isnt visible to Loxone anymore, cause the channel is then read only

how to push a value from Openhab to Loxone as Status Only ?