Strange mainui behaviour with groupitem feedback

Hello,

I have a widget

First line (slider+ roller) represents group item, grouping roller items from the room. Second and third line - represents particular roller items for each blind in the room.

Group items has AVG as aggregation function.

My expected bahaviour for this is as follow:

  1. When changing first line - I control all blinds in the room as one through a group item. This works as desired.
  2. When changing second or third line - I expect that selected blind will change its position and group item will eventually update also. However this is not working correctly as it creates chain of changes.

For example: when changing blind north blind position to go slightly down it goes and then group item (first line) updates and then… command to this group item is issued from ui:
image
This leads to change of possition in all blinds in a room - something that never happened in basic ui.

Is this a bug, where reflected change in a group item issues not desired command for it?

widget for this “line” composing slider and roller is as follow:

uid: blinds-list-item
tags: []
props:
  parameters:
    - context: item
      label: Blind
      name: blind
      required: true
      type: TEXT
    - label: Blind label
      name: label
      required: false
      type: TEXT
timestamp: Sep 26, 2022, 12:15:01 AM
component: f7-list
config: {}
slots:
  default:
    - component: f7-list-item
      slots:
        default:
          - component: oh-slider
            config:
              item: =props.blind
              style:
                margin: 1rem
                width: calc(100% - 2rem - 160px)
          - component: oh-rollershutter
            config:
              item: =props.blind
        title:
          - component: Label
            config:
              text: =props.label

Possibly. There have been bugs in widgets before, where a “state only” action that causes an on-screen change incorrectly leads to commands being issued, as though the user had moved the slider.
openHAB version?
EDIT - I thought these MainUI bugs had been fixed, but maybe not. Open issue

Showt your events.log to verify what has happened (although your description seems pretty good)

I have tracked this in a main ui source code a little bit and there is probably very shady distinction between slider item update from vue store (updated through sse) and user action. Maybe someone could patch only bundles/org.openhab.ui/web/src/js/store/modules/states.js to cache recent item states updates from server and imptove logic of sendCommand there (like "if such command leads to item state which is recently pulled through sse then do nothing, else perform send command).

I am not good enough in vue and its store concept however to tune it accordingly. (For me, React - this is the way :slight_smile: )

However I have patched all my sliders with releaseOnly: true which works as a distinction between updates from server and user actions and works in my case.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.