kristoferus
(Michael Schumaker)
January 1, 2022, 3:33pm
1
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
rlkoshak
(Rich Koshak)
January 1, 2022, 4:10pm
2
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.
kristoferus
(Michael Schumaker)
January 1, 2022, 4:56pm
3
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
rlkoshak
(Rich Koshak)
January 1, 2022, 6:33pm
4
That’s is all great information but I what I really need. What is tiger Item type for the Item that triggers the rule?
kristoferus
(Michael Schumaker)
January 1, 2022, 7:26pm
5
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
rlkoshak
(Rich Koshak)
January 1, 2022, 9:31pm
6
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.
kristoferus
(Michael Schumaker)
January 1, 2022, 9:56pm
7
Items → Event :
Short push
rlkoshak
(Rich Koshak)
January 1, 2022, 10:25pm
8
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? You’ve not given the information I’ve repeatedly asked for.
kristoferus
(Michael Schumaker)
January 2, 2022, 7:38am
9
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
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
kristoferus
(Michael Schumaker)
January 2, 2022, 8:55am
11
yes if i change my rule to StateUpdate and also if i press long and the short it work
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
kristoferus
(Michael Schumaker)
January 2, 2022, 2:26pm
12
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
rlkoshak
(Rich Koshak)
January 2, 2022, 2:37pm
13
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.
system
(system)
Closed
February 13, 2022, 6:38am
14
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.