openHAB 4.0 wishlist

Also look at the rule templates in the marketplace. You might be able to use what’s there without needing to rewrite thing yourself.

I thought createtimerwithargument was deprecated? Has that decision changed? I last read about it early this year or late last year I think.

It is deprecated in the JavaScript Scripting add-on and it is not recommended to use it because it’s timers are not thread-safe and can fail unexpectedly.
What he meant when he wrote that is, that it will not be removed with openHAB 4. It will be still there, but again: Do NOT use it! Use createTimer instead and pass variables by reference or using a function generator, which is BTW more the JS-way then createTimerWithArgument.


What I would like is a way to specify the state for a group to be a copy of the state of one of its item.
Right now, the aggregations take ALL items in the group into account, but when said group is an equipment created by MainUI in the semantic model, there is a strong chance that items are all of different types.
My most common case is a temperature thing that has temperature and humidity channels. If I do an aggregation on the equipment, both those values are taken into account and that gives a very useless value.
It gets even weirder with contacts which in my model have a battery level as well as the contact itself:


If I use a “one OPEN then OPEN” aggregation, the battery level is taken into account and depending on its value may report a completely bogus group state (ie OPEN when the contact says CLOSED)

The only thing i cannot achieve with openhab except going the route of other integrations apps etc is actionable notification that can trigger different rules that also support sending image for the official Android and iOS apps trough myopenhab. On another note i would like to thank all the developers working hard for version 4.

Holy moly… this thread is quite big now :smiley:

Something similar was also mentioned here Push Notifications improvements for OH 4.0 · Issue #3193 · openhab/openhab-android · GitHub
Interactions via notifications would definatly be a nice feature.

But i’d suggest to bring offline push notifiations crossplatform first. I’d love to see this in the release of 4.0. It’s also a nice redundancy feature and people who don’t want to use firebase or apples cloud services will also get the option to receive notificatinons.
At the moment, if there is no internet connection the whole notification system stops working. But to solve this we would need the the openhab-android team as well as the openhab-ios team to work together with the openhab-core team to come up with a system.

It would be awesome if the mobile applications would give the user a choice whether one wants to establish the connection to the core via websocket or via mqtt.
This will affect battery usage on the mobile phones a bit but it’s a really low impact if one considers the possibilies. Here is how it’s done in homeassistant Local Push | Home Assistant Companion Docs .
They are using the websocket api, but i guess solving the whole thing via mqtt would also be nice or maybe both. The listener/sender/connection should be only active as long as the mobile device is connected to a selected wifi.

The thing is, (at least in Android) it’s impossible to implement this nowadays with all the limitations on background services. If I understood the HA Android app code correctly, they connect the Websocket for 30 seconds every 15 minutes … which isn’t too far away from polling in the first place. Since apps e.g. also are cut from the network after some time in background, there’s no way one can reliably keep a permanent connection to a server :frowning: Thus, it’s either Firebase, or polling the notification endpoint.

Web Push (that is finally supported in Safari as well with iOS 16.4) could be an option to allow local, offline notifications, but someone would have to look into to check what limitations it has.

hey guys its just a wish list :slight_smile: .

For what purpose would you want this? The Equipment represents all the Items that are provided by that device. If all you care about is the temperature, why not use the Item that provides the temperature? If you are looking to show it in MainUI, that’s what the “default stand-alone widgets” are for (and you can create a widget to show one or all of the members of that Equipment).

For now this can be achieved through Telegram, Nextcloud Talk, and I think Jabber.

True, but discussion about what is possible now and discussions on technical feasibility of any given wish are not off topic.


make it also possible to do the Page Layout and Location via file based configurable, for those, they have already file based configured everything else since a long time in openhab.
also to download and configure templates from the marketplace.
that would be great

If you mean the Locations tab of the Overview Page in MainUI than you already can define most of it via file based Items. Everything you see there is driven by the semantic model and “default list item widget” Item metadata.

I believe OP asks about making his own, custom page definitions stored in files, not in items.

I think he was asking about both. There isn’t anything now but on the horizon to support widgets and pages through text configs but there is already support for “Locations”.

also to configure something like this?:

and also widgets?

is it possible to show in the items detail page (UI), in what rule the item is used, like in a rules file?
like a bulb item item, where I can see, in what rule it is added and is doing something.

Not right now but the Developer Sidebar search now searches in rules, widgets, and metadata so if you search for an Item name you’ll get all the rules and widgets that Item is used in by name. I think it works for both text based and managed rules.

But if you are using text files it seems it would be more effective to use the “find in files” of your editor and/or grep rather than searching it clicking around in MainUI only to need to go back to your editor to do something about what you’ve found.

Note, it’s just a text based search so if a role uses an item indirectly l such as through a Group or by dynamically constructing an Item name that use will not be found.

The amount of calculations required to determine that case would be pretty high I would think because there is nothing a rule does to tell OH it’s using a file until it senda s command or posts an update. And there’s nothing to tell the Item from whence the update or command came. So OH would have to somehow run through every rule with every possible trigger for each rule and every possible combination of Item states and then stimulate the execution of the rule to know whether an item is used indirectly by a rule it not. I’ve but done the math but this feels like an NP type problem.

That’s because I have well defined the structure of my system in the semantic model and browsing it directly or implicitly via default sitemap widgets is not nice.
I’d rather not have to recreate the same information in the widget side of things, I would like for it to be automatic.
But I see that once again my suggestions are pointless so I’ll keep the other ones to myself (forward only group state propagation to item command, automatic group membership, use UI scripts as scripts in other rules…)

It wasn’t a rhetorical question. It was a request or more details on how this would be used given the already existing ways that OH supports this use case.

That’s why I asked the question. If you are using the sitemap, you probably are getting very little benefit from the semantic model in the first place. The sitemap doesn’t know nor does it understand the semantic model. And if you are trying to use the semantic model with the sitemap using the Group element, a better request might be to make Sitemaps more aware of the semantic model to support this use case than to somewhat break the purpose of the concept of Equipment in the semantic model by giving it a state derived from only one of it’s members.

I can think of a lot of things that the sitemap could do with the semantic model to make building sitemaps better. But for now, I indeed am a little bit against corrupting the concept of Equipment and Groups for the purpose of making the semantic model work better in a place where it currently isn’t. In some cases half measures are worse than full measures.

So think bigger. I don’t use sitemaps so I’m probably not the best to come up with ideas. What could sitemaps do with the whole semantic model to support new use cases or existing use cases better?

If you are really referring to the Overview page on MainUI (Locations, Equipment, Properties) the state of the Location, Equipment Groups are not even shown in the first place, so what would be the point? If it’s semantically tagged as an Equipment, the only way to see it’s state is if you build a custom Page and put a custom widget that uses that Equipment Group somehow on that Page. The actual state of the Group wouldn’t be used.

FYI, it even is able to search within blockly rules (and then with the blockly rule itself you can search the blocks with Cmd/Ctrl-F even further).