Loxone anyone?

hi there,
is anybody working on a Loxone binding? or has some insights on feasability for that?

cheers

Hi,

the Loxone Miniserver offers access to all inputs and outputs via HTTP. So it should be possible using the HTTP Binding.


I have just published first version of Loxone binding for OpenHAB: https://github.com/ppieczul/org.openhab.binding.loxone
Current features are described in README.md file in the repository.
Looking forward to your feedback.
Thanks
Pawel

1 Like

Hi Pawel,

I’m currently testing out your binding, and I must say it’s a great work you’ve done. I’ve been looking for such a solution for a long time! Thanks for your contribution to making oh2 even better!’

Best regards
Christian

Just have one question though. I’m trying to send “modbusitem”.state to Loxone virtual input item. I have created a rule that sends the state as number, but loxone doesn’t receive the update. In openhab the updated state is retreived though. When I look in openhabip/rest/items I see the loxone item as “readonly:true”. Do you know how to make this work?

thanks

@sjef86 Thank you, I hope you will find it useful!

@sjef86 As for your problem with virtual input, could you double check that you have virtual input, not virtual state? There are really only two types of Loxone controls that are translated into read-only items: virtual state and state. If this is virtual input indeed, could you please send in a part of your http://miniserver/data/LoxAPP3.json file where this input is defined? This should help me find a reason. Thanks!

Hi Pawel,

This is from openhab2 rest items:

{"link":"http://10.0.0.29:8080/rest/items/LoxoneFanSpeed_State","state":"MID","stateDescription":{"minimum":0,"maximum":0,"step":1,"readOnly":true,"options":[]},"type":"String","name":"LoxoneFanSpeed_State","label":"LoxoneFanSpeed_State","tags":[],"groupNames":[]},

this is from loxone/data/LoxAPP3.json:

{"name":"Systemair_FanSpeed","type":"TextState","uuidAction":"1030d7b0-0178-6044-ffff60d05923bf6e","room":"0ee07b7b-02dd-0401-ffff60d05923bf6e","cat":"0ee07b7b-02b8-0331-ffff60d05923bf6e","defaultRating":0,"isFavorite":false,"isSecured":false,"states":{"textAndIcon":"1030d7b0-0178-6044-ffff60d05923bf6e"}},"1030d688-0078-bab1-ffff8f3e625398ed":

I’ve managed to solve this now, by using this rule:

//Loxone_FanSpeed_State//
rule sytemair_fanspeed_state

when
Item Systemair_FanSpeed received update

then
var Number FanSpeed = 0
if(Systemair_FanSpeed.state instanceof DecimalType) FanSpeed = Systemair_FanSpeed.state as DecimalType
postUpdate(LoxoneFanSpeed_State, FanSpeed);
sendHttpPostRequest("http://user:password@10.0.0.41/dev/sps/io/Systemair_FanSpeed_State/" + FanSpeed)

end

This is right, TextState block is read-only. This block is used to provide an output only - it must be that one on your config diagram: https://www.loxone.com/enen/kb/state/

If you want to provide numerical input to Loxone, you can use Virtual Input and disable “use as digital input” checkbox. This should be accepting commands.

Does it make sense?

Pawel

…and in loxone config this block has analog inputs. Unfortunatelly they are not exported through API, but available for connections to other blocks. So you have to create a virtual input(s) and connect them to the State block. This should make it work.

I double checked and actually analog virtual input will not work here, because it is not supported by the binding.
For now I would suggest to use radio button as an input to State block. But this will give you 1-16 discrete selection.

If you need to input a floating number from openHAB to Loxone, it is not possible now, but I can easily add that functionality. If you could build your configuration and tell me from the json file, which API control this results in, I will add that to the binding. According to the API, virtual input can be exposed as more that one control block by the API, depending on its settings:

  • Pushbutton (is supported today)
  • Slider (not supported today)
  • Switch (is supported today)
  • UpDownLeftRight digital (not supported today)
  • UpDownLeftRight analog (not supported today)
  • ValueSelector (not supported today)

Hi Pawel,

Sorry for taking me so long to respond.
I currently have this working, by using the above rule. I thought I was writing the values from openhab2 to Loxone Virtual Analogue Input, but after a closer look, maybe I’m writing the string/number directly to the Loxone State block. I will post some screen dumps for you to verify.

Rule:

//Loxone_FanSpeed_State//
rule sytemair_fanspeed_state

when
Item Systemair_FanSpeed received update

then
var Number FanSpeed = 0
if(Systemair_FanSpeed.state instanceof DecimalType) FanSpeed = Systemair_FanSpeed.state as DecimalType
postUpdate(LoxoneFanSpeed_State, FanSpeed);
sendHttpPostRequest("http://user:password@10.0.0.41/dev/sps/io/Systemair_FanSpeed_State/" + FanSpeed)

end

On second thoughts, I think it is: sendHttpPostRequest(“http://user:password@10.0.0.41/dev/sps/io/Systemair_FanSpeed_State/” + FanSpeed)
that’s triggering the action. The “Systemair_FanSpeed_State” is the Virtual Input in Loxone config. Although this is not visable in the http://miniserver/data/LoxAPP3.json list.

Can you check in Loxone Config if your virtual input has “visible in UI” checkbox on? On virtual inputs this is by default off. Setting it to on will make it visible in the Lox…json Thanks.

Hi Dear Pawel, maybe you have an update for version 9.0 of Loxone? The regular password authentication no longer works. Thank you in advance!

Yes, it is supported in 2.3 stream of openHAB. Currently this can be taken from the unstable apt repo or daily builds. It is going to be released soon.

Thank you very much! waiting to hear about the news :slight_smile:

Released: https://www.openhab.org/blog/2018-05-27-openhab-2-3-release.html

1 Like

Thanks for the Binding. It’s very useful for integrating Loxone with other services or systems.

I have read this thread but it seems that the only way to have “values” updating from OH to Loxone is still via rules/HTTP and not directly by the binding.

Is this feature in the binding roadmap? It would be very interesting for Google Home direct Thermostat Control for instance, without specific rules.

thanks in advance

Every channel state update in OH is automatically populated to Loxone. You have to make sure the items are properly linked with channels, so that channels get correct state updates. If any of the channels does not update value in Loxone, let me know, it may be a bug or it may need state update via a different value type.

1 Like