Skip to content
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

[OmniLink] Add semantic tags to channels #11100

Merged
merged 9 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ public class OmnilinkBindingConstants {
public static final String THING_PROPERTIES_NUMBER = "number";
public static final String THING_PROPERTIES_AREA = "area";
public static final String THING_PROPERTIES_AUTO_START = "autostart";
public static final String THING_PROPERTIES_MODEL_NUMBER = "modelNumber";
public static final String THING_PROPERTIES_MAJOR_VERSION = "majorVersion";
public static final String THING_PROPERTIES_MINOR_VERSION = "minorVersion";
public static final String THING_PROPERTIES_REVISION = "revision";
public static final String THING_PROPERTIES_PHONE_NUMBER = "phoneNumber";

public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Set.of(THING_TYPE_OMNI_AREA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,11 @@ private void updateBridgeProperties() {
try {
SystemInformation systemInformation = reqSystemInformation();
Map<String, String> properties = editProperties();
properties.put(THING_PROPERTIES_MODEL_NUMBER, Integer.toString(systemInformation.getModel()));
properties.put(THING_PROPERTIES_MAJOR_VERSION, Integer.toString(systemInformation.getMajor()));
properties.put(THING_PROPERTIES_MINOR_VERSION, Integer.toString(systemInformation.getMinor()));
properties.put(THING_PROPERTIES_REVISION, Integer.toString(systemInformation.getRevision()));
properties.put(Thing.PROPERTY_MODEL_ID, Integer.toString(systemInformation.getModel()));
properties.put(Thing.PROPERTY_FIRMWARE_VERSION,
Integer.toString(systemInformation.getMajor()) + "."
+ Integer.toString(systemInformation.getMinor()) + "."
+ Integer.toString(systemInformation.getRevision()));
properties.put(THING_PROPERTIES_PHONE_NUMBER, systemInformation.getPhone());
updateProperties(properties);
} catch (OmniInvalidResponseException | OmniUnknownMessageTypeException | BridgeOfflineException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ thing-type.omnilink.audio_source.label = Audio Source
thing-type.omnilink.audio_source.description = An audio source configured in the controller.
thing-type.omnilink.audio_zone.label = Audio Zone
thing-type.omnilink.audio_zone.description = An audio zone configured in the controller.
thing-type.omnilink.audio_zone.channel.zone_control.label = Control
thing-type.omnilink.audio_zone.channel.zone_control.description = Control the audio zone, e.g. start/stop/next/previous.
thing-type.omnilink.audio_zone.channel.zone_mute.label = Audio Zone Mute
thing-type.omnilink.audio_zone.channel.zone_mute.description = Mute status of this audio zone.
thing-type.omnilink.audio_zone.channel.zone_volume.label = Audio Zone Volume
thing-type.omnilink.audio_zone.channel.zone_volume.description = Volume level of this audio zone.
thing-type.omnilink.button.label = Button
thing-type.omnilink.button.description = A button configured in the controller.
thing-type.omnilink.console.label = Console
Expand All @@ -21,8 +27,14 @@ thing-type.omnilink.controller.channel.beep.label = Beep Consoles
thing-type.omnilink.controller.channel.enable_disable_beeper.label = Console Beepers
thing-type.omnilink.dimmable.label = Dimmable Unit
thing-type.omnilink.dimmable.description = A dimmable unit configured in the controller.
thing-type.omnilink.dimmable.channel.level.label = Dimmable Level
thing-type.omnilink.dimmable.channel.level.description = Increase/Decrease the level of this dimmable unit.
thing-type.omnilink.dimmable.channel.switch.label = Dimmable Switch
thing-type.omnilink.dimmable.channel.switch.description = Turn this dimmable unit on/off.
thing-type.omnilink.flag.label = Flag
thing-type.omnilink.flag.description = A flag configured in the controller.
thing-type.omnilink.flag.channel.switch.label = Flag Switch
thing-type.omnilink.flag.channel.switch.description = Turn this flag on/off.
thing-type.omnilink.humidity_sensor.label = Humidity Sensor
thing-type.omnilink.humidity_sensor.description = A humidity sensor configured in the controller.
thing-type.omnilink.lock.label = Lock
Expand All @@ -31,20 +43,38 @@ thing-type.omnilink.lumina_area.label = Lumina Area
thing-type.omnilink.lumina_area.description = An Lumina area configured in the controller.
thing-type.omnilink.output.label = Voltage Output
thing-type.omnilink.output.description = A voltage output configured in the controller.
thing-type.omnilink.output.channel.switch.label = Voltage Output Switch
thing-type.omnilink.output.channel.switch.description = Turn this voltage output on/off.
thing-type.omnilink.room.label = Room
thing-type.omnilink.room.description = A room configured in the controller.
thing-type.omnilink.room.channel.scene_a.label = Scene A
thing-type.omnilink.room.channel.scene_a.description = Turn this scene on/off.
thing-type.omnilink.room.channel.scene_b.label = Scene B
thing-type.omnilink.room.channel.scene_b.description = Turn this scene on/off.
thing-type.omnilink.room.channel.scene_c.label = Scene C
thing-type.omnilink.room.channel.scene_c.description = Turn this scene on/off.
thing-type.omnilink.room.channel.scene_d.label = Scene D
thing-type.omnilink.room.channel.scene_d.description = Turn this scene on/off.
thing-type.omnilink.room.channel.switch.label = Room Switch
thing-type.omnilink.room.channel.switch.description = Turn this room on/off.
thing-type.omnilink.temp_sensor.label = Temperature Sensor
thing-type.omnilink.temp_sensor.description = A temperature sensor configured in the controller.
thing-type.omnilink.thermostat.label = Thermostat
thing-type.omnilink.thermostat.description = A thermostat configured in the controller.
thing-type.omnilink.thermostat.channel.outdoor_temperature.label = Outdoor Temperature
thing-type.omnilink.thermostat.channel.outdoor_temperature.description = The current outdoor temperature detected by this thermostat.
thing-type.omnilink.unit.label = Unit
thing-type.omnilink.unit.description = A basic unit configured in the controller.
thing-type.omnilink.unit.channel.level.label = Unit Level
thing-type.omnilink.unit.channel.level.description = Increase/Decrease the level of this unit.
thing-type.omnilink.unit.channel.switch.label = Unit Switch
thing-type.omnilink.unit.channel.switch.description = Turn this unit on/off.
thing-type.omnilink.upb.label = UPB Unit
thing-type.omnilink.upb.description = A UPB unit configured in the controller.
thing-type.omnilink.upb.channel.level.label = UPB Level
thing-type.omnilink.upb.channel.level.description = Increase/Decrease the level of this UPB unit.
thing-type.omnilink.upb.channel.switch.label = UPB Switch
thing-type.omnilink.upb.channel.switch.description = Turn this UPB unit on/off.
thing-type.omnilink.zone.label = Zone
thing-type.omnilink.zone.description = A zone configured in the controller.

Expand Down Expand Up @@ -111,16 +141,10 @@ channel-type.omnilink.audio_source_polling.label = Audio Source Polling
channel-type.omnilink.audio_source_polling.description = Enable or disable polling of this audio source.
channel-type.omnilink.audio_source_text.label = Source Data
channel-type.omnilink.audio_source_text.description = A line of metadata from this audio source.
channel-type.omnilink.audio_zone_control.label = Control
channel-type.omnilink.audio_zone_control.description = Control the audio zone, e.g. start/stop/next/previous.
channel-type.omnilink.audio_zone_mute.label = Audio Zone Mute
channel-type.omnilink.audio_zone_mute.description = Mute status of this audio zone.
channel-type.omnilink.audio_zone_power.label = Audio Zone Power
channel-type.omnilink.audio_zone_power.description = Power status of this audio zone.
channel-type.omnilink.audio_zone_source.label = Source
channel-type.omnilink.audio_zone_source.description = Source for this audio zone.
channel-type.omnilink.audio_zone_volume.label = Audio Zone Volume
channel-type.omnilink.audio_zone_volume.description = Volume level of this audio zone.
channel-type.omnilink.battery_event.label = Battery Event
channel-type.omnilink.battery_event.description = Event sent when battery trouble conditions are detected.
channel-type.omnilink.button_activated.label = Button Activated
Expand All @@ -146,8 +170,6 @@ channel-type.omnilink.dcm_event.label = DCM Event
channel-type.omnilink.dcm_event.description = Event sent when digital communicator trouble conditions are detected.
channel-type.omnilink.energy_cost_event.label = Energy Cost Event
channel-type.omnilink.energy_cost_event.description = Event sent when the cost of energy changes.
channel-type.omnilink.flag_switch.label = Flag Switch
channel-type.omnilink.flag_switch.description = Turn this flag on/off.
channel-type.omnilink.flag_value.label = Flag Value
channel-type.omnilink.flag_value.description = Numeric value of this flag.
channel-type.omnilink.last_log.label = Last Log Entry
Expand Down Expand Up @@ -210,10 +232,6 @@ channel-type.omnilink.room_state.state.option.2 = Scene A
channel-type.omnilink.room_state.state.option.3 = Scene B
channel-type.omnilink.room_state.state.option.4 = Scene C
channel-type.omnilink.room_state.state.option.5 = Scene D
channel-type.omnilink.room_switch.label = Switch
channel-type.omnilink.room_switch.description = Turn this room on/off.
channel-type.omnilink.scene_toggle.label = Scene Toggle
channel-type.omnilink.scene_toggle.description = Turn this scene on/off.
channel-type.omnilink.sensor_humidity.label = Humidity
channel-type.omnilink.sensor_humidity.description = The current relative humidity at this humidity sensor.
channel-type.omnilink.sensor_humidity_high_setpoint.label = High SetPoint
Expand Down Expand Up @@ -255,8 +273,6 @@ channel-type.omnilink.thermostat_humidify_setpoint.label = Humidify SetPoint
channel-type.omnilink.thermostat_humidify_setpoint.description = The current low/humidify setpoint for this thermostat.
channel-type.omnilink.thermostat_humidity.label = Humidity
channel-type.omnilink.thermostat_humidity.description = The relative humidity at this thermostat.
channel-type.omnilink.thermostat_outdoor_temperature.label = Outdoor Temperature
channel-type.omnilink.thermostat_outdoor_temperature.description = The current outdoor temperature detected by this thermostat.
channel-type.omnilink.thermostat_status.label = Thermostat Status
channel-type.omnilink.thermostat_status.description = The current status of this thermostat.
channel-type.omnilink.thermostat_status.state.option.0 = Idle
Expand All @@ -273,10 +289,6 @@ channel-type.omnilink.thermostat_system_mode.state.option.3 = Auto
channel-type.omnilink.thermostat_system_mode.state.option.4 = Emergency heat
channel-type.omnilink.thermostat_temperature.label = Temperature
channel-type.omnilink.thermostat_temperature.description = The current temperature at this thermostat.
channel-type.omnilink.unit_level.label = Unit Level
channel-type.omnilink.unit_level.description = Increase/Decrease the level of this unit.
channel-type.omnilink.unit_switch.label = Switch
channel-type.omnilink.unit_switch.description = Turn this unit on/off.
channel-type.omnilink.upb_link_activated_event.label = UPB Link
channel-type.omnilink.upb_link_activated_event.description = Event sent when a UPB link is activated.
channel-type.omnilink.upb_link_deactivated_event.label = UPB Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
<channel id="night_delayed" typeId="area_command"/>
<channel id="all_on_off_event" typeId="all_on_off_event"/>
</channels>
<properties>
<property name="name"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand Down Expand Up @@ -77,6 +74,9 @@
<label>Area Alarm</label>
<description>Indicates if an alarm is active.</description>
<category>Alarm</category>
<tags>
<tag>Alarm</tag>
</tags>
<state readOnly="true"/>
</channel-type>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
<channel id="source_text_6" typeId="audio_source_text"/>
<channel id="polling" typeId="audio_source_polling"/>
</channels>
<properties>
<property name="name"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,19 @@
<description>An audio zone configured in the controller.</description>
<channels>
<channel id="zone_power" typeId="audio_zone_power"/>
<channel id="zone_mute" typeId="audio_zone_mute"/>
<channel id="zone_volume" typeId="audio_zone_volume"/>
<channel id="zone_mute" typeId="system.mute">
<label>Audio Zone Mute</label>
<description>Mute status of this audio zone.</description>
</channel>
<channel id="zone_volume" typeId="system.volume">
<label>Audio Zone Volume</label>
<description>Volume level of this audio zone.</description>
</channel>
<channel id="zone_source" typeId="audio_zone_source"/>
<channel id="zone_control" typeId="audio_zone_control"/>
<channel id="zone_control" typeId="system.media-control">
<label>Control</label>
<description>Control the audio zone, e.g. start/stop/next/previous.</description>
</channel>
</channels>
<properties>
<property name="name"/>
Expand All @@ -37,21 +46,10 @@
<label>Audio Zone Power</label>
<description>Power status of this audio zone.</description>
<category>Switch</category>
</channel-type>

<channel-type id="audio_zone_mute">
<item-type>Switch</item-type>
<label>Audio Zone Mute</label>
<description>Mute status of this audio zone.</description>
<category>Switch</category>
</channel-type>

<channel-type id="audio_zone_volume">
<item-type>Dimmer</item-type>
<label>Audio Zone Volume</label>
<description>Volume level of this audio zone.</description>
<category>Slider</category>
<state min="0" max="100"/>
<tags>
<tag>Control</tag>
<tag>Power</tag>
</tags>
</channel-type>

<channel-type id="audio_zone_source">
Expand All @@ -62,11 +60,4 @@
<state min="1" max="100"/>
</channel-type>

<channel-type id="audio_zone_control">
<item-type>Player</item-type>
<label>Control</label>
<description>Control the audio zone, e.g. start/stop/next/previous.</description>
<category>MediaControl</category>
</channel-type>

</thing:thing-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@
<channel id="upb_link_activated_event" typeId="upb_link_activated_event"/>
<channel id="upb_link_deactivated_event" typeId="upb_link_deactivated_event"/>
</channels>
<properties>
<property name="model number"/>
<property name="major version"/>
<property name="minor version"/>
<property name="revision"/>
<property name="phone number"/>
</properties>
<config-description>
<parameter name="ipAddress" type="text" required="true">
<context>network-address</context>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<channel id="press" typeId="button_press"/>
<channel id="activated_event" typeId="button_activated"/>
</channels>
<properties>
<property name="name"/>
<property name="area"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<channel id="low_setpoint" typeId="sensor_humidity_low_setpoint"/>
<channel id="high_setpoint" typeId="sensor_humidity_high_setpoint"/>
</channels>
<properties>
<property name="name"/>
<property name="area"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand All @@ -35,6 +31,10 @@
<label>Humidity</label>
<description>The current relative humidity at this humidity sensor.</description>
<category>Humidity</category>
<tags>
<tag>Measurement</tag>
<tag>Humidity</tag>
</tags>
<state readOnly="true" min="0" max="100" pattern="%d %%"/>
</channel-type>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
<channels>
<channel id="switch" typeId="lock_switch"/>
</channels>
<properties>
<property name="name"/>
<property name="area"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand All @@ -33,6 +29,9 @@
<label>Lock/Unlock</label>
<description>Lock or unlock this lock.</description>
<category>Switch</category>
<tags>
<tag>Control</tag>
</tags>
ecdye marked this conversation as resolved.
Show resolved Hide resolved
</channel-type>

</thing:thing-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<channel id="low_setpoint" typeId="sensor_temp_low_setpoint"/>
<channel id="high_setpoint" typeId="sensor_temp_high_setpoint"/>
</channels>
<properties>
<property name="name"/>
<property name="area"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand All @@ -35,6 +31,10 @@
<label>Temperature</label>
<description>The current temperature at this temperature sensor.</description>
<category>Temperature</category>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<channel id="comm_failure" typeId="thermostat_comm_failure"/>
<channel id="status" typeId="thermostat_status"/>
<channel id="temperature" typeId="thermostat_temperature"/>
<channel id="outdoor_temperature" typeId="thermostat_outdoor_temperature"/>
<channel id="outdoor_temperature" typeId="system.outdoor-temperature">
<label>Outdoor Temperature</label>
<description>The current outdoor temperature detected by this thermostat.</description>
</channel>
<channel id="heat_setpoint" typeId="thermostat_heat_setpoint"/>
<channel id="cool_setpoint" typeId="thermostat_cool_setpoint"/>
<channel id="humidity" typeId="thermostat_humidity"/>
Expand All @@ -26,10 +29,6 @@
<channel id="fan_mode" typeId="thermostat_fan_mode"/>
<channel id="hold_status" typeId="thermostat_hold_status"/>
</channels>
<properties>
<property name="name"/>
<property name="area"/>
</properties>
<representation-property>number</representation-property>
<config-description>
<parameter name="number" type="integer" required="true">
Expand Down Expand Up @@ -77,14 +76,10 @@
<label>Temperature</label>
<description>The current temperature at this thermostat.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>

<channel-type id="thermostat_outdoor_temperature">
<item-type>Number:Temperature</item-type>
<label>Outdoor Temperature</label>
<description>The current outdoor temperature detected by this thermostat.</description>
<category>Temperature</category>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>

Expand All @@ -109,6 +104,10 @@
<label>Humidity</label>
<description>The relative humidity at this thermostat.</description>
<category>Humidity</category>
<tags>
<tag>Measurement</tag>
<tag>Humidity</tag>
</tags>
<state readOnly="true" min="0" max="100" pattern="%d %%"/>
</channel-type>

Expand Down
Loading