Dear all,
during my migration journey from OH2.5 to 3.0 I also tried to get my head around the semantic modelling. I never used this in OH2.5 but decided to re-model my whole items setup to get the benefit out of all the amazing new possibilities coming with MainUI and its automatically created HomePage.
I played a little bit with different combinations of locations, equipment and points and got more and more confused bringing me to this point not being sure if I just don’t get how all of this works or maybe found some bugs/issues.
Will try to explain the reasons for my headache. Maybe some of you can help me to get around this. Esp. pinging @ysc as the mastermind behind all this great stuff.
Location card badges
According to [Design/Spec] Location semantic cards: header · Issue #556 · openhab/openhab-webui · GitHub badges should work like this, right?
- Expecting the same behavior for lights and alarms
- But I can just get an alarm badge when placing the alarm points directly under the location
- All combinations with alarm points nested in equipment gives no badges
- while it is working for lights
// Points attached to Equipment
Group g2 "Group Sub-Location 1" (g1) ["Room"]
Group e1 "Group Equipment 1 for Sub-L1" (g2) ["Lightbulb"]
Switch s1 "Switch 1 for E1" (e1) ["Switch", "Light"]
Switch s2 "Switch 2 for E1" (e1) ["Switch", "Light"]
Group e2 "Group Equipment 2 for Sub-L1" (g2) ["Siren"]
Switch s3 "Switch 1 for E2" (e2) ["Alarm", "Temperature"]
Switch s4 "Switch 2 for E2" (e2) ["Alarm", "Temperature"]
// Points straight under Location
Group g4 "Group Sub-Location 3" (g1) ["Room"]
Switch s9 "Switch 1 for Sub-L3" (g4) ["Switch", "Light"]
Switch s10 "Switch 2 for Sub-L3" (g4) ["Switch", "Light"]
Switch s11 "Switch 3 for Sub-L3" (g4) ["Alarm", "Temperature"]
Switch s12 "Switch 4 for Sub-L3" (g4) ["Alarm", "Temperature"]
- Badges for nested Equipment
- Having a sub-equipment nested in another equipment produces no badges at all
- I think that’s the intended behavior
- but leads to quite overloaded location cards, e.g. when having several Z-wave dimmers
- dimmer should be right there when clicking the location ->
["Lightbulb"]
- alarm channels (up 3 per dimmer) should be considered additional information not needed at first sight to keep the card clean
- => nested in a sub-equipment => no badges
- dimmer should be right there when clicking the location ->
- Do I miss something?
Location card hierarchy
- Let’s assume having a room with 2 equipment with 2 points each
- Placing equipment in the room and points in equipment shows the points straight away with equipment as headline
- Placing equipment in the room but points as part of sub-equipment shows the equipment as link
- clicking this link opens a popup with the sub-equipments further linked to the points
- Why not showing equipment as headline (like case1) and provide the sub-equipments as links
- Why do I feel this is important (besides saving 1 click)? … see case 3 below
- With the current behavior a combination of case1 & 2 to model your equipment with “main functionality” (directly accessible) and some nested sub-equipment for advanced features doesn’t work (or at least I didn’t find a way to do this)
- All the points attached to the main equipment are shown under the headline as in case 1
- this works even for points that are groups themselves
- but points nested in sub-equipment is not there at all
- so no chance to reach this points from the location card
- btw it’s the same for the equipment tab
- while points of sub-equipment are listed correct under properties tab
// Mixed Modell
Group g7 "Group Sub-Location 6" (g1) ["Room"]
Group e13 "Group Equipment 7 for Sub-L6" (g7) ["Lightbulb"]
Switch s21 "Switch 1 for E7" (e13) ["Switch", "Light"]
Switch s22 "Switch 2 for E7" (e13) ["Switch", "Light"]
Group:Switch:OR(ON,OFF) e14 "Group Sub-Equipment 7 for E7" (e13) ["Siren"]
Switch s23 "Switch 1 for Sub-E7" (e14) ["Alarm", "Temperature"]
Switch s24 "Switch 2 for SubE-7" (e14) ["Alarm", "Temperature"]
Group:Dimmer:AVG p4 "Group Point 4 for E7" (e13) ["Measurement", "Temperature"]
Dimmer n11 "Number 1 for P4" (p4)
Dimmer n12 "Number 2 for P4" (p4)
Group no5 "Group NoSemantic 5 for E7" (e13)
String t11 "Text 1 for No5" (no5)
String t12 "Text 2 for No5" (no5)
Hope by writing this I did not confuse you guys as I’m confused right now
May be you can help me sort this out…
Complete items file I used for testing as reference
Group g1 "Group Location" ["Location"]
// Points attached to Equipment
Group g2 "Group Sub-Location 1" (g1) ["Room"]
Group e1 "Group Equipment 1 for Sub-L1" (g2) ["Lightbulb"]
Switch s1 "Switch 1 for E1" (e1) ["Switch", "Light"]
Switch s2 "Switch 2 for E1" (e1) ["Switch", "Light"]
Group e2 "Group Equipment 2 for Sub-L1" (g2) ["Siren"]
Switch s3 "Switch 1 for E2" (e2) ["Alarm", "Temperature"]
Switch s4 "Switch 2 for E2" (e2) ["Alarm", "Temperature"]
Group e3 "Group Equipment 3 for Sub-L1" (g2) ["Sensor"]
Dimmer n1 "Number 1 for E3" (e3) ["Measurement", "Temperature"]
Dimmer n2 "Number 2 for E3" (e3) ["Measurement", "Temperature"]
Group no1 "Group NoSemantic 1 for Sub-L1" (g2)
String t1 "Text 1 for No1" (no1)
String t2 "Text 2 for No1" (no1)
// Points attached to Sub-Equipment
Group g3 "Group Sub-Location 2" (g1) ["Room"]
Group e4 "Group Equipment 4 for Sub-L2" (g3) ["Equipment"]
Group e5 "Group Sub-Equipment 1 for E4" (e4) ["Lightbulb"]
Switch s5 "Switch 1 for Sub-E1" (e5) ["Switch", "Light"]
Switch s6 "Switch 2 for Sub-E1" (e5) ["Switch", "Light"]
Group e6 "Group Sub-Equipment 2 for E4" (e4) ["Siren"]
Switch s7 "Switch 1 for Sub-E2" (e6) ["Alarm", "Temperature"]
Switch s8 "Switch 2 for Sub-E2" (e6) ["Alarm", "Temperature"]
Group e7 "Group Sub-Equipment 3 for E4" (e4) ["Sensor"]
Dimmer n3 "Number 1 for Sub-E3" (e7) ["Measurement", "Temperature"]
Dimmer n4 "Number 2 for Sub-E3" (e7) ["Measurement", "Temperature"]
Group no2 "Group NoSemantic 2 for E4" (e4)
String t3 "Text 1 for No2" (no2)
String t4 "Text 2 for No2" (no2)
// Points straight under Location
Group g4 "Group Sub-Location 3" (g1) ["Room"]
Switch s9 "Switch 1 for Sub-L3" (g4) ["Switch", "Light"]
Switch s10 "Switch 2 for Sub-L3" (g4) ["Switch", "Light"]
Switch s11 "Switch 3 for Sub-L3" (g4) ["Alarm", "Temperature"]
Switch s12 "Switch 4 for Sub-L3" (g4) ["Alarm", "Temperature"]
Dimmer n5 "Number 1 for Sub-L3" (g4) ["Measurement", "Temperature"]
Dimmer n6 "Number 2 for Sub-L3" (g4) ["Measurement", "Temperature"]
String t5 "Text 1 for Sub-L3" (g4)
String t6 "Text 2 for Sub-L3" (g4)
// Points attached to Sub-Equipment with Group-Agg
Group g5 "Group Sub-Location 4" (g1) ["Room"]
Group:Switch:OR(ON,OFF) e8 "Group Equipment 5 for Sub-L4" (g5) ["Equipment"]
Group:Switch:OR(ON,OFF) e9 "Group Sub-Equipment 4 for E5" (e8) ["Lightbulb"]
Switch s13 "Switch 1 for Sub-E4" (e9) ["Switch", "Light"]
Switch s14 "Switch 2 for Sub-E4" (e9) ["Switch", "Light"]
Group:Switch:OR(ON,OFF) e10 "Group Sub-Equipment 5 for E5" (e8) ["Siren"]
Switch s15 "Switch 1 for Sub-E5" (e10) ["Alarm", "Temperature"]
Switch s16 "Switch 2 for Sub-E5" (e10) ["Alarm", "Temperature"]
Group:Dimmer:AVG e11 "Group Sub-Equipment 6 for E5" (e8) ["Sensor"]
Dimmer n7 "Number 1 for Sub-E6" (e11) ["Measurement", "Temperature"]
Dimmer n8 "Number 2 for Sub-E6" (e11) ["Measurement", "Temperature"]
Group no3 "Group NoSemantic 3 for E5" (e8)
String t7 "Text 1 for No3" (no3)
String t8 "Text 2 for No3" (no3)
// Points as Groups with Group-Agg under Equipment
Group g6 "Group Sub-Location 5" (g1) ["Room"]
Group e12 "Group Equipment 6 for Sub-L5" (g6) ["Equipment"]
Group:Switch:OR(ON,OFF) p1 "Group Point 1 for E6" (e12) ["Switch", "Light"]
Switch s17 "Switch 1 for P1" (p1) //["Switch", "Light"]
Switch s18 "Switch 2 for P1" (p1) //["Switch", "Light"]
Group:Switch:OR(ON,OFF) p2 "Group Point 2 for E6" (e12) ["Alarm", "Temperature"]
Switch s19 "Switch 1 for P2" (p2) //["Alarm", "Temperature"]
Switch s20 "Switch 2 for P2" (p2) //["Alarm", "Temperature"]
Group:Dimmer:AVG p3 "Group Point 3 for E6" (e12) ["Measurement", "Temperature"]
Dimmer n9 "Number 1 for P3" (p3) //["Measurement", "Temperature"]
Dimmer n10 "Number 2 for P3" (p3) //["Measurement", "Temperature"]
Group no4 "Group NoSemantic 4 for E6" (e12)
String t9 "Text 1 for No4" (no4)
String t10 "Text 2 for No4" (no4)
// Mixed Modell
Group g7 "Group Sub-Location 6" (g1) ["Room"]
Group e13 "Group Equipment 7 for Sub-L6" (g7) ["Lightbulb"]
Switch s21 "Switch 1 for E7" (e13) ["Switch", "Light"]
Switch s22 "Switch 2 for E7" (e13) ["Switch", "Light"]
Group:Switch:OR(ON,OFF) e14 "Group Sub-Equipment 7 for E7" (e13) ["Siren"]
Switch s23 "Switch 1 for Sub-E7" (e14) ["Alarm", "Temperature"]
Switch s24 "Switch 2 for SubE-7" (e14) ["Alarm", "Temperature"]
Group:Dimmer:AVG p4 "Group Point 4 for E7" (e13) ["Measurement", "Temperature"]
Dimmer n11 "Number 1 for P4" (p4) //["Measurement", "Temperature"]
Dimmer n12 "Number 2 for P4" (p4) //["Measurement", "Temperature"]
Group no5 "Group NoSemantic 5 for E7" (e13)
String t11 "Text 1 for No5" (no5)
String t12 "Text 2 for No5" (no5)