Sitemap setting a button to work with continuous press

Hi Friends,

I am using OpenHAB 3.3 running as a docker app on UnRAID.
I have been controlling my smart home successfully for 2 years now using the OpenHAB iOS app (with a sitemap), and I’m wondering if I can set up my sitemap settings in a better way.

One of the devices I’m controlling is a gas operated fire heater which is normally controlled using an RF remote.
Using the OpenHAB Broadlink binding I was able to learn the RF remote codes and am able to control the heater using OpenHAB.
In my sitemap I configured buttons to control the fire level +/- to raise or lower the fire level.
However, in my current sitemap buttons setup each time I press the + or - button it will only raise/lower the fire level by one step.

Is there a way to configure the sitemap buttons to continuously send the +/- remote codes so that the fire level will keep raising/lowering as long as I press the buttons?

Hope someone can help :pray:

As far as I’m aware, sitemap buttons only register one event per touch. I could be wrong about that, but I think the activity is only registered when you depress the button. I believe that you can do this sort of thing in MainUI pages, which are much more advanced than sitemaps.

I’m guessing that you’re using buttons that you’ve marked as “increase/decrease”, which then trigger a rule to send your IR command. If so, you could add buttons to increase/decrease by x3 or x5, and trigger the rule accordingly.

If you only control the level of your heater through openHAB, then you can set up a proxy item to store the current level of the fireplace in openHAB. I do this with an IR-controlled fan, which enables me to have Low/Medium/High settings in my sitemap. When I change the setting, openHAB checks the current state of the proxy item, sends the correct number of IR commands to the fan, and then updates the proxy item. It works flawlessly. However, it requires that I never touch the fan’s onboard controls or use the original IR remote. If I do that, openHAB won’t know the current state until I resynchronize.

This also enables me to control the fan with Google Assistant.

In your case, you could use a numeric scale that reflects how many levels your heater has, and then use a setpoint/slider element in your sitemap to pick the level. Alternatively, you could have a button/selection element to choose levels by name (e.g. Low=1, Medium=3, High=5).

If you’re interested, I can share my items/rule with you.

Hi @rpwong , thank you for your message :pray:

Maybe I should change the increase/decrease buttons to a slider, as you suggested.

It would be very helpful if you could share your sitemap, items and rules.

I started to post them, and it quickly turned into a tutorial. I’ll type that up and send you the link.

Okay, give this a read and let me know if it makes sense.

I didn’t include a sitemap example, because there’s nothing particularly special or unique about the items used for this solution.

1 Like

Thank you very much :pray: