OH3: sitemap call, visualisations, graphs; linking channels and items (and other bits)

  • openhabian 3.3.0 on rPi4

I am migrating from OHv2 to v3, and am basically starting from scratch.

Just a few questions…

How does one call a sitemap?
When I do what I did on v2 I get the below.

Instead of showing the sitemap, it gives me a link, where it prefixed the sitemap name with uicomponents. Clinking on it will then get me to the actual sitemap.

How can this behaviour changed? Or is this as designed, and I have to prefix any sitemaps with uicomponents?


A more ‘finger in the air’ question:
What do people prefer for visualisations in OH3?
I should add, while I was content with the standard OH graphs, I now prefer a system where I can do back a few days, seeing the whole day, rather than a week view. I reckon this pushes me towards grafana.
Or is there other ‘stuff’ people use for their graphs (which can easily fed from OH)?
And no, I haven’t looked in detail at the other sitemap types that seem to exist, but am happy to get some preference of people.

Thanks.

I haven’t used BasicUI since moving to OH 3 but I suspect this is as designed and you have to prefix the sitemap. But one detail is left out. Are these in .sitemap files or did you create them through MainUI?

MainUI is the most flexible and complete UI for OH IMO.

If you stick with sitemaps, probably yes. Both MainUI and HABPanel handle this easily though out of the box. Getting rid of InfluxDB and Grafana was a major driver for my adopting MainUI early on. Fewer services means simpler configuration and less maintainence.

On a default installation of OH 3, you’ll get rrd4j installed by default and it will automatically save everything that can be saved (rrd4j doesn’t support Strings and non-numerical data). MainUI will by default put charts behind all your numerical Items.

On the Properties tab of the Overview page, you’ll have an “Analyze All” button that will show them all charted together.

This is everything you get by default. In addition to that, you can put a chart behind custom widgets on other pages or create your own chart pages. You can start with one of the autogenerated charts (e.g. remove the humidifier switches from that chart above) and save that off as it’s own chart.

Several different types of charts are available as well including line charts, bar charts, heat maps, etc.

1 Like

Thanks Rich… :slight_smile:

I also came across this post of your, which I will check out too.

I always wanted better graphing, hence, looking was forward to graphana… but, it looks like the built-in functionality is sufficient (from what I can see so far).

My whole 1,200 line sitemap is mainly for me to check on values and troubleshoot any problems that may occur.

I have one panel, where I may have used HABpanel; I can’t remember how I did it :person_facepalming: … but will a few more in the future.


I understand now, after creating some 250 items in OH3, why you prefer to use the UI. Yes, I will use the UI, but for troubleshooting text files are easier and much faster. I still import ‘cleansed’ items files here and there, but the constant filter/search for what I am looking for seems cumbersome. I am not whining, just stating my initial experience; there might be other ways of doing things I haven’t yet discovered.


Does any one know, whether this a OH UI chart or not? If not, what may have created it?

Based on

as stated in OH3: Charts/Graphs/Plots
I would assume that Grafana was used to create that chart.

Oh dear, I need to go to bed. :person_facepalming:
as shown in the example, duh
My 4 day OH3 migration marathon has blurred my mind.

Anyway, thank you for pointing it out. :slight_smile:

1 Like

Have you used the developer sidebar yet? You can pin Things, Items, and rules there so everything you are working on at the moment is listed in one place.

The last page of the Getting Started Tutorial had more details.

Well, I had a look…

I pinned a group in the hope I get all its members; nope; have to mark these individually. Which I felt was pointless as I was updating only one property on each item.

Then it wasn’t clear what is in the list of ‘pin from model’ is. As in, what is listed there.
Some groups I created are there, not all of them though.

Is there a better way of managing items, e.g., a sticky filter?

I have ten items related to a tank. Had to search ‘tank’ then pick an item to update, save, back, put search term ‘tank’ in again, remember which item I had done and select the next one.

I mean, weren’t the items files just marvellous :smiley:

Group    gTheHub						"The Hub"											        <settings>	(gWaterDistribution)
String   Hub_MAC						"MAC address [%s]"											<settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/MAC:state:default]"}
String   Hub_IP							"IP address [%s]"											<settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/IP:state:default]"}
String   Hub_Version					"Firmware version [%s]"										<settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/Version:state:default]"}
String   Hub_Name						"System name [%s]"									        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/Notification:state:JS(splitMqtt0.js)]"}
String   Hub_Status						"Last status [%s]"									        <settings>	(gTheHub)
String   Hub_Message					"SysMsg: [%s]"										        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/Notification:state:default]"}
String   Hub_Irrigation_Valve			"Hub: Irrigation Tank valve [%s]"					        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/IrrigationTank/Valve:state:default]"}
String   Hub_House_Borewater_Valve		"Hub: House bore water valve is [%s]"				        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/HouseBoreWaterTank/Valve:state:default]"}
String   Hub_BorePump_Demand			"Hub demands pump to be [%s]"						        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/BorePump/Demand:state:default]"}
String   Hub_HeartBeat					"Hub controller is [%s]"							        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/HeartBeat:state:default]", expire="150s,command=OFF"}
String   Hub_Error						"Hub error [%s]"									        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/Error:state:default]"}
Number   Hub_Temperature				"Hub temperature [%.1f]"							        <settings>	(gTheHub)				{mqtt="<[mymosquitto:ArgyleCourt/Property/Hub/Temperature:state:default]"}
// ----- Controller data derived
DateTime Hub_LastUpdate					"The Hub: Last update [%1$td/%1$tm %1$tH:%1$tM:%1$tS]"	    <calendar>	(gTheHub, gLUP)
DateTime Hub_LastReboot					"The Hub: last reboot [%1$td/%1$tm %1$tH:%1$tM:%1$tS]"		<calendar>	(gTheHub, gLastReboot)

Another question:
You may have said elsewhere that a last updated date does not require a rule any more (I could be wrong). Is this done by creating an additional channel (and date/time item) and select a profile on e.g. ‘timestamp on update’?

I have a water level channel as number, and thought I could link the last updated item to it. but it did not give me the option to select ‘timestamp on update’. so it must be create channel and item.

Nearly. The channel belongs to the Thing, and you need only the one.
Because each channel may be linked to multiple Items.
So you can link a channel in ‘normal’ way to an Item
and
link same channel to a DateTime Item with that link modified using the timestamp profile.

The GUI restricts approach here, it cannot guess that you might want to create a DateTime Item related to a number channel etc. This is “adevanced” configuration - as I understan it, come at the other way, Create your Item first and link to channel after, then apply profile to link.

The point is if, for example, you are working on your heating automation, you can pin all the Things, Items, and rules that involve heating. You can interact with the Items and navigate between them all without losing the pins.

If all you are looking to do is modify members of a single Group, navigate to the Group and you can get to all the members from there.

Only Items that have a correct semantic tag are in the model. Any Item without a semantic tag or an incorrect semantic tag are outside of the model. “Pin from model” will only show those Items that are in the semantic model.

Depends on what you mean by “manage”. There are lots of operations and what makes most sense for any given one operation depends on the specific operation and other details (e.g. are the Items part of the semantic model or not.

If you enter a search from the Items page, go to an Item, then go back it will remember the search. Are you looking for something different?

Nov-07-2022 07-41-52

It should have remembered the search term (as shown above).

My problem is exactly as you’ve described. I cannot link the date item to a number channel for the ‘timestamp update’.

When I try to link from the item to the channel, I get no selection of channels:


I can select the thing though.

If I go to the thing:
image
to select to link another item, the ‘IrriTank: Last update’ does not show.

What am looking at?
A bug?
Not how it is supposed to work?
I am doing something wrong?


Well, I may not understand it all yet, but I am not using the model and/or tagging. At least I am not aware of it. My focus is on getting items and rules across, and creating the required things and channels to make it work.

When I want to pin, the window below comes up and shows me a bunch of Zeva things (only). when I tick the ‘show non-semantic’ box, I get a bunch groups I’ve created, but not all the groups I have created.

Also, you are correct with add a search terms go to one of the items and go back and the search list is still there. However, if you search, go to an item on the resulting list and then change a property and go back, a list of all items will be shown.

I can see that those Zeva things are indeed tagged with the Point tag of Status. That makes them a part of the Semantic Model and is why they appear by default.

I’m not sure why not all your Groups are appearing though. That might be a bug of some sort but there’s not enough information here to say for sure.

If I’m dealing with Items that are not in the semantic model, I just search for them.

Quickly pin those Things, Items, and Rules I actually care about

When I’ve got everything clear out the search filter by clicking the gray x and I’ve got everything right there.

If I need to edit a bunch of Items, I’d work down the list and unpin them when I’m done to keep track of where I am in the list. click the pencil icon to go to that entity’s page. You’ll note that the developer sidebar sticks around even as you navigate around and change settings.

Above I navigated to the Main Floor Humidity Item and opened the default list item widget to edit. If I decide “oops, I need to change the rule!”

The Items and Things are still there pinned to the sidebar. You’ll see we see the states of all the Items and status of the Things and Rules.

Let’s test it by changing the setpoint.

Items that are controllable will have a widget letting you manipulate the Item’s state from the sidebar (I think the control is based on the semantic tag, this is tagged with Setpoint so I get a slider).

I can manually run a rule (blue triangle icon). I can enable disable the Thing or the rules (gray circle with pause icon).

Let’s say I need a more complicated set of events to test things with. I can pull up the scratchpad where I can write some rules code.

All the stuff I pinned is still there in the pin tab. I didn’t lose those.

Oh, I need to create a new Thing/Item/Rule/Widget/Page!

So, to specifically do what you described, editing a bunch of Items in sequence, I’d use the search on the developer sidebar to find and pin the Items. Then I’d click them one by one, make the change then unpin it and move on to the next.

If you are not using the semantic model yet, anything that references “Model” is not going to be of much use to you.

1 Like

Based on initial input on my query to migrate from OH2 > OH3 and have a working system as quickly as possible, I have taken the approach to create:

  1. groups in the UI
  2. items in the UI
  3. things in the UI
  4. channels in the UI
  5. link items to channels
  6. update items with meta data (usually state descriptions | pattern)
  7. add rules via .rules files
  8. fix all issues in rule files
  9. done.

I am still in the process with the above list.
Have some 450 items out of 1,100.
Rules are lagging, as these would interfere with current system, as I am using the same MQTT broker (as most of my stuff talks MQTT).

Once done, I will address the graphing, then the model.

As you migrate your rules, you can modify the MQTT topics OH publishes to to a test set of topics. That way they can consume the same incoming messages as the original but publish to another set of topics so as not to interfere with the live system. You can use the logs and an MQTT client like MQTT Explorer to verify they are working correctly and then just modify the MQTT Things in the end to “go live”.

This sort of approach isn’t available to most bindings but it is for MQTT.