HowTo control openhab devices via KNX

457 views
Skip to first unread message

jdb...@diversit.eu

unread,
Apr 8, 2014, 1:40:57 AM4/8/14
to ope...@googlegroups.com
Hi,

My house is KNX-driven. I have successfully setup OpenHab to connect to KNX and I can control lights etc from OpenHab.
I am also working on a binding to control my Marantz AVR from OpenHab.

Now, what would I have to do so I can control the AVR from KNX control? So that a KNX switch would control the on-off status of the AVR for example.
Also I have some Zennio touch panels from which I would like to control some scenario's. For example a movie scenario which would switch on the tv, switch on avr, put avr on right input, set avr audio output to avr (for watching normal tv I prefer to have audio via tv), dimm lights to movie-mode, etc.

Any ideas how to do this?

Regards,
Joost den Boer

karsten.k...@gmail.com

unread,
Apr 10, 2014, 7:50:38 AM4/10/14
to ope...@googlegroups.com, jdb...@diversit.eu
Hi Joost,

not sure what AVR binding has to do with KNX. The aggregation of the functions is done using the binding in openhab.

You can check same scenarios on the pioneer AVR binding - which has a good how to:

https://github.com/openhab/openhab/wiki/Pioneer-AVR-Binding

The rules and scenarios you are setting up in OH in the items and rules files.

Cheers
Karsten


Joost den Boer

unread,
Apr 12, 2014, 3:07:36 PM4/12/14
to ope...@googlegroups.com, jdb...@diversit.eu
Karsten,

I mean I want to be able to turn on my AVR using a KNX switch or KNX touchpanel (like the Zennio I have).

With lights the status is kept in the KNX system and OpenHab reacts on the status changes.

But where do I then preserve the power state of the AVR since the AVR is not a KNX component? In KNX, just like the lights, or in OpenHab?
Can OpenHab react on buttons pressed in the KNX system or can it only react to status changes (like for lights) ?

Cheers,
Joost

karsten.k...@gmail.com

unread,
Apr 13, 2014, 5:20:56 AM4/13/14
to ope...@googlegroups.com, jdb...@diversit.eu
OK - got you :)


yes - OH can. But you might not need KNX for it.

I have following sample szenarios implemented:

1. have a KNX group address defined for all lights OFF - when i press the same - a OH rule gets activated and is posting the OFF command to my AVR (check the pioneer AVR binding samples)
rule "AV LeaveHome"
when
    Item Light_Zentralfunktionen_AllesAus received command OFF
then
    AV_Pwr.sendCommand(OFF)
end


2. have a knx based command that activates the AVR and set a specified state:
rule "RadioActivation"
when
    Item Light_EG_Kitchen_Wall1    received command ON
then
    if (RadioActivationHelper.state==ON)
        {
        AV_Pwr.sendCommand(ON)
        Thread::sleep(5000)
        AV_Volume_perc.postUpdate(35)
        Thread::sleep(2000)
        AV_Source.sendCommand(2)
        Thread::sleep(3000)
        Tags.sendCommand(ON)
        logInfo("In Schedule", "RadioActivation")
    }
    else {
        logInfo("Out Of schedule", "RadioActivation")
    }
end


3. i can control using OH interfaces (apps/ classic UI) as well the on/off state, the functions of the AVR. I dont need KNX for that as the AVR is connected to the LAN

Ther ON/OFF state is kept in the item/ in OH and - again the pioneer AVR as a sample - can be read from the binding. As well you can try to get the on/off state with the networkhealth binding - which is pinging a machine if its alive or not.

hope that helps to clarify.
Cheers
Karsten

karsten.k...@gmail.com

unread,
Apr 13, 2014, 5:23:33 AM4/13/14
to ope...@googlegroups.com, jdb...@diversit.eu
just one thing i have forgotten. if you create dummy addresses in KNX you also can hold the status in your KNX panle.
 Karsten
Reply all
Reply to author
Forward
0 new messages