Squeezebox Control Widget, Powerbutton does not work

I am using on a windows server the OH 4.1.0.M1 and the Squeezecontrol widget. Everything is working and i can control the Squeezeboxplayer except the powerbutton on the widget.
When I press it I get an error message “comunication failed”.

The widget powerbutton is:

                - component: oh-button
                    action: command
                    actionCommand: toggle
                    actionFeedback: Power
                    actionItem: =props.prefix+items[props.selected].state+props.power
                      - margin-top
                    color: red
                    fill: true
                    iconF7: power
                    text: POWER

Here I have selected my switch item which calls a rule and turn on the player. When pressing the switch manually it works fine.

Has anyone an idea?

I don’t know the squeeze control widget, your item configuration, or your rule, but that button configuration makes no sense for Switch type Item. That button is sending the command toggle to the item and toggle is not a recognized command for that kind of item.

Why are you calling a rule with that Power Switch? If you link the Power Channel of the Squeezeplayer Thing with the Power item of the widget it works…

But if you want to toggle a On/Off Switch item you maybe wanna try something like this.

          - component: oh-button
              action: toggle
              actionCommand: ON
              actionCommandAlt: OFF
              actionItem: =props.prefix+items[props.selected].state+props.power

I need to use a rule because I have to turn on another device to play the sound. When I change the action item you proposed I get an error:

Attempting to send a state update of an item which doesn't exist: undefined-undefined

But with the actionCommand: ON and actionCommandAlt: OFF and

actionItem: =props.powerItem

I get following error:

Attempting to send a state update of an item which doesn't exist: undefined

Therefore I think I am getting closer and the for some reason the Item can not be found, although it exists ( I double checked). What is your opinion?

and in the properties section I have:

    - context: item
      label: Player Control Item
      name: playerControlItem
      required: true
      type: TEXT
    - context: item
      label: Power Item
      name: powerItem
      required: false
      type: TEXT

So first… The widget allows to control more squeezebox players… If you doing this you have to change your Player in the top Area of the widget.
All other control-items are generated like “NameOfPlayer + control-item” like
If you set a different ‘power’ Button just use one of your prop items.

actionItem: =props.powerItem
actionItem: =props.playerControlItem

Or give it a fixed item:

actionItem: =items.yourrealswitchitem

In the widget the Power Button is then only for this rule.
So check your propitem names and your selected items in the widget prop list
Or set the item direct in the widget…

Perfect, thanks for your explination. With a fixed item it works now :slight_smile: