Replace the ', ' with \n and it should show each Item name on it’s own line.
Using a map the equivalent would be:
console.info(items.getItemsByTag('Point')
.map( (item, index) =>
index + " " + item.tags + "--" + item.name )
.join("\n"));
My understanding from what was said above is that Point, Equipment, and Location were removed as valid tags. If that’s not the case nothing needs to be done at all.
It is not time consuming to create new tags, but there is no UI in MainUI to do it yet. You need to create a file or the REST API but it’s no more time consuming than creating an Item. Once created the custom tag will appear in all the same lists as the official ones.
See OH 4.1: Tutorial to manage custom semantic tags though the syntax of the file may have or will slightly change in OH 5 but the upgradeTool has been modified to fix your yaml automatically.
An example from my setup (located in $OH_CONF/tags/my_tags.yaml):
version: 1
tags:
Location_Home:
label: Home
description: A house or home.
synonyms:
- House
- Building
Location_Indoor_Room_LivingRoom_Den:
label: Den
description: A living room with a TV.
synonyms:
- Game room
- TV room
Location_Indoor_Room_LivingRoom_FrontRoom:
label: Front Room
description: The front room of the house where guests are received.
synonyms:
- Sitting room
- Music room
Location_Indoor_Room_UtilityRoom:
label: Utility Room
description: "Room with HVAC, hot water heaters, laundry, etc."
Equipment_Service:
label: Service
description: A software service that provides something relevant to the home automation.
synonyms:
- Software
- API
- Daemon
Equipment_Occupancy:
label: Occupancy
description: An equipment that monitors occupancy in a space.
Point_BatteryProperty:
label: Battery Property
description: A property of a battery.
Property_Availability:
label: Availability
description: Indicates the availability of a service or device.
synonyms:
- Online status
- Offline status
- Online/Offline status
Property_Media:
label: Media
description: Streaming audio or video.
synonyms:
- Video
- Music
- Stream
Property_Cost:
label: Cost
description: The amount of money something requires.
Property_Cloudiness:
label: Cloudiness
description: Having to do with clouds.
Property_Weather:
label: Weather
description: Having to do with weather conditions.
Property_Time:
label: Time
description: Having to do with time.
Property_Image:
label: Image
description: "Consisting or related to an image, perhaps from a camera."
Note, a lot of if not all of these have new “official” tags, but I’ve not moved to the new tags yet. Please check the lists of new tags before copying these custom tags. I post them here for illustrative purposes only. The synonyms are mainly used by HABot I think.
A good model would be setting the Semantic Class to something more meaningful, like “Sensor” and the Semantic Property to “CO2”.
No, the discussion was to make sure that you as an end user do not need to change anything.
No.
The list of Location and Equipment tags is not going anywhere. But it might happen that a warning gets logged if you use the root tag “Location” or “Equipment” instead of a tag lower down in the hierarchy (e.g. “Kitchen” or “lightsource”).
However, it’s a little hard to interpret what you’ve done when it comes to tags so it’s hard to tell if your model could be better.
But there are some tags that have moved around and changed types (for example “lightsource” might be a better choice than “lightbulb”). So some care needs to be taken.
Semantic tags exist in a hierarchy. Take the “Kitchen” semantic tag. The hierarchy for that is:
Location
|_ Indoor_Room
|_ Kitchen
Using “is a/has a” language, a Kitchen is an Indoor_Room is a Location. So when you tag a Group with “Kitchen” you are specifying that Group as a Kitchen, Indoor_Room, and Location all at the same time. If you take my “Den” tag from above you’ll see it’s Location_Indoor_Room_LivingRoom_Den meaning that any Group I tag with “Den” will also be a “LivingRoom”, an “Indoor_Room”, and a “Location”.
There is a similar hierarchy for Equipment, Point, and Property, with “Equipment”, “Point” and “Property” being at the top of the hierarchy.
The discussion is whether it ever makes sense to use just “Location”, “Point”, or “Equipment” as the tag instead of one of the tags lower in the hierarchy (and therefore tags with more meaning). I think/hope we have settled that no, it doesn’t really make sense to continue to use these root tags but removing them would be a bad idea right now.
tl;dr: the whole discussion was to ensure that you as an end user do not need to change anything. But if you are using the literal tags “Location”, “Equipment”, or “Point” directly on any Items, you should consider choosing a more specific and meaningful tag.