Shelly button 1 Rule doesnt work Openhab3

Hi !

i have integrated shelly button 1 thing in openhab with shelly binding but my rule never is a success

My shelly Button habe a fixed ip address

on shelly button 1 Webinterface:

Enable CoIoT

and

CoIoT peer: 192.168.77.15:5683

192.168.77.15 is my openhab server

openhab3

on the shelly button thing i enabled also:

Enable CoIoT Events

Rule:

`configuration: {}`

`triggers:`

`- id: "1"`

`configuration:`

`itemName: ShellyButton1SHBTN1_Event`

`command: S`

`type: core.ItemCommandTrigger`

`conditions:`

`- inputs: {}`

`id: "3"`

`configuration:`

`itemName: Zwischenstecker01_ON_OFF_PLUG_IN_UNITSwitch`

`state: ON`

`operator: =`

`type: core.ItemStateCondition`

`actions:`

`- inputs: {}`

`id: "2"`

`configuration:`

`itemName: Zwischenstecker01_ON_OFF_PLUG_IN_UNITSwitch`

`command: OFF`

`type: core.ItemCommandAction`

wtih tcpdump on openhab server i see it of i press the button:

16:58:01.475429 IP 192.168.5.144.5683 > 192.168.77.15.5683: UDP, length 145

it seems the rule is wrong

tail -f /var/log/openhab/events.log

`2021-12-31
 17:12:31.119 [INFO ] [openhab.event.ChannelTriggeredEvent ] - 
shelly:shellybutton1:b107659ff4:status#button triggered 
SHORT_PRESSED2021-12-31 17:12:31.120 [INFO ] 
[openhab.event.ItemStateChangedEvent ] - Item 
'ShellyButton1SHBTN1_EventCount' changed from 67 to 68`

What is Wrong ? Thanḱs

What kind of Item is ShellyButton1SHBTN1_Event? As configured, the rule will only trigger when it receives a command S, which is pregnant never going to happen. S isn’t an Item command.

Hi !

What i did is → add Bindng Shelly
add thing → Shelly Button 1 (SHBTN-1)
add in Model → add Eqipment from Things
and there are 5 items → i choose all and add

Battery Level (Measurement Energy)
Event (Point)
Input (Point)
Low Battery (LowBattery Energy)
Signal Strengh

Rule

Add Trigger choose Pick from Model → choose Event → Commands

Short push
Double-Short push
Triple-Short push
Long push
Short-Long push
Long-Short push

a choose short push

That’s is all great information but I what I really need. What is tiger Item type for the Item that triggers the rule?

Sorry i’m really new on openhab !

Do you mean this ? if not give me info how can i see what you mean !

Thing → Channel

Event
String Point
ShellyButton1SGBTN1_Event

go to the Item’s page. What does it say at the top under the Item’s name?

Have you gone through the Concepts section of the docs and the Getting Started turorial? yet? If not start there as there are some concepts you need to know and understand.

Items → Event :
Short push

I need the Item Type. Nothing else you’ve provided is relevant. The Item type tall us what sorts of commands the Item can receive. This in turn tells us what, if anything you need to put into the trigger. I’m about 90% positive there is no such thing as an “S” command. But what could the right command be? :man_shrugging: You’ve not given the information I’ve repeatedly asked for.

Hi ! Sorry ! its a string !

If i press short on the button → i see Short push
If i press long on the button → i see Long push

i see this in the item below the string → picture

if i change the rule to

itemName: ShellyButton1SHBTN1_Event
command: Short push

it also not work :frowning:

My button rule is like this for a long press, it was setup using the UI State L is long press, S for short and SS for double short, works every time, but will only respond if the state changes, will not respond if the you short press after the last press was a short press.

configuration: {}
triggers:
  - id: "1"
    configuration:
      itemName: LivingRoomButton_Event
      state: L
    type: core.ItemStateUpdateTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: Nighttime
      command: OFF
    type: core.ItemCommandAction

yes if i change my rule to StateUpdate and also if i press long and the short it work :frowning:

But with command in the rule it doesnt work

seems like the String which the buitton send is not S or SS or L but what string does the button send ?

configuration: {}
triggers:
  - id: "4"
    configuration:
      itemName: ShellyButton1SHBTN1_Event
      state: S
    type: core.ItemStateUpdateTrigger

in the log file i see if i press the button short


shelly:shellybutton1:2621ea90ab:status#button triggered SHORT_PRESSED

and under the shelly button thing i see this channel :

Button
status#button(Trigger)

but this channel is not linked and i cannot add this channel to model

so i thing the rule never could work

What is the problem here ? How can i add this channel to model ?

openHAB
There is no profile available for the selected item

You can’t. That is an Event Trigger Channel. You trigger the ride using the Channel directly, not through an Item.

Don’t get to focused on the Model. That’s just a little bit if organization on to of the stuff that really matters, Things and Items.

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