-
Notifications
You must be signed in to change notification settings - Fork 780
(Optionally) Define the physical location of a Thing #1083
Comments
Perhaps it is enough it is very intuitive for the user to handle the group of the items of a thing:
The difficult part with that string is that the information that is coded does vary (if I understood it correct). |
I assume you mean the properties? Yes, this could be an option. Actually, it is nowhere defined that only bindings are allowed to set them - a UI can use the REST API and send an updated Thing with changed properties. So a simple solution might be to simply define "location" as a fixed property key for this purpose. |
+1 for having the location as property. This is easy to integrate and fits well with the other properties |
I am not convinced. The "other properties" are meant to be static information about the thing (such as its serial number, its color, etc. Think of immutable values here). The location is a user specified and potentially changing information. It is rather comparable to the "label" of a Thing. And thus, I would tend to say that similar to the label, it might be worth to specify a "real" property for the location as well. Using the Thing properties feels to be rather a comfortable shortcut as they are already there.
This discussion should rather happen in the issues #1039 and #1093. |
I would agree with Kai - use a specific member of the thing. Another issue with properties is that they are flexible, which is great, but from a UI perspective, or an 'ESH concepts' perspective, may not be idea. By this, I mean that if ESH wants to have the concept of a location, then using properties, and telling UIs or bindings etc to use a property called 'location' doesn't really ensure that the concept is enforced as in reality, you can do what you like and call it something different. |
There are properties for e.g. serial numbers. A device does not need to have a serial, but there is a "key" constant provided by ESH that should be used for serials. So I do not fully agree. Perhaps properties are not the right place, but I would prefer not to introduce an always available field to a thing. Locations are useful for some UIs, but for embedded systems that do not need any visualization the field is just unused. Perhaps (that was the intention of my comment above (#1083 (comment)) we could use another key / value map (as written above, there could be well known keys as already done in ESH for properties) for stuff the user could set and (for well-known keys) could be evaluated by some special UIs. I don't think the location is such a fundamental stuff of a thing that it is a mandatory property (such as a label field) and should be available optionally. |
Have to read that saref stuff.... |
The very same holds true for the label. The difference between label/location and the properties that describe the Thing is for me who defines them: In the one case (properties), it is the binding, in the other (label/location) it is the user. |
Can't a binding be allowed to update the locations of the things it manages? Why is a distinction being made between who can update the data? Some bindings can identify in which rooms its devices are located, some can identify the street address, some can identify the lat,long, etc. I worry about creating different collections of metadata depending on who or what is envisioned will be updating it. Should users be able to link/unlink channels to these metadata fields as they do with items? |
Never - the only thing it might do is to suggest a location, but this should probably be done through tags. Note that we are talking about references to Group items here, which represent a room - these items are maintained by the user and only himself. Otherwise you will end up having 5 different living rooms, because every device has another name or definition.
These infos could qualify as properties on the things as they are defined by the binding. But this cannot be directly mapped to any Group item by the binding itself (we are not talking about location items here). |
It seems you have already a concrete idea how it should be implemented. ;)
Using the location of a thing field, will it be allowed to set multiple
locations / groups for the devices?
Do you plan only one location or also multiple physical locations (floor
and room of a floor) e.g. room1,floor1 for thing1 and room2,floor1 for
thing2 and room3,floor2? So I can filter for things of a room, things of a
floor.
|
Not really, I just know that the current way (requiring an item for the Thing and assigning this item to a Group item) is not quite right and I want to get rid off it.
I would keep it simple and really just add a single String field to a Thing. After all, any Thing can only be at a single physical location. If there are containments (like room in floor etc.), this should be dealt with on the locations. |
I would recommend an WGS84 lat/lon coordinates with floor number as third dimension in one String field. Definition of relations between spatial entities works best with set theory. Define rooms/floors/building als (planar) 3D polygon and you can simply query all things which are inside this area – probably in most cases cubes. I personally would use geodatabase extensions like PostGIS or SpatiaLite, but you really want you can also optimize at application level e.g. via geohashes. Another questions if one should model rooms as separate entity type, or also simply as thing. Maybe adding adding a simple geometry field containing a GeoJSON string would be enough. But I'm not sure things without a binding corresponding can exist. ;-) |
I personally doubt that it's realistic to let every user determine the precise lat/long coordinates of each thermostat or wall switch. While it's a funny idea, it's simply not realistic to use coordinates for distinguishing between living room or toilet. |
@saerdnaer As @SJKA says, this issue is only about holding a reference to something that defines the location. |
@SJKA I do not understand what's unrealistic in your point of view. Of course users will not input coordinates by numbers, they select the device position via a floor plan. There are already products like ABB-free@home where it's done in a similar way: http://new.abb.com/docs/librariesprovider84/freeathome/system-manual_free@home_en_abb_05_03.pdf -> page 20ff. |
fixes eclipse-archived#1083 Signed-off-by: Simon Kaufmann <[email protected]>
@saerdnaer let's stick to strings where you maintain references to items. Your are free to use coordinates there then... |
How would you set a location for a mobile, moving thing? Like a laptop, mobile phone or BTLE tag for my dog? These might move around the house only (so use smallest possible location 'home') or move outside as well. And how does this location property relate to presence? |
@Rtvb Use the item name as the location reference and then update your item. |
fixes eclipse-archived#1083 Signed-off-by: Simon Kaufmann <[email protected]>
I am re-opening this issue in order to also add support for this new property in the Paper UI. I would like to see two features there:
|
Is the "use the item name as the location reference" something that could be done or something that should be done? If it is the common use case, I think that should be considered while changing the Paper UI. |
As discussed in #1083 (comment), we do not have the general assumption that it has to be an item name. Maybe we can come to such a definition, but before doing so, I would like to come to conclusions on #582 and #1093, so that it is also clear, what items (types/tags) we should filter when providing selection options in the Paper UI. |
@aounhaider1 Thanks for #1764. |
I'm a newbie, so I'm definitely naive to this, but I created groups in my items file for different locations in the house, but the items don't seem to be loading. When I create an item using paper UI I don't have an option to select a location. I remember adding something the other day and it had my groups in the pull-down menu. Where did I screw up? Is it because I'm not using an item from my manual item list? |
So far, the Paper UI allowed assigning Things to item groups, but this will be removed soon.
While items (and their group association) provide the functional location, it can be useful for managing a building topology or for having some default suggestion for the functional locations, to be able to define a physical location as well for a thing.
My suggestion is to add this as a new information to a Thing, which is simply a String value, which (optionally) refers to a (group) item name. Note that this means that you won't see the things as a "member" of the group item, since only items will be available there. So for retrieving all Things within a certain location, you will need some external logic which iterates through all things.
The String reference will make it easy to potentially adapt this to new concepts, in the case that something new gets introduced with #582.
The text was updated successfully, but these errors were encountered: