I usually try to create an additional item (e.g., with the average temperature) and add it to a specific channel — in this case, as a second item (one with the measured temperature and the other with the average) — I hope I’m doing it according to OH best practices…
But once I created an item that has a “strange” icon in the model, I can’t see it pinned to anything, and it’s not visible anywhere in the channel list in thig.
Is it normal that I can’t find it pinned to this thing anywhere? I noticed this because after upgrading to OH 5.1.0, this item suddenly appeared in the model without a parent. So I set a parent, but it has a ‘strange’ icon.
It’s not clear to me how you can use the same channel to get the measured temperature and the average temperature. That part seems weird. Usually there is either a separate Channel for the average, or you need a rule that triggers on updates to the first Item to calculate the second one with the average. I suppose a script profile could do this too but you don’t say.
That means it’s not in the model. There is nothing wrong with that. Not all Items belong in the semantic model. Only Items with at least one semantic tag will be considered as part of the semantic model.
You don’t show the Item config (code tab) so :shrugging.
No, but if there is something mess up with the link between the Channel and the Item it won’t show up there,
Items that are not in the semantic model do not always appear under a parent. Usually such Items wouldn’t be added to a Location because there’s no point to have an Item half in and half out of the semantic model.
If the Item is updated by a rule, it shouldn’t be linked to the Channel. It gets it’s updates from the rule and only the rule.
There is definitly something wrong with the link on this Item for sure. But my point is that this Item shouldn’t be linked to the same Channel in the first place.
The flow should be as follows:
MQTT Temperature message published → MQTT Binding receives message and updates Temperature Item → rule triggers to calculate the average → new average is posted as an update to the average temperature Item.
Nowhere does the average temperature Item communicate with the MQTT Thing. It shouldn’t be linked to any MQTT Thing’s Channels.
If you needed to publish this new average or if the original device published the average than the average temperature Item would the linked to a different channel from the temperature channel.
The only time it makes sense to link the same Channel to a Temperature and Average Temperature Item is if you have a profile on the latter which calculates the average on the fly. But that’s not what you are doing here.
The whole approach doesn’t make sense.
As for where the Item appears in the semantic model, without the Item’s configuration . Based on the screen shot that Item has no semantic tags on it.
The model doesn’t have any direct connection to Things. The model is an organization of Items only. It is true that you can use Thing Channels to quickly create Items that are organized according to the semantic model, but that is just a shortcut. Just because you see an Item listed as a point in an equipment does not mean that Item must be linked to the Thing that equipment represents.
That equipment node in the model is just a Group Item. Your “strange” Item is definitely a member of that Group. Go to the Items page and search for your equipment Item in that page and click on it to see its details and you will see your “strange” item listed as a member of that group.
If you go to the page for the Item itself, my guess is that you will see this:
Indicating that there is no Channel Linked to this Item.
Depending on what you upgraded from, there were a lot of changes to the semantic tags. It sounds like you might have had a tag on this item that was not previously a semantic tag, but has become one in the new tag update so suddenly this item was included in the model. You then moved it from not having a parent to inside this equipment group, but again, that has nothing to do with connecting it to a Thing.
If you don’t want to see this item in the model, then remove it from the equipment group manually and delete whatever tag it has that identifies it as a semantic item.