[SOLVED] OH3 UI: Pages > Floor Plans > Marker > Action Commands not working for me

Hi All,

I’ve been trying out the Floor Plans Pages editor in OH3 M2.
In the image below, you can see the lightbulb in my breakfast nook room. It’s yellow as it should be because it is ON. When I turn the light OFF, the colour changes to gray. That part works … check!
Screen Shot 2020-11-21 at 6.12.13 PM

The problem is when I click on the lightbulb. When I do that, I get the following options:
Screen Shot 2020-11-21 at 6.14.56 PM

And nothing gets sent to the lightbulb to toggle the state.
I believe it’s because my Action Command in the Marker config window is incorrect:

Not sure what the syntax should be for the Action Command.

Thoughts?

Thanks for your help!

Cheers,
Randy

hi,

working on the same issue and have tested a lot of different variations.

For me this is one is working for mqtt items:

grafik

Thanks @bodo.riepl.

I tried your config but it doesn’t work for me. What it does tell me is that Action Command is likely the state to set the item to. I’ve tried

Action = Toggle Item
Action Command = ON
Action Toggle Command = OFF

however, they don’t seem to work either.

you don’t have to use toggle item as an action, use send command! :slight_smile:

grafik

Meanwhile i’ve tested it with some other items, works like a charm

regards

1 Like

I tried that initially, but I don’t think it likes the TOGGLE Action Command.
However, “Balkon Schalter” is a Switch just like my item, but I’m using the UPB protocol.

When you’re editing the page, the action won’t be executed on that screen, you’ll get the little baloon with the options (Configure, YAML…) instead.
Action Command = ON, Action Toggle Command = OFF should work, but only when you’re displaying the page outside the editor.

Thanks @ysc.

Is that accomplished by running the Floor Plan Page in “Run Mode”? That’s how I have been doing it. Is there another way to run the Floor Plan Page outside the editor?

No, when you’re in the editor, technically you’re still editing the page even if you’re in “run mode” (meaning you’ll see a live preview but without the actions). You can either:

  • put your page on the sidebar (expand Sidebar & Visibility on the design tab and enable “Show on sidebar”)
  • navigate to it from another page with a “navigate to page” (or “show popup”) action available in several widgets
  • add it to a “tabbed page” then show that page on the sidebar, or as a result of an action.
1 Like

Thanks so much @ysc!!!

It works now!

Cheers,
Randy

Hi,
maybe someone can help me @ysc?
I was able to set a floor plan and I am also able to control simple lights with on/off toggle. Analyzing items is working too.

But how can I access a dimmer slider and a roller shutter control panel from the floor plan?
Can’t find an option for these both items.

Tank you!

You can configure your marker as follows:

This will open up a dialog with a simple dimmer widget.

Thank you! @stefan.hoehn
There was no dimmer or rollershutter to select as popup.
So I created a Layout page and added a Rollershutter cell.
Do I have to create a layout for every rollershutter or can I create one rollershutter card and then it will control the selected item at floodplan?
Same is for the dimmer. For every dimmer a dimmer card or can I create only one dimmer card and it will control the selected light?

Edit:
I was able a create a widget for dimmer via developer and this code:

Any idea where I can get a similar code for rollershutter control?

Currently putting a standard library widget in a popup (or popover) is not supported.
So you’ll have to make a personal widget, but it’s very simple.
Something like this is enough:

uid: rollershutter_for_popover
props:
  parameterGroups: []
  parameters:
    - name: title
      label: Title
      type: TEXT
      description: Title of the card
    - name: item
      label: Item
      type: TEXT
      context: item
      description: An item to control
tags: []
component: oh-rollershutter-card
config:
  title: =props.title
  item: =props.item
  noBorder: true
  noShadow: true

And then on your marker you would select “open popover” as action, and choose this rollershutter_for_popover widget, and configure it with a title & item.

Wow, thank you. That was easy!

Hi!
I’m an absolute beginner but I hope my question is not too stupid. I’m trying to build a floorplan with oh3 on a raspberry pi 4. My goal would be a clickable lightbulb icon to toggle a light ON-OFF. I’m using Toggle item Action with ON and OFF commands.

Screen Shot 2021-05-07 at 1.35.22

It is working flawlessly on my macbook’s browser but on ios each touch sends both the opposite commands almost instantly, resulting a flickering light instead of switching it on or off.

I’m tried everything and now Im clueless.
I would appreciate any help.

Hi,
I have had exactly the same problem.
As a solution I changed the icon action to open popover. As popover I show a toggle card widget to turn the light on/off.

Maybe you can try something like this:

component: oh-plan-marker
config:
  name: Bulb 1
  item: Item_Bulb_1
  icon: oh:light
  iconUseState: true
  action: command
  actionCommand: TOGGLE
  actionItem: Item_Bulb_1
slots:
  default: []

Go to floor plan and edit it. Then switch to “Run mode”

Click on marker and choose YAML
yaml

and paste adjusted for your need yaml code.

Thanks I tried it, but It’s the same.
Sometimes touching the marker sends two different commands like one ON and one OFF, sometimes sends the same ON or OFF twice. It seems that for some reason one event triggers two actions, while, before or after the system reads the actual state of the item. but only on iOS. I also tried the popover solution as Dirk mentioned, but changing 5-6 lights state is painful compared to one single click.

I’m seeing this issue as well. Any solution yet?