semanticHomeMenu for openHAB 4 - Discussions

Ah, sorry, overseen the group memberships. Sorry, but this does not look right.

The group

Group    gEquipFamilyRoomLights         "Family Room Lights"          <material:lightbulb>                (gLocMainFloorFamilyRoom)      ["Lightbulb"]

needs to have a different Tag, otherwise the brightness controls will not be seen.
Please change Tag and Metadata to

Group    gEquipFamilyRoomLights         "Family Room Lights"          <material:lightbulb>                (gLocMainFloorFamilyRoom)      ["DimmableLight"] {uiSemantics="uiSemantics"[preposition=" in the", equipment="Ceiling Light", location="Bathroom"}

The Item

Dimmer              MainFloor_FirePlaceLights_Dimmmer                  "Fire Place Lights"                       <light>             (gEquipFamilyRoomLights)                                                                    ["Control","Light"]           {channel="mqtt:homie300:Queen:dimmer-4ab35c1:dimmer#dimmer", OccupancyEvent = "Switch"}

is member of

Group    gEquipFamilyRoomLights         "Family Room Lights"          <material:lightbulb>                (gLocMainFloorFamilyRoom)      ["DimmableLight"]

Therefore, the naming needs to be

Dimmer              gEquipFamilyRoomLights_brightness               "Fire Place Lights"                       <light>             (gEquipFamilyRoomLights)                                                                    ["Control","Light"]           {uiSemantics="uiSemantics"[preposition=" in the", equipment="Ceiling Light", location="Bathroom"],channel="mqtt:homie300:Queen:dimmer-4ab35c1:dimmer#dimmer", OccupancyEvent = "Switch"}

Please note, you can have as many lights in a location as you wish, but each light needs it’s own equipment group and the Points (Items) in the group follow this naming:

EquipmentGroupName + "_" + ControlType[switch/brightness/colorTemperature/color]
1 Like

Hi.
Look at his gitbub: GitHub - hmerk/semanticHomeMenu
There are all “redme files” + demo.items to help you.
And yes, you must follow the naming of the items.

BR

1 Like

After reviewing the Semantic Model docs - I don’t see DimmableLight in the list of points/properties. Has this list changed?

Do equipment group names have to follow the naming convention of the individual items? Can I create a group to contain all the lights and then add that to the equipment group if I want to control them together?

No, as written in the docs, DimmableLight is a non semantic tag to be entered manually.

The following might make the naming it a bit clearer.
image


Never tried before, but just proofed it working, see following screenshots
image



1 Like

Here is what I put together from the posts here and example files on github with the help of Gemini and Claude. Does this look right?

semanticUI Integration Key Findings

Overview

The semanticUI has specific requirements and conventions that differ from openHAB’s core semantic model in several important ways. This document captures key findings about how to properly integrate with semanticUI.

Location and Equipment Groups

Location Structure

  • Uses standard openHAB location hierarchy: Building → Floor → Room
  • Locations should have proper semantic tags (e.g., [“Room”], [“Kitchen”])
  • Location groups follow format: gLoc[LocationName]

Equipment Groups

Two approaches are possible:

  1. Individual Equipment Groups

    • Each device gets its own equipment group
    • Must be tagged with [“Lightbulb”]
    • Requires uiSemantics metadata
    Group    KitchenUnderCabinet    "Under Cabinet"    (gEquipKitchenLights)    ["Lightbulb"]    
    {uiSemantics="uiSemantics"[preposition="in the", equipment="Under Cabinet Lights", location="Kitchen"]}
    
  2. Consolidated Equipment Groups

    • Single group contains multiple related devices
    • More efficient for devices that are typically controlled together
    • Still requires proper tagging and metadata
    Group    gEquipKitchenLights    "Kitchen Lights"    (gLocKitchen)    ["Lightbulb"]
    

UI Semantics Metadata

  • Required format: {uiSemantics="uiSemantics"[preposition="...", equipment="...", location="..."]}
  • Prepositions affect display (“in the”, “on the”)
  • Equipment name is used for display and grouping
  • Location must match semantic model location

Display and Card Badges

  • Light status badges appear when Points are properly tagged with [“Control”, “Light”] or [“Switch”, “Light”]
  • Equipment must be tagged with [“Lightbulb”] to appear in lighting controls
  • Can use widgetOrder metadata to control display order

Key Differences from Core Semantic Model

  1. Uses its own metadata schema (uiSemantics)
  2. Has specific requirements for equipment grouping
  3. More flexible in allowing consolidated equipment groups
  4. Specific tag requirements for badge display

Light Item Requirements

Simple Switch Light

// Equipment Group
Group    CeilingLightOffice    "Ceiling Light"    (gOffice)    ["Lightbulb"]    
    {uiSemantics="uiSemantics"[preposition=" in the ", equipment="Ceiling Light", location="Office"]}

// Switch Item - Must end with _switch
Switch   CeilingLightOffice_switch    "Ceiling Light"    (CeilingLightOffice)    ["Light", "Switch"]    
    {uiSemantics="uiSemantics"[preposition=" in the ", equipment="Ceiling Light", location="Office"]}

Color Light

// Equipment Group
Group    ColorLightOffice    "Color Light Office"    (gOffice)    ["Lightbulb"]    
    {uiSemantics="uiSemantics"[preposition=" in the ", equipment="Color Light", location="Office"]}

// Required Items - Must use exact suffixes
Dimmer   ColorLightOffice_brightness         "Brightness"          (ColorLightOffice)    ["Point", "Control"]
Dimmer   ColorLightOffice_colorTemperature   "Color Temperature"   (ColorLightOffice)    ["Control", "ColorTemperature"]
Color    ColorLightOffice_color              "Color"              (ColorLightOffice)    ["Control", "Light"]

Dimmable Light

// Equipment Group
Group    DimmableLightOffice    "Dimmable Light Office"    (gOffice)    ["Lightbulb"]    
    {uiSemantics="uiSemantics"[preposition=" in the ", equipment="Dimmable Light", location="Office"]}

// Required Item - Must end with _brightness
Dimmer   DimmableLightOffice_brightness    "Brightness"    (DimmableLightOffice)    ["Point", "Control"]

Critical Points

  1. Item Naming Suffixes:

    • Switch lights must end with _switch
    • Dimmable lights must end with _brightness
    • Color lights need _brightness, _colorTemperature, and _color
  2. Required Tags:

    • Equipment groups must have [“Lightbulb”]
    • Switch items need [“Light”, “Switch”]
    • Dimmer/Control items need [“Point”, “Control”] or [“Control”, “Light”]
    • Color temperature needs [“Control”, “ColorTemperature”]
  3. Group Membership:

    • Each control item must be a member of its equipment group
    • Equipment groups must be members of their location group

Best Practices

  1. Use consolidated equipment groups for devices typically controlled together
  2. Maintain consistent prepositions within locations
  3. Keep equipment names user-friendly as they appear in UI
  4. Ensure proper tag hierarchy for badge display
3 Likes

The leading “gLoc” is not needed, it might be your favour :wink:

1 Like

I have been playing with this, hoping to start using the semanticHomeMenu. I have been somewhat baffled on some of the Light Items that i have created. They do not show up for all semantic classes. A good example in my case is that if i set my lightbulb as being in garden or veranda or patio, porch. I wanted to set my outdoor lights but they simply donot show up but as soon I choose room they do show up. Where is this defined?

You can add Room as a non semantic tag to those not showing up.

Thank you. Iam not sure if iam doing the right thing. example, if I have location Garden with semantic class of garden. No lights shows up. If i remove this semantic class and add non-Semantic tag of Room. The semantic class for this Garden is set to Room.

I guess my question is some semantic classes donot allow light to be displayed. why is it behaving that way. i am probably missed the whole point.

The menu is looking for a Room tag, no matter if it is a semantic tag or a non semantic.
You can leave your garden like it is/was, just add Room under non semantic tags.

Thank you for the clarification.