-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device Ontology #7
Comments
Heater concept is repeated in HVAC ontology. Should it be maped in HVAC or removed from Device? |
Add grouped device concept. In KNX as well as many other protocols there are virtual devices that actualy control a collection of devices (e.g: there are 2 LightControllers which can be controlloed independently, there is a third LightController which is also a group device that controlls both lights simultaneously, using a single command in the protocol) |
Add automated door concept, same as windows. |
Define MeasureSensor which give measurements (with value and unit from the measurement Ontology). |
If I remember correctly, there was a need to fix some hierarchy issues wtih devices. Right now when you query a device form CHE with SPARQL, the inferencer says it is of every type of device there is. I think I looked into this some time ago and it was because of a bad definition of classes in DeviceOntology, but I'd need to go thoruhg it again. What I mean is, let's take this chance fix this too. |
Check duplicities and coordination with Ativity hub ontology. |
It's not only the ActivityHub ont; there are other onts as well. |
I think the overlap in these ontologies have to do with other kind of devices, maybe it is more productive to set another issue for health devices ontologies. |
We used to have water ontology. EDIT: there is WaterFlowController -> wich may as well be both pumps and valves. Sooo disregard... |
There is always a reason for grouping. If you look closer into it, you see that grouping is usually done based on common features, e.g. same location, same type, same color, same size, etc. (same, or a range of, or ...). In an ontological approach, grouping is done either dynamically in terms of a query (can be a class expression, usually putting certain restrictions on certain properties) or "persistently" by defining new (sub)classes in an ontology (again using class expressions). In KNX, there is no concept for
|
I think you are confusing this with something else. KNX does have groups (or classes). The destination is either a physical or group address (a bit in the DLR byte determines whether the adress is a physical or group adress). Example: physical: 1.1.1, group: 1/1/1 (dot vs. slash). For a single message sent to a group adress, multiple devices can react on that message. But: KNX (just as example) separates the adressing from the message content, meaning that you can send any message (command) to any adress. You can send a dimming request to a washing machine (or whatever). There is a similarity between this discussion and the discussion we had on situation ont (and/or reasoning rules). The group adress would somehow combine multiple devices, whereas a situation would be a representation of a group of multiple triples (and a rule would be multiple class expressions without necessarily having concrete values for rdf:object). I wonder if this can somehow be considered together... |
There is a problem with the property hasValue: in the super class (ValueDevice) it is defined as ObjectProperty, but some sub classes re-define it as DatatypeProperty. This is not possible. A property is either ObjectProperty or DatatypeProperty, it cannot be changed in sub classes. |
> I think you are confusing this with something else. KNX does have groups (or classes).
Yes, groups of instances (enumerations) are indeed also classes; so are groups of groups and groups of combinations of groups and instances. But, this kind of support for classes is certainly far from the ontological full support for classes. That's what I wanted to point out. I mean, this item defines something as a requirement, that seems to be a no-op. But, maybe there is something else that Alejandro is missing and not just the ability of building groups that is already given in a much more powerful way.
|
OK, I understand. So, to define a grouped device, like a central light switch that represents the 2 light source light1 and light2, the OWL-way would be:
This would then either (1) be defined as a new ontology, so that it can be used in a ServiceRequest, or (2) it would be given directly as request. Which means that the ontology-definition, matchmaking, and/or request must be extended to support this, but not device ont. Correct? |
@cstockloew about hasValue: yes, this is part of the long overdue review of the ont.device to fix these things, including some weird hierarchies. But if I wanted to do seomthing like that, how would it be properly done (if at all)? I mean, defining that a Device has a hasValue property, but let subclasses specify what kind of value it is. |
|:CentralLight a owl:Class ; |
|owl:equivalentClass [ a owl:Class ; owl:oneOf ( :Light1 :Light2 ) ] .|
Also definable in this way:
:CentralLight a owl:Class ;
owl:oneOf ( :Light1 :Light2 ) .
But maybe the purpose of this enumeration is to say 'all lights in the
whole home' or 'all lights in the living room'. If so, then it is safer
to avoid using enumerations because they are rigid and cannot reflect
future changes.
This would then either (1) be defined as a new ontology, so that it
can be used in a ServiceRequest, or (2) it would be given directly as
request.
The light ontology may readily support some of the frequently used
patterns, but always there may be also need for deployment-specific
ontology extensions to facilitate deployment-specific use cases.
Which means that the ontology-definition, matchmaking, and/or request
must be extended to support this, but not device ont.
I do not understand the need for extending the matchmaking though, but
yes (see the "deployment-specific" items mentioned above.
|
Without saying that we should actually do it that way, I think the correct way in OWL would be to define two different properties, e.g. hasDataValue and hasObjectValue. Maybe with some more meaningful names, like hasLevel (for an integer) and hasStatus (for an enumerated value). But I did not yet have a look at all classes to see if it fits. Generally, the sub classes cannot change the type, they can only restrict the property further. I see that some classes define hasValue as float and some as integer. Thus, in the super class, the property can only be defined as DatatypeProperty, but without restrictions; at least no type restriction, but you can define cardinality restrictions. |
Let's go with your definition: How would I define a service request to turn off all lights (= turn off the CentralLight)? If the server only understands to turn off a specific lamp? |
I personally lean more towards this, but we'll see... |
I understand the semantical powers you reffer to, but the problem has to do with a limitation on the device protocol. The exporter can send the same command to many devices but if we use the semantical aggregation in the end this means that the exporter has to send a single command for each member of the group, and these commands cannot be send in paralell (many mediums of domotic devices do not allow this, and in case of my experience with the KNX installation in the Smart House Living Lab in Madrid, KNX does not behave well when you burst commands to it). |
how about subproperties? Actually subproperties whould allow to define logical devices that are subclasses of multiple device types and still be able to report/control each part of it independently. eg: a regulated light might be sub class of DimmerController and LightController |
Remember there are other types of ValueDevice, essentially many of the Sensors, maybe Sensor should be on a different hierarchy, actually then there would be 2 properties: "hasStatusValue" (for sensor) and "setStatus" (for actuators).
A thought I just had: maybe there is a middle layer of abstract classes in the hierarchy to define the different properties with their property types. |
Same problem: the subproperty must be of the same type than the super property (either ObjectProperty or DatatypeProperty). I'm afraid we have to go with two props. |
how about this (Only an Idea), make an ObjectProperty only, this way sensor can restrict to measurement or enumeration types; for actuators we will have to define a new class similar to mearurement but conceptually different (imposing a status insead of measuring it); then this class can actually accomodate some of the needed semantics such as absolute or relative addressing (is the integer referring to a percentage, and does this perdentage refer to the absolute setting or the variation in the change). |
IMHO, no, it doesn't, like it wouldn't make sense to have verb-things like "open" "light up", etc... which should become deducible from the change of status. This is the old dichotomy between status-based and operation-based context awareness. Sorry for the terms, I know there are more scientifically accurate ones, but I think it's easy to understand. I'm more on the status-based side. |
fully agreed.
This is possible, although it would complicate many things. For example, I would say: the information, that hasBrightness is a percentage value, is already provided by the definition in the ont (it's an integer 0<=x<=100). There is also a (currently abandoned) class called "Conversion" in org.universAAL.middleware.service.owls.process which AFAIK was meant to convert the values provided by a Callee to the format that the caller requires. From my understanding, the ont should be clearly defined, including the range of values. The caller should always provide the data in that format (or in that unit) - even if the caller would somehow get (or measure) the raw value in a different unit, and even if the requester actually wants the value in a different unit. |
But a group adress would then only be used if the request contains exactly the members of the group. Thus, no device is adressed if it was not part of the request. There is, however, a different aspect that needs to be considered: the context bus. If you send a command to a group adress, then the change for each element somehow has to be published to the context bus. Let's assume that you have a subscriber that has subscribed for a specific device (light1) and you have a request for a group adress (g1={light1, light2}). Then, the server must also send one (or more) appropriate events. You can only send an event for a group (g1) if the group is somehow ontologically modelled so that the bus can make the correct match (the bus knows: g1={light1, light2} and light1 elementOf {light1, light2}). |
in deed, this was the other reason to propose the group, no for the context bus to reason it, but for the exporter it self (or a reasoner) to manage it, so if it has to publish a g1, then it iterates and also publishes light1 and light2 changes. BC that is also maintaining the correct state (in Che) for the members of the group this is necesary. |
hmm, it's either getting more clear or I'm getting more confused (not sure, yet). Saied is right by saying
It doesn't make much sense to have a group of devices when then command to sent to this group is not understood by all of the devices. There is still the open question:
I guess, the answer would be: the group represents a set of LightActuators, or a set of WindowActuator, or a set of any other kind of Actuator (is there a reason to have a group of sensors? it's only actuators, isn't it?). Thus, it appears as one of these concrete actuators and this actuator has certain properties. Thus, the group itself is also an individual, even if it represents a group of devices. Agreed? Normally, the low-level protocols like KNX don't use URIs, so there must naturally be a mapping from KNX-adressing to URIs. It can be done internally with no direct relation, but it can also be part of the URI, e.g.: If we assume all of the above, then the group would appear as a normal device. It can be retrieved by getting all lights: getControlledLights would return {light1, light2, g1}. To find out if a device represents a group of devices, we could use the location. A single device has s specific location, like kitchen, but a group normally has a bigger location, like the appartment. However, this information might be too cumbersome, or not concrete enough. Another way would be to add the proposed class GroupedDevice and make the type of the group individual (g1) to both, GroupedDevice and the Actuator class, e.g.: Another way would be to avoid GroupedDevice and use (as Saied pointed out)
Let's go back to:
Although the definition is correct in terms of OWL, it creates a class called CentralLight whereas it actually should create an individual. We can re-write this for the example above: But at this point, I'm stuck in an endless owl-logic-loop. Because this does not say "g1 represents the class with the elements light1 and light2". Instead, it says "g1 is an element of the class that consists of light1 and light2", which effectively means that g1 is either light1 or g1 is light2 (but not both). At this point, I need help for the ontological modelling. |
My current solution is like @cstockloew states: the group is an idividual of class the same as the grouped devices (or in general terms the minimum comon denominator class), and of the class GroupDevice; where GroupDevice class defines a property "groupsDevices". Also at some point I had a property, belongsToGroup for Devices to state their groups (but I did not use it). |
It sould be specified that device ontology is not for all devices, but for devices in the smart home environment |
PanicButtonSensor should be subclass of ButtonSensor. |
That's why the class Device is in PhWorld ont and not in device ont. There are also other onts that use Device without the device ont. How should the specification look like, javadoc? |
maybe a rename of code and URI, to something like ont.device.home (so we can have ont.device.health, and ont.device.HVAC, ...) |
SSN: Making universAAL cores already standard ontologies will be very benefitial. Although some of it overlaps with other ontologies (such as Measurement). in fact it is not that difficoult, we could start by using SOSA which is already very similar to the upper device ontology; but we complement with our device types. |
look into SAREF too |
This issue is to discuss improvements to the device ontology.
The text was updated successfully, but these errors were encountered: