Hi guys,
Yesterday I upgraded to OH3 and it all worked great, so far no issues and I had do fix actually nothing worth mentioning, great job!
I now try to get behind the semantic model and how I can configure it in my files as I like the textual config. I might not have found the right documentation to fully understand the semantic model, so I have some questions…
I have some Xiaomi Sensors for Temperature, Humidity and Pressure. Based on this table I have found in the forums (smarthome/SemanticTags.csv at master · eclipse-archived/smarthome · GitHub) I assume the Sensor Thing would be an “Equipment” and the measurements would be “Properties”? Unfortunately this github page does not mention a generic sensor for measurements. Nevertheless another forum post ([wiki] Getting Started with OH3: rewriting the tutorial - 6. Model your home with Items & link Channels) contains a picture with an Equipment type “Sensor”.
Based on my understanding I set the Sensor up like this in my files:
//Livingroom
Group XHTP03 (W2_Livingroom) ["Sensor"]
Number:Temperature XHTP03_Temperature "Temperature" <temperature> (XHTP03) ["Temperature", "Measurement"] { channel="mihome:sensor_weather_v1:04cf8c8f9bcd:158d00025ee3f0:temperature" }
Number:Dimensionless XHTP03_Humidity "Humidity" <humidity> (XHTP03) ["Humidity", "Measurement"] { channel="mihome:sensor_weather_v1:04cf8c8f9bcd:158d00025ee3f0:humidity" }
Number:Pressure XHTP03_Pressure "Pressure" <pressure> (XHTP03) ["Pressure", "Measurement"] { channel="mihome:sensor_weather_v1:04cf8c8f9bcd:158d00025ee3f0:pressure" }
Number XHTP03_Battery "HTP Sensor #3 Battery [%s %%]" <battery> (XHTP03) ["Battery", "Measurement"] { channel="mihome:sensor_weather_v1:04cf8c8f9bcd:158d00025ee3f0:batteryLevel" }
Switch XHTP03_BatteryLow "HTP Sensor #3 Battery Low [%s]" <radiobutton> (XHTP03) ["LowBattery", "Measurement"] { channel="mihome:sensor_weather_v1:04cf8c8f9bcd:158d00025ee3f0:lowBattery" }
Can someone tell me if this is correctly setup based on the semantic model?
So I put all individual items in a group with model type “Sensor”.
I see that “Battery” is an Equipment in the table and not a Measurement, this confuses me.
Also I assume “BatteryLow” should be “Status” based on the Model picture, but how can I define this in the file that it makes sense?
This is how it looks now in the UI:
Also another question:
I can define my living room as e.g. type “Location”, “Room” or “LivingRoom”.
Is there any advantage right now in defining it as a “LivingRoom” instead of the generic types?
Group House "House" <location> ["Location"]
Group W2 "Flat Top2" <flat> (House) ["Location"]
Group W2_Livingroom "Livingroom" <sofa> (W2) ["LivingRoom"]
Thanks in advance