Hi there,
after some days of fiddling around I got some results.
For those who are interested, hereâs how I got the connection between my Busch-JĂ€ger free@home and openHAB up and running:
My Items File looks like this:
Group zuhause "Home" <house>
Group Keller "Keller" <cellar> (zuhause)
Group EG "EG" <groundfloor> (zuhause)
Group OG "OG" <attic> (zuhause)
Group Keller_Vorkeller "Vorkeller" <cellar> (zuhause, Keller)
Switch ABB1xxxxxxxx_ch0002
"Vorkeller [%s]" <light> (Keller_Vorkeller, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0002/off]"}
Group Keller_Office "BĂŒro" <office> (zuhause, Keller)
Switch ABB1xxxxxxxx_ch0000
"Tische [%s]" <light> (Keller_Office, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0000/off]"}
Switch ABB1xxxxxxxx_ch0001
"Mitte [%s]" <light> (Keller_Office, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0001/off]"}
Rollershutter ABBx1xxxxxxx_ch0001
"BĂŒro Jalousie" <rollershutter> (Keller_Office, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0001/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0001/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0001/stop]"}
Rollershutter ABBx1xxxxxxx_ch0002
"Keller Jalousie" <rollershutter> (Keller_Office, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0002/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0002/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0002/stop]"}
Group EG_Garderobe "Garderobe" <wardrobe> (zuhause, EG)
Switch ABB2xxxxxxxx_ch0001
"Garderobe [%s]" <light> (EG_Garderobe, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0001/off]"}
Rollershutter ABBx2xxxxxxx_ch0000
"Garderobe Jalousie" <rollershutter> (EG_Garderobe, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0000/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0000/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0000/stop]"}
Group EG_Gast "Gast" <guest> (zuhause, EG)
Switch ABB2xxxxxxxx_ch0003
"GĂ€stezimmer [%s]" <light> (EG_Gast, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0003/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0003/off]"}
Rollershutter ABBx3xxxxxxx_ch0003
"Gast Jalousie" <rollershutter> (EG_Gast, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0003/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0003/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0003/stop]"}
Group EG_Essen "Essen" (zuhause, EG)
Switch ABB7xxxxxxxx_ch0003
"Essen [%s]" <light> (EG_Essen, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0003/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0003/off]"}
Rollershutter ABBx2xxxxxxx_ch0003
"Essen Jalousie" <rollershutter> (EG_Essen, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0003/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0003/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0003/stop]"}
Group EG_Flur "Flur EG" <frontdoor> (zuhause, EG)
Switch ABB7xxxxxxxx_ch0000
"Flur EG [%s]" <light> (EG_Entrance, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0000/off]"}
Switch ABB1xxxxxxxx_ch0003
"Fensterlichter EG [%s]" <light> (EG_Entrance, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0003/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB1xxxxxxxx/ch0003/off]"}
Rollershutter ABBx1xxxxxxx_ch0000
"Flur EG Jalousie" <rollershutter> (EG_Entrance, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0000/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0000/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx1xxxxxxx/ch0000/stop]"}
Group EG_Kueche "KĂŒche" <kitchen> (zuhause, EG)
Switch ABB2xxxxxxxx_ch0002
"KĂŒche [%s]" <light> (EG_Kueche, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0002/off]"}
Switch ABB7xxxxxxxx_ch0001
"Kochen [%s]" <light> (EG_Kueche, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0001/off]"}
Switch ABB4xxxxxxxx_ch0002
"HĂ€ngeschrankleuchten [%s]" <light> (EG_Kueche, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB4xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB4xxxxxxxx/ch0002/off]"}
Rollershutter ABBx2xxxxxxx_ch0001
"KĂŒche Fenster Jalousie" <rollershutter> (EG_Kitchen, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0001/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0001/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0001/stop]"}
Rollershutter ABBx2xxxxxxx_ch0002
"KĂŒche TĂŒr Jalousie" <rollershutter> (EG_Kitchen, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0002/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0002/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx2xxxxxxx/ch0002/stop]"}
Group EG_Wohnen "Wohnen" <sofa> (zuhause, EG)
Switch ABB7xxxxxxxx_ch0002
"Wohnen [%s]" <light> (EG_Wohnen, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB7xxxxxxxx/ch0002/off]"}
Switch ABB4xxxxxxxx_ch0000
"Anbauwand [%s]" <light> (EG_Wohnen, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB4xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB4xxxxxxxx/ch0000/off]"}
Switch ABB4xxxxxxxx_ch0001
"Subwoofer [%s]" <poweroutlet> (EG_Wohnen, Power)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB4xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/dimmer/ABB4xxxxxxxx/ch0001/off]"}
Rollershutter ABBx3xxxxxxx_ch0001
"Wohnen Jalousie West" <rollershutter> (EG_Wohnen, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0001/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0001/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0001/stop]"}
Rollershutter ABBx3xxxxxxx_ch0002
"Wohnen Jalousie Nord" <rollershutter> (EG_Wohnen, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0002/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0002/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0002/stop]"}
Group EG_Terrasse "Terrasse" <terrace> (zuhause, EG)
Switch ABB6xxxxxxxx_ch0000
"Terrasse Licht [%s]" <light> (EG_Terrasse, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0000/off]"}
Switch ABB6xxxxxxxx_ch0003
"AuĂen Licht [%s]" <light> (EG_Terrasse, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0003/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0003/off]"}
Switch ABB6xxxxxxxx_ch0001
"Terrasse Steckdose [%s]" <poweroutlet> (EG_Terrasse, Power)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0001/off]"}
Switch ABB6xxxxxxxx_ch0002
"Strom auĂen [%s]" <poweroutlet> (EG_Terrasse, Power)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB6xxxxxxxx/ch0002/off]"}
Rollershutter ABBx3xxxxxxx_ch0000
"Terrasse Jalousie" <rollershutter> (EG_Terrasse, Shutters)
{ http=">[UP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0000/up] >[DOWN:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0000/down] >[STOP:GET:http://xxx.xxx.xxx.52:8080/set/shutter/ABBx3xxxxxxx/ch0000/stop]"}
Group OG_Flur "Flur OG" <corridor> (zuhause, OG)
Switch ABB3xxxxxxxx_ch0001
"Flur OG [%s]" <light> (OG_Flur, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0001/off]"}
Switch ABB3xxxxxxxx_ch0000
"Wandspots [%s]" <light> (OG_Flur, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0000/off]"}
Switch ABB5xxxxxxxx_ch0003
"Fensterlichter OG [%s]" <light> (OG_Flur, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0003/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0003/off]"}
Group OG_Kinder "Kinderzimmer" (zuhause, OG)
Switch ABB3xxxxxxxx_ch0002
"Kinderzimmer 1 [%s]" <light> (OG_Kinder, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0002/off]"}
Switch ABB3xxxxxxxx_ch0003
"Kinderzimmer 2 [%s]" <light> (OG_Kinder, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0003/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB3xxxxxxxx/ch0003/off]"}
Group OG_Bad "Bad" (zuhause, OG)
Switch ABB5xxxxxxxx_ch0001
"Bad Licht [%s]" <light> (OG_Bad, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0001/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0001/off]"}
Switch ABB5xxxxxxxx_ch0002
"Heizkörper Steckdose [%s]" <poweroutlet> (OG_Bad, Power)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0002/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0002/off]"}
Group OG_Schlafen "Schlafzimmer" <bedroom_red> (zuhause, OG)
Switch ABB5xxxxxxxx_ch0000
"Schlafzimmer [%s]" <light> (OG_Schlafen, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB5xxxxxxxx/ch0000/off]"}
Group OG_Dach "Dach" <roof> (zuhause, OG)
Switch ABB2xxxxxxxx_ch0000
"Dach [%s]" <light> (EG_Dach, Lights)
[ "Lighting"]
{ http=">[ON:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0000/on] >[OFF:GET:http://xxx.xxx.xxx.52:8080/set/switch/ABB2xxxxxxxx/ch0000/off]"}
Group:Switch:OR(ON, OFF) Lights "Lights" <light> (zuhause)
Group:Rollershutter:OR(UP, DOWN) Shutters "Rollershutters" <rollershutter> (zuhause)
Group:Switch:OR(ON, OFF) Power "Power outlets" <poweroutlet> (zuhause)
I named the items âactor-id_channel-numberâ for easier addressing in the later used rule file.
For some reason I did not get it running to switch AND get the state at the same time. Sometimes you change the state of a lam by physical switch an the the state was wrong. So I coded this rules file:
rule "GetStates"
when
Time cron "0 0/1 * 1/1 * ? *"
then
var String state
var String url
var String item
var String actor
var String channel
var switchActors = newArrayList('ABB1xxxxxxxx','ABB2xxxxxxxx','ABB3xxxxxxxx','ABB4xxxxxxxx','ABB5xxxxxxxx','ABB6xxxxxxxx','ABB7xxxxxxxx')
for (i : 0 ..< switchActors.length) {
actor = switchActors.get(i)
for (j : 0 .. 3) {
channel = 'ch000' + j
item = actor + '_' + channel
url = 'http://xxx.xxx.xxx.52:8080/info/' + actor + '/' + channel + '/idp0000'
state = sendHttpGetRequest(url)
postUpdate(item, transform('MAP','bjstate.map',state))
}
}
end
This runs every minute by cron and has a list of all my actors (yes I know actuators would be right but I always mistyped it ).
The loop cycles through the list and through all 4 channels, puts together the GET url (e.g. ttp://xxx.xxx.xxx.52:8080/info/ABB1xxxxxxxx/ch0000/idp0000) and postUpdates the items transformed state.
The bjstate.map only has
0=OFF
1=ON
"0"=OFF
"1"=ON
in itself.
HomeKit connection is working for all Lights.
Next steps are:
- return the state of the roller shutters (open, closed, % open)
- HomeKit-enable roller shutters
- access the B-J f@h scenes via openHAB
Who may have already done that - help is appreciated.
Also I would like to hear some feedback - did I do it too complex? Are there ways for optimizing? I tried to get all actuators IDâs via jsonPATH but gloriously failed
Thomas