Pushbutton. Autoupdate=false does not work?

Example of a simulated pushbutton

Item
Switch tryMe "Test Push [%s]" <icon> {expire="5s,command=OFF"}

Sitemap
Switch item=tryMe mappings=[ON="Action"] visibility=[tryMe!=ON]
Switch item=tryMe mappings=[ON="In Progress"] visibility=[tryMe==ON]
1 Like

It doesn´t matter in his situation when using an IHC controller. The psycical pushbutton is swiched off by the IHC controller itself. Therefore he needs the openhab switch to switch off as well.

@MichaelToettrup
I have a garagedoor just like you, (puls operated) and a rule for controling it as well in my IHC installation.
As far as I remember I use the expire binding for that openhab switch. I can have a look later tonight. Autoupdate=false does not work like a pushbutton. Either use expire binding or an rule.

I have the same problem. One question. How do you know that the door is open or closed? Do you have a sensor which tells you this?

I use a proxyitem which shows the current status of the garage door. His status is triggered by the real sensor change and shows me the status of the garage door. If I trigger the proxyitem (CLOSE or OPEN) it short turns on the related switch to trigger the garage door motor and then stays at OPEN or goes to CLOSE regarding the sensor status.

Yep, I have installed two small Xiaomi wireless door/window sensors. One used for bottom (closed) position, and one used for top (open) position. The rule I´ve got, with help from @rlkoshak, have proxy items for control light showing when the door is open state or closed state as well as in between “moving state”.

I have the thread here somewhere…

Thats what I haver for my door bell front door opener, there I need 6s to be on.
I also had similiar for my 12 physically switches the beginning, then I did install spring on them and now in my rules i just check if they changed from Open to Closed

I have a “alarm magnet contact” on the door, to tell if it is closed or open.
I did this - and it works:

.rule

var Timer timer = null

rule “Trykknap Garageport”
when
Item Garage_PortOpNed received command
then
if(receivedCommand==ON) {
if(timer===null) {
timer = createTimer(now.plusSeconds(1)) [|
sendCommand(Garage_PortOpNed, OFF)
timer = null
]
}
}
end

.sitemap

Switch item=Garage_PortOpNed mappings=[ON=“Åbn/Luk”]

@MichaelToettrup, IHC binding supports short ON pulse directly. You can define pulse via pulseWidth channel parameter?

See more details from https://github.com/paulianttila/openhab2-addons/blob/ihc-binding2/addons/binding/org.openhab.binding.ihc/README.md

Hi,

for some time I implemented pushbuttons in the UI (Basic UI in my case) as described here and never noticed any problems.

But for a while now I have problems with the following item. Somtimes everything works as expected, sometimes I have to press the button in the UI several times (up to 10) until the rule triggers and sometimes it triggers not at all. I can not see any regularity in the behavior.

What differs with this item from others I have used is, that it uses no other binding (all other items I used so far use KNX).

Items:

Switch Rolladen_Arbeiten_EG_Beschattung “Arbeiten EG Beschattung” { autoupdate=“false” }

Sitemap:

Switch item=Rolladen_Arbeiten_EG_Beschattung label=“Beschattung” mappings=[ON=“Ein”] icon=“rollershutter-60”

Trigger in Jython rules:

@when(“Item Rolladen_Arbeiten_EG_Beschattung received command”)

I tried using the expire binding as described in this thread, but this did not change anything:

Switch Rolladen_Arbeiten_EG_Beschattung “Arbeiten EG Beschattung” { expire=“2s,command=OFF”, autoupdate=“false”}

Probably I am missing something, but I can not see what…

Thanks for your help!

Juelicher

What does your events.log show?

How do you know the rule does not trigger, presumably from some follow on effect that you haven’t shown?

Yes, from the missing effect and I added logging to to rule, which is not printed.

In case everything works as expected, the event log shows

2020-07-18 18:19:17.037 [ome.event.ItemCommandEvent] - Item ‘Rolladen_Arbeiten_EG_Beschattung’ received command ON
2020-07-18 18:19:17.041 [.event.RuleStatusInfoEvent] - 2c3f0140-078d-4409-b39e-1b849388e97a updated: RUNNING

In case it is not working there is no entry in the event log.

Okay, if there is truly no entry in your events.log then the command from BasicUI is not being received by openHAB.
Need to look at UI end - what kind of environment is there, browser, host device, mouse/touchscreen ? What kind of network lies in between?

In 9 out of 10 times I use an iPad with iOS 13.x and Safari. The openHAB server is a Debian 10 box, connected via Ethernet, the iPad connectsvia a WLAN access point (AVM 1750 or 3000), which is in the same subnet.

The only widget I have problems with are the pushbuttons, everything else works just fine! Therefore my first thought was, that I got the configuration wrong. If the configuration is OK, I will try using the Classic UI and the iOS App to see, if this makes a difference.

This could take some time, as I use the button only once a day (shadowing of my office, when the sun shines on my monitor) and it sometimes works as expected.

Today I tried the button in the Basic UI about 10x, no reaction whatsoever. After that I changed to the Classic UI (same browser on my iPad) and it worked on the first try!

It has been a while, but I did some more tests in the past days. Meanwhile I am quite sure, that this is a problem with the Basic UI. When using the iOS app or the Classic UI everything works as expected every time I try it.

I am not sure, if my configuration is correct or if I should change anything.

It’s probably related to this. Though it’s not that clear. you haven’t said what you are physically doing - presumably tapping on a touchscreen (rather than mouse clicks)? No-one seems to have tried the effect in different browsers etc.

Thanks for the link!

Yes, this seems related. Today I tried “double tapping” and it worked wit the Basic UI. This would also explain, why it worked sometimes, probably I was coincidentally fast enough with the second push when trying it out.

1 Like

I have found a github issue that seems to fit

There is no “fix” but a workaround for iOS users is described.

Thanks again!

I tried the workarround, but in a first test it did not work for me. But this might be a caching issue or I got the path within the html file wrong (other html files I placed in /etc/openhab2/html do work).

I will try to fix this tonight.

In the meantime I could figure it out. The workaround from the above link works for me, but you have to add an additional Webview url="/static/issue-120.html" to the used sitemap, as stated in the original description on which the workaround was based.

Thanks to all for the help!