openHAB 4.0 SNAPSHOT discussion

I don’t know what else shoud I change. I’ve removed stick as a file, copied name and added from UI. Everything is online, but it still doesn’t work.

Edit:
It seems it was a hardware issue, something got locked - unplug and plug in again a stick helped.

Dear All

are there any issues concerning options items?

    - component: oh-list-card
      config:
        accordionList: false
        title: =props.title
      slots:
        default:
          - component: oh-label-item
            config:
              icon: f7:thermometer
              iconColor: '=(items[props.current_temperature_Item].state as Number > 0 && items[props.current_temperature_Item].state as Number <= 10 ) ? "purple" : (items[props.current_temperature_Item].state as Number > 10 && items[props.current_temperature_Item].state as Number <= 13 ) ? "lightblue" : (items[props.current_temperature_Item].state as Number > 13 && items[props.current_temperature_Item].state as Number <=17 ) ? "yellow" :  (items[props.current_temperature_Item].state as Number > 17 && items[props.current_temperature_Item].state as Number <=20 ) ? "orange" :  (items[props.current_temperature_Item].state as Number > 20 && items[props.current_temperature_Item].state as Number <=25 ) ? "red" : (items[props.current_temperature_Item].state as Number > 25 && items[props.current_temperature_Item].state as Number <=60 ) ? "purple" : "black"'
              item: =[props.current_temperature_Item]
              title: Temperature
          - component: oh-slider-item
            config:
              icon: f7:thermometer
              iconColor: '=(items[props.current_heating_setpoint_Item].state > 0 && items[props.current_heating_setpoint_Item].state <= 10 ) ? "purple" : (items[props.current_heating_setpoint_Item].state > 10 && items[props.current_heating_setpoint_Item].state <= 13 ) ? "lightblue" : (items[props.current_heating_setpoint_Item].state > 13 && items[props.current_heating_setpoint_Item].state <=17 ) ? "yellow" :  (items[props.current_heating_setpoint_Item].state > 17 && items[props.current_heating_setpoint_Item].state <=20 ) ? "orange" :  (items[props.current_heating_setpoint_Item].state > 20 && items[props.current_heating_setpoint_Item].state <=25 ) ? "red" : (items[props.current_heating_setpoint_Item].state > 25 && items[props.current_heating_setpoint_Item].state <=60 ) ? "purple" : "black"'
              item: =[props.current_heating_setpoint_Item]
              label: true
              max: 30
              min: 5
              scale: true
              step: 0.5
              title: Current Heating Setpoint
              unit: °C
          - component: oh-label-item
            config:
              icon: f7:thermometer
              iconColor: '=(items[props.current_heating_setpoint_Item].state > 0 && items[props.current_heating_setpoint_Item].state <= 10 ) ? "purple" : (items[props.current_heating_setpoint_Item].state > 10 && items[props.current_heating_setpoint_Item].state <= 13 ) ? "lightblue" : (items[props.current_heating_setpoint_Item].state > 13 && items[props.current_heating_setpoint_Item].state <=17 ) ? "yellow" :  (items[props.current_heating_setpoint_Item].state > 17 && items[props.current_heating_setpoint_Item].state <=20 ) ? "orange" :  (items[props.current_heating_setpoint_Item].state > 20 && items[props.current_heating_setpoint_Item].state <=25 ) ? "red" : (items[props.current_heating_setpoint_Item].state > 25 && items[props.current_heating_setpoint_Item].state <=60 ) ? "purple" : "black"'
              item: =[props.current_heating_setpoint_Item]
              title: Current Heating Setpoint
          - component: oh-list-item
            config:
              action: options
              actionItem: props.system_mode_Item
              actionOptions: off,heat
              after: =items[props.system_mode_Item].state
              icon: '=(items[props.system_mode_Item].state === "heat") ? "f7:flame" : (items[props.system_mode_Item].state === "off") ? "f7:power" : "f7:exclamationmark_circle" '
              iconColor: '=(items[props.system_mode_Item].state === "heat") ? "purple" : (items[props.system_mode_Item].state === "off") ? "red" : "black" '
              title: System Mode

this line actionOptions: off,heat doesn’t work anymore, when clicked the options aren’t shown;
on stable version there are no issue

I try also inserting a option item manually in design mode in a new page (no widget) and it doesn’t work.

Maybe I miss some reccomanded configurations?

following the full code of the widget

uid: OH_Livio_Zigbee_TRV_Aqara
tags: []
props:
  parameters:
    - description: Title
      label: Title
      name: title
      required: false
      type: TEXT
    - context: item
      description: Item For Current Temperature
      label: Item For Current Tempoerature
      name: current_temperature_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Current Heating Setpoint
      label: Item For Current Heating Setpoint
      name: current_heating_setpoint_Item
      required: false
      type: TEXT
    - context: item
      description: Item For System Mode
      label: Item For System Mode
      name: system_mode_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Preset (Mode)
      label: Item For Preset (Mode)
      name: preset_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Child Lock
      label: Item For Child Lock
      name: child_lock_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Window Detection
      label: Item For Window Open Detection
      name: window_detection_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Battery
      label: Item For Battery
      name: battery_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Last Seen
      label: Item For Last Seen
      name: lastseen_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Away Preset Temperature
      label: Item For Away Preset Temperature
      name: away_preset_temperature_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Sensor
      label: Item For Sensor
      name: sensor_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Calibrated
      label: Item For Calibrated
      name: calibrated_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Window Open
      label: Item For Window Open
      name: window_open_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Valve Detection
      label: Item For Valve Detection
      name: valve_detection_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Link Quality
      label: Item For Link Quality
      name: linkquality_Item
      required: false
      type: TEXT
    - context: item
      description: Item For Voltage
      label: Item For Voltage
      name: voltage_Item
      required: false
      type: TEXT
    - description: Show info
      label: Show Info
      name: showInfo
      required: false
      type: BOOLEAN
    - context: page + widget
      description: Page or Widget to Show
      label: Page or Widget to Show
      name: pagetoShow
      required: false
      type: TEXT
    - context: action
      description: "action to perform (values: popover, popup)"
      label: action
      name: actionToDo
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Jan 8, 2023, 3:33:36 AM
component: f7-block
config:
  style:
    position: relative
    -ms-user-select: None
    -moz-user-select: None
    -webkit-user-select: None
    user-select: None
  class:
    - no-padding
    - no-margin
slots:
  default:
    - component: oh-list-card
      config:
        title: =props.title
        accordionList: false
      slots:
        default:
          - component: oh-label-item
            config:
              title: Temperature
              item: =[props.current_temperature_Item]
              icon: f7:thermometer
              iconColor: '=(items[props.current_temperature_Item].state as Number > 0 && items[props.current_temperature_Item].state as Number <= 10 ) ? "purple" : (items[props.current_temperature_Item].state as Number > 10 && items[props.current_temperature_Item].state as Number <= 13 ) ? "lightblue" : (items[props.current_temperature_Item].state as Number > 13 && items[props.current_temperature_Item].state as Number <=17 ) ? "yellow" :  (items[props.current_temperature_Item].state as Number > 17 && items[props.current_temperature_Item].state as Number <=20 ) ? "orange" :  (items[props.current_temperature_Item].state as Number > 20 && items[props.current_temperature_Item].state as Number <=25 ) ? "red" : (items[props.current_temperature_Item].state as Number > 25 && items[props.current_temperature_Item].state as Number <=60 ) ? "purple" : "black"'
          - component: oh-slider-item
            config:
              title: Current Heating Setpoint
              icon: f7:thermometer
              iconColor: '=(items[props.current_heating_setpoint_Item].state > 0 && items[props.current_heating_setpoint_Item].state <= 10 ) ? "purple" : (items[props.current_heating_setpoint_Item].state > 10 && items[props.current_heating_setpoint_Item].state <= 13 ) ? "lightblue" : (items[props.current_heating_setpoint_Item].state > 13 && items[props.current_heating_setpoint_Item].state <=17 ) ? "yellow" :  (items[props.current_heating_setpoint_Item].state > 17 && items[props.current_heating_setpoint_Item].state <=20 ) ? "orange" :  (items[props.current_heating_setpoint_Item].state > 20 && items[props.current_heating_setpoint_Item].state <=25 ) ? "red" : (items[props.current_heating_setpoint_Item].state > 25 && items[props.current_heating_setpoint_Item].state <=60 ) ? "purple" : "black"'
              item: =[props.current_heating_setpoint_Item]
              min: 5
              max: 30
              label: true
              scale: true
              unit: °C
              step: 0.5
          - component: oh-label-item
            config:
              title: Current Heating Setpoint
              item: =[props.current_heating_setpoint_Item]
              icon: f7:thermometer
              iconColor: '=(items[props.current_heating_setpoint_Item].state > 0 && items[props.current_heating_setpoint_Item].state <= 10 ) ? "purple" : (items[props.current_heating_setpoint_Item].state > 10 && items[props.current_heating_setpoint_Item].state <= 13 ) ? "lightblue" : (items[props.current_heating_setpoint_Item].state > 13 && items[props.current_heating_setpoint_Item].state <=17 ) ? "yellow" :  (items[props.current_heating_setpoint_Item].state > 17 && items[props.current_heating_setpoint_Item].state <=20 ) ? "orange" :  (items[props.current_heating_setpoint_Item].state > 20 && items[props.current_heating_setpoint_Item].state <=25 ) ? "red" : (items[props.current_heating_setpoint_Item].state > 25 && items[props.current_heating_setpoint_Item].state <=60 ) ? "purple" : "black"'
          - component: oh-list-item
            config:
              title: System Mode
              action: options
              actionItem: =[props.system_mode_Item]
              actionOptions: off,heat
              after: =items[props.system_mode_Item].state
              icon: '=(items[props.system_mode_Item].state === "heat") ? "f7:flame" : (items[props.system_mode_Item].state === "off") ? "f7:power" : "f7:exclamationmark_circle" '
              iconColor: '=(items[props.system_mode_Item].state === "heat") ? "purple" : (items[props.system_mode_Item].state === "off") ? "red" : "black" '
          - component: oh-list-item
            config:
              title: Preset
              action: options
              actionItem: =[props.preset_Item]
              actionOptions: manual,auto,away
              after: =items[props.preset_Item].state
              icon: '=(items[props.preset_Item].state === "manual") ? "f7:hand_raised" :  (items[props.preset_Item].state === "auto") ? "f7:house" : (items[props.preset_Item].state === "away") ? "f7:circle_grid_hex" : "f7:exclamationmark_circle" '
              iconColor: '=(items[props.preset_Item].state === "manual") ? "red" :  (items[props.preset_Item].state === "auto") ? "green" : (items[props.preset_Item].state === "away") ? "blue" : "black" '



          - component: oh-list-item
            config:
              title: Lock
              action: options
              actionItem: =[props.child_lock_Item]
              actionOptions: LOCK, UNLOCK
              after: =items[props.child_lock_Item].state
              icon: '=(items[props.child_lock_Item].state === "LOCK" ) ? "f7:lock" : "f7:lock_open" '
              iconColor: '=(items[props.child_lock_Item].state === "LOCK" ) ? "green" : "red" '




          - component: oh-list-item
            config:
              title: Last Seen
              icon: '=(items[props.lastseen_Item].state.toString() === NULL ) ? "f7:exclamationmark_circle" : "f7:calendar" '
              iconColor: '=(items[props.lastseen_Item].state.toString() === NULL ) ? "black" : "orange" '
              item: =[props.lastseen_Item]
              after: =items[props.lastseen_Item].state
              action: =props.actionToDo
              actionModal: =props.pagetoShow
              actionModalConfig:
                system_mode_Item: =[props.system_mode_Item]
                preset_Item: =[props.preset_Item]
                away_preset_temperature_Item: =[props.away_preset_temperature_Item]
                child_lock_Item: =[props.child_lock_Item]
                sensor_Item: = [props.sensor_Item]
                calibrated_Item: = [props.calibrated_Item]
                window_detection_Item: =[props.window_detection_Item]
                window_open_Item: =[props.window_open_Item]
                valve_detection_Item: =[props.valve_detection_Item]
                battery_Item: =[props.battery_Item]
                voltage_Item: =[props.voltage_Item]
                linkquality_Item: =[props.linkquality_Item]

thanks in advance for your help

Option actions should continue to work. Are there any errors shown on the browser console when you click on the widget?

JustinG

this one

OK, that’s a newly introduced regression from this PR:

Edit:

Here’s the issue

I just upgraded to the latest SNAPSHOT (Build #3386) and since then my oh-cell have changed layout.

image

image

The f7-chips as f7-list-item have moved to the same line as the “Title”

I have two similasr setups and both affected.

I suspect that it has something to do with:

Code for the two cells is as follows?

Cell 1.txt (2.1 KB)
Cell 2.txt (3.5 KB)

Any suggestions please?

EDIT: This is what they used to look like

image
image

Fix PR is now open, see Fix action `options` regression by florian-h05 · Pull Request #1813 · openhab/openhab-webui · GitHub.

1 Like

@JustinG sorry to ping you. But i think you may know what the iisue could be in this?

Would you mind having a look?

I’m still on the 4.0 milestone, so I haven’t encountered this yet. The PR you’ve found is almost certainly the proximal cause. From the screen shots, it just looks like your items are now in a container with slightly different settings than before. Use the dev tools to check out the structure of the cell and see if there are flex options or display options that need to be adjusted to get your previous arrangement back.

If you still can’t get the format you want back, open up a new thread and the issue can get worked out there.

You should also probably file an issue citing that PR, the discussion there indicates that some downstream issues are expected from this, so you should make the devs aware.

I’ve just checked, the problem that @Mark_VG encounters is no regression from that PR, but a consequence of the fix.

Before the PR, the slot name was ignored and the f7-chips were placed “anywhere”. PR Pass slot names down in generic-widget-component by michalsrb · Pull Request #1798 · openhab/openhab-webui · GitHub fixed that, the f7-chips are now placed inside the title slot of f7-list-item, which is correct. To have them appear under the Lights via List title, they should go into the subtitile slot (see List Item Vue Component | Framework7 Vue Documentation for docs):

YAML code
component: oh-cell
config:
  on: true
  title: Lights via List
slots:
  default:
    - component: f7-list
      config:
        style:
          --f7-list-index-font-size: 1px
          --f7-list-index-item-height: 1px
          --f7-navbar-bg-color: white
          --f7-navbar-border-color: white
          --f7-navbar-font-size: 0px
          --f7-navbar-height: 0px
          --f7-navbar-link-color: black
          --f7-navbar-text-color: black
          z-index: 0
        virtualList: true
      slots:
        default:
          - component: oh-list-item
            config:
              action: popup
              actionModal: widget:ak_universal_switch_widget_v1-MVG
              actionModalConfig:
                closePopup: true
                colorItem: LoungeRoom_Color
                dimmerItem: LoungeRoom_Brightness
                header1: Lounge Lights
                sceneSelect: LoungeRoom_Scene
                switchItem: LoungeRoom_Switch
                tempItem: LoungeRoom_ColorTemperature
              icon: f7:lightbulb
              iconColor: '=(items.LoungeRoom_Switch.state === "ON") ? "null" : "gray"'
              iconUsesState: true
              title: Lounge Lights
          - component: oh-list-item
            config:
              action: popup
              actionModal: widget:ak_universal_switch_widget_v1-MVG
              actionModalConfig:
                closePopup: true
                colorItem: RileyRoom_Color
                dimmerItem: RileyRoom_Brightness
                header1: Riley Lights
                sceneSelect: RileyRoom_Scene
                switchItem: RileyRoom_Switch
                tempItem: RileyRoom_ColorTemperature
              icon: f7:lightbulb
              iconColor: '=(items.RileyRoom_Switch.state === "ON") ? "null" : "gray"'
              iconUsesState: true
              title: Riley Lights
          - component: oh-list-item
            config:
              action: popup
              actionModal: widget:ak_universal_switch_widget_v1-MVG
              actionModalConfig:
                closePopup: true
                colorItem: EthanRoom_Color
                dimmerItem: EthanRoom_Brightness
                header1: Ethan Lights
                sceneSelect: EthanRoom_Scene
                switchItem: EthanRoom_Switch
                tempItem: EthanRoom_ColorTemperature
              icon: f7:lightbulb
              iconColor: '=(items.EthanRoom_Switch.state === "ON") ? "null" : "gray"'
              iconUsesState: true
              title: Ethan Lights
  header:
    - component: f7-list
      config:
        mediaList: true
      slots:
        default:
          - component: f7-list-item
            config:
              title: Lights via List
            slots:
              subtitle:
                - component: f7-chip
                  config:
                    icon-color: '=(items.LoungeRoom_Switch.state === "ON") ? "null" : "gray"'
                    iconF7: lightbulb
                    text: Lounge
                - component: f7-chip
                  config:
                    icon-color: '=(items.RileyRoom_Switch.state === "ON") ? "null" : "gray"'
                    iconF7: lightbulb
                    text: Riley
                - component: f7-chip
                  config:
                    icon-color: '=(items.EthanRoom_Switch.state === "ON") ? "null" : "gray"'
                    iconF7: lightbulb
                    text: Ethan

Works again now:
image

2 Likes

Loaded snapshot #3392 to fix memory leak. All good there :smiley:

However, can not seem to edit the overview page (settings → pages) Trying to force the issue by adding /layout/overview yields a blank screen. This morning I get no error messages, but last night the top lines of the error messages (while trying to get to the edit) are;

2023-04-01 19:53:33.510 [WARN ] [ache.cxf.phase.PhaseInterceptorChain] - Interceptor for {http://internal.karaf.core.openhab.org/}LoggerResource has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]

and

2023-04-01 19:53:33.530 [WARN ] [ache.cxf.phase.PhaseInterceptorChain] - Interceptor for {http://internal.karaf.core.openhab.org/}LoggerResource has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: XML_WRITE_EXC
	at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:106) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[bundleFile:3.4.5]

Two other minor snapshot observations

  1. I have a custom Zwave binding in the addons folder. Normally this is loaded late (> 200) now it is loaded first? The problem I had was that after the clean-cache from loading the snapshot I normally get a message about openhab-transport-serial, but with the early loading the state went to RESOLVED and no error message in openhab log. After installing the “transport” feature, I needed to do a bundle:restart. Normally (with a later loading queue) it starts up on its own. (hope this makes sense)
  2. I get this these new messages on startup. Appears to be no lasting effect since the binding works.
2023-04-01 18:15:10.351 [WARN ] [core.thing.internal.ThingManagerImpl] - A thing handler factory claims to support 'systeminfo:computer-openhab' for thing 'systeminfo:computer:openhab' for more than 120s, but the thing type can't be found in the registry. This should be fixed in the binding.
2023-04-01 18:15:10.428 [WARN ] [core.thing.internal.ThingManagerImpl] - Could not normalize configuration for 'systeminfo:computer:openhab' because the thing type was not found in registry.
  1. If you drop the binding after the initial startup, it get’s a high number (and is loaded late), if you have it in the folder when the cache is clean, then it’ll get loaded very early. On my systems this has always been the case.

  2. This is only a warning. It’ll be fixed when Add an AbstractStorageBasedTypeProvider by J-N-K · Pull Request #3407 · openhab/openhab-core · GitHub is merged and the bindings are changed to use it.

1 Like

I see this issue of not being able to edit the overview page too. Build 3394. Has it been solved or is anyone working on it?

This one is probably minor. I’m on #3395 and I noticed that the new ItemStateUpdateEvent is being logged to events.log. I would expect it to not be logged since the ItemStateEvent isn’t logged by default either.

Adding:

<Logger level="ERROR" name="openhab.event.ItemStateUpdatedEvent"/>
<Logger level="ERROR" name="openhab.event.GroupStateUpdatedEvent"/>

to log4j2.xml suppresses this event. I’ll see if I can find which repo the “real” log4j2.xml file is and submit a PR. But for those who need a work around now, there you have it.

IMHO this should fix navigation to page(s).

1 Like

Thanks, I’m still playing catchup I guess.

I will try to review this ASAP, I think it will be tomorrow.

When doing an upgrade are changes to log4j2.xml merged onto existing log4j2.xml or is the current file overwritten or preserved?

There won’t be a merge but I’m not positive if it’s overwritten or if you are given the option to overwrite it for apt/yum. In Docker I believe it just gets overwritten (though a complete backup of everything is made first). Manual installs are up to you to preserve your changes.