Idea for Openhab 3: Auto sitemap generation with 'display as' templates

An idea I keep having is that as an Add-on writer, we write full examples of things, item and sitemaps for the readme, so why not write a method to use this example to “auto inject” into a users sitemap or whatever the next concept and format the sitemap takes in Openhab 3? I don’t wish to go into too much detail as to a possible way to implement this, as I would risk someone saying I hate that implementation idea when the underlying idea I feel is worth discussing and working on to find a easy way to write and also easy to use.

Imagine I add a video camera to my setup with whatever GUI is in Openhab 3. The framework should then ask me for:

  • Name (maybe DrivewayCam)
  • Location (FrontYard so it displays on a frontyard page/tab)
  • ‘Display as’ to inject whatever format is needed for the next sitemap format (more on this below)

It would then inject what is needed to instantly display the fully working thing and items in my user interface without me needing to work out how to write any code or complex mouse clicking to add 30 controls linked to channels.

‘Display as’ (Sitemap auto template): By this I mean it can present a choice of multiple ways to use the same thing. ie The same camera can be used as a doorbell camera and also a ‘baby monitor’, but for each case it may be drastically different ways to display this to a user. So you select baby monitor and the GUI/sitemap then has a working set of controls formatted in a nice way you can use right away or modify it if you wish.
If you selected ‘doorbell camera’, you then get your GUI setup in a better way for that use case.

In many cases I do not wish to waste a channel in the addon for time and date stamps when the framework already supports this. So it is also about displaying items that are not just from a binding but a collection of items that make sense as a whole. The order and layout of the controls can be designed by the addon creator.

This is not only for noobs, I waste an incredible amount of time trying to figure out a nice way to display things that other people write addons for. For me it is a time saver if I can get things working faster and only need to tweak a few items instead of working from scratch.

We already have auto detection of things but I feel we are missing the next generation concept which is an advanced auto creation for user interfaces. I would hate to see something as simple as what PaperUI does for the control tab now, but something which is tailor made by the binding creator that really sets Openhab up to be an innovator and not just a copy of what Google Home and other packages do.

Thoughts on this? Have a better idea, then please share…

2 Likes

Not really :wink: I haven’t done that for all my bindings and even removed outdated sitemap examples in a few readmes. The sitemaps concept will not exist in OH3.

Making newly added Things easier available is an ongoing discussion though. In the core repo there’s an issue about Automatic Item Linking which originally tried to solve that. We need a better concept for OH3.

1 Like

Agree because it can be done better and in a way that saves time when adding new devices to our automation systems.

So has anyone discussed having multiple ways that a thing can be displayed, or has it only been about a single generic way that all things from all bindings all get handled the same way?

How do other people find this idea of having multiple choices displayed or am I alone in wanting this? Would love to hear from other people that have multiple devices that they wish to have displayed in a different format in their sitemaps because the role that the device is used in is different (same camera used as a doorbell cam VS baby monitor)… Having a single way of displaying a simple on and off light globe is fine and would make most people happy right away, but for cameras it would leave most users still wanting to edit what a generic system outputs. If we had a way that gave 80% of people something they did not need to edit and for the remainder of people they only need to edit small amounts to reach what they are after.

If addons had an optional framework we could take advantage of we could extend a generic way into something more useful, yet still offer the generic way as an option.

I understand the sitemap concept will change which is why I wish to raise this now before huge amounts of code gets written down a direction which does not consider what I feel is taking this to a whole new level over what other projects are doing.

1 Like

Love this concept

I see sitemaps as being redundant. I’m surprised there’s not more push for HabPanel, it’s the only UI that looks great and has immense flexibility that put’s it on par with other systems. Sitemaps are very primitive looking which might be OK for extremely basic setups but I personally don’t even have a site map file defined.

HabPanel all the way!

Yes Habpanel is great IF you have the time to spend getting it right, you can tweak for hours and get exactly what you want which is great for some people, we all have our own concepts and ways we prefer…

Some people may prefer to use Habpanel for a clean simple and stripped back set of controls, yet have a complex set of controls in another format for playing and tweaking the setup. An example of this is I have over 15 lights all individually controllable in the same room, image how ugly and scary a full set of controls for all these lights in a habpanel setup would look.

I want to have the full set of controls for playing with setting up my scenes, getting the look right and then saving this scene to a single button on my wall and voice control.

I completely agree it is a hidden gem that more people should play with.

Are you using Habpanel on your phone? It seemed great for tablets but it didn’t seem like it scaled down all that well to phone displays? I haven’t really used it beyond playing since I have no wall mounted tablets.

Yes, i use it constantly. You need to create a responsive CSS theme

Which is why habpanel isnt great, in my opinion. Either one need to learn css, or habpanel is really bad in basic use. It would be alot more usefull if there were templates build in (with css templates as well).
I use it though, but thats for svg´s only. Ofcouse this require some css as well.

It would be alot more usefull if there were templates build in (with css templates as well)

Fully agree. I like habpanel a lot but it gaves me a hard live to build / customize it in a way computer, tablet and mobile get a usable interface. As workaround I’m using the Basic UI via app on the mobile.

1 Like

Many wonderful CSS themes on the forum you can build upon though?

Agreed, but these are custom build, and some arent really that easy unless you already know alot.
What I was suggesting was a package included in Habpanel. As it is now, you got two options. Either nothing, or use a custom/build your own.

Plenty of freelancers that can help with CSS for very low cost.

Well, then I dont really need to bother with anything, cause I got money :face_with_raised_eyebrow:
Honestly, it´s a very strange answer, as I thought the idea was how to improve things. Not to move less optimal stuff from one place to another.

1 Like

Good things generally aren’t easy. What I’m saying is if it’s too hard and your ok to spend a little money why not get help if you’re unwilling to learn a little css.

If your unwilling to spend time or money how can you expect others to?

I wonder how far this is taken you. You´re arguments suits probably everything…
I´m not unwilling to spend time. I have spend what seems forever to get where I am. With your suggestion, there really any need for anyone to do anything, except pay for it all.
All I suggested was some templates to get the users started… I guess it requires payment. So be it!

There are already templates, loads of them infact inside HabPanel. There is also a Widget gallery with even more and theres many posts on sample widgets. All require some tweaking. I’m not sure what else you’d need?

I have absolutely ZERO angular js experience but was able to tweak almost all to my liking, some completely failed but that’s life.

Patricks CSS themes work well and can be customised fairly easily to suit your various mobile devices. Even the colours are easy to change

I would prefer this thread stays on topic as I would love to hear if people would use the feature I describe to make the time investment worth while or if someone has a better idea. Both a newer version of the sitemap and habpanel is the way to go so people can choose which way they prefer. Some people want fast and others want an exact look and don’t care the time spent to achieve it. Two different tools to choose from which is great. This thread is about improving one of the tools and not about if another way looks better…

Home assistant has a half way interface that is somewhere in between habpanel and our current v2 sitemap,

An example is this…

And a place to go looking if you want a similar look in Openhab 2.x

2 Likes

Dear all

Without going too deep into this as it would be OT for this thread. For those saying Habpanel is the best, yes for you maybe, not for me. The example shown by @matt1 looks good, but is not what I would like to get in the end. You can ask 30 openHAB professional users and you would get 30 different opinions what the UI for using purpose should look alike. The “user based templating” function is not there in openHAB yet, not in the way as I would expect it.
And this is definitely something that I would wish in a future release of OH.

For sure one can build its own UI based on REST but this is time consuming, frustrating and some times way too much. I started this approach, but my UI is still not finished and not working in the way as I would have it. So for the time being I use the basic UI. Habpanel is not even installed on my OH server

Cheers
Stefan

i agree auto site map will be great …
as much as i want the Cool Matrix theme etc
i dont have time to learn this, and it will look like sh***

even basic UI is getting me tired
i did like the paperUI , approach but it is sad that i cannot configure it