Skip to content

Commit

Permalink
[somneo] Add instruction-set
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Myrcik <[email protected]>
  • Loading branch information
myrck committed May 22, 2023
1 parent 187e554 commit 95c9676
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ channel-group-type.somneo.sensor.label = Sensor Data
channel-group-type.somneo.sensor.description = Data from the various sensors.
channel-group-type.somneo.relax.label = Relax Breathe
channel-group-type.somneo.relax.description = Light-guided breathing helps you relax for sleep.
channel-group-type.somneo.relax.channel.lightIntensity.label = Light Intensity
channel-group-type.somneo.relax.channel.lightIntensity.description = The channel allows to set the light intensity.
channel-group-type.somneo.relax.channel.switch.label = Relax Breathe Program
channel-group-type.somneo.relax.channel.switch.description = The switch channel allows to turn the relax breathe program on or off.
channel-group-type.somneo.relax.channel.volume.label = Volume
channel-group-type.somneo.relax.channel.volume.description = Set the volume of the relax breath program.
channel-group-type.somneo.sunset.label = Sunset
channel-group-type.somneo.sunset.description = Simulate a sunset with selectable lights and sounds.
channel-group-type.somneo.sunset.channel.lightIntensity.label = Light Intensity
channel-group-type.somneo.sunset.channel.lightIntensity.description = The channel allows to set the light intensity.
channel-group-type.somneo.sunset.channel.lightIntensity.label = Sunset Brightness
channel-group-type.somneo.sunset.channel.lightIntensity.description = The channel allows to set the sunset light intensity.
channel-group-type.somneo.sunset.channel.switch.label = Sunset Program
channel-group-type.somneo.sunset.channel.switch.description = The switch channel allows to turn the sunset program on or off.
channel-group-type.somneo.sunset.channel.volume.label = Volume
Expand Down Expand Up @@ -98,6 +96,8 @@ channel-type.somneo.breathingRate.state.option.4 = 7 BR/min
channel-type.somneo.breathingRate.state.option.5 = 8 BR/min
channel-type.somneo.breathingRate.state.option.6 = 9 BR/min
channel-type.somneo.breathingRate.state.option.7 = 10 BR/min
channel-type.somneo.brightness.label = Light Brightness
channel-type.somneo.brightness.description = The channel allows to set the light intensity.
channel-type.somneo.colorSchema.label = Color Schema
channel-type.somneo.colorSchema.description = Choose a personal sunrise or sunset.
channel-type.somneo.colorSchema.state.option.0 = Sunny day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
<channel-group id="alarm16" typeId="alarmErasable"/>
</channel-groups>

<properties>
<property name="thingTypeVersion">1</property>
<property name="vendor">Philips</property>
</properties>

<config-description>
<parameter name="hostname" type="text" required="true">
<context>network-address</context>
Expand Down Expand Up @@ -136,7 +141,7 @@
<description>Different light channels.</description>
<category>Light</category>
<channels>
<channel id="main" typeId="system.brightness"/>
<channel id="main" typeId="brightness"/>
<channel id="night" typeId="light"/>
</channels>
</channel-group-type>
Expand Down Expand Up @@ -165,10 +170,7 @@
<channel id="breathingRate" typeId="breathingRate"/>
<channel id="duration" typeId="relaxDuration"/>
<channel id="guidanceType" typeId="guidanceType"/>
<channel id="lightIntensity" typeId="sunriseBrightness">
<label>Light Intensity</label>
<description>The channel allows to set the light intensity.</description>
</channel>
<channel id="lightIntensity" typeId="sunriseBrightness"/>
<channel id="volume" typeId="system.volume"/>
</channels>
</channel-group-type>
Expand All @@ -183,9 +185,9 @@
<description>The switch channel allows to turn the sunset program on or off.</description>
</channel>
<channel id="remainingTime" typeId="remainingTime"/>
<channel id="lightIntensity" typeId="system.brightness">
<label>Light Intensity</label>
<description>The channel allows to set the light intensity.</description>
<channel id="lightIntensity" typeId="brightness">
<label>Sunset Brightness</label>
<description>The channel allows to set the sunset light intensity.</description>
</channel>
<channel id="duration" typeId="sunsetDuration"/>
<channel id="colorSchema" typeId="colorSchema"/>
Expand Down Expand Up @@ -313,6 +315,18 @@
</state>
</channel-type>

<channel-type id="brightness">
<item-type>Dimmer</item-type>
<label>Light Brightness</label>
<description>The channel allows to set the light intensity.</description>
<category>Light</category>
<tags>
<tag>Control</tag>
<tag>Light</tag>
</tags>
<state pattern="%d %%" min="0" max="100" step="4"/>
</channel-type>

<channel-type id="colorSchema">
<item-type>Number</item-type>
<label>Color Schema</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">

<thing-type uid="somneo:hf367x">
<instruction-set targetVersion="1">
<update-channel id="main" groupIds="light">
<type>somneo:brightness</type>
</update-channel>
<update-channel id="lightIntensity" groupIds="sunset">
<type>somneo:brightness</type>
</update-channel>
<update-channel id="lightIntensity" groupIds="relax">
<type>somneo:sunriseBrightness</type>
</update-channel>

<add-channel id="snooze" groupIds="alarm">
<type>somneo:alarmSnooze</type>
</add-channel>
<add-channel id="configured"
groupIds="alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:alarmConfigured</type>
</add-channel>
<add-channel id="switch"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:alarmSwitch</type>
</add-channel>
<add-channel id="repeatDay"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:repeatDay</type>
</add-channel>
<add-channel id="alarmTime"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:alarmTime</type>
</add-channel>
<add-channel id="powerWake"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:powerWakeSwitch</type>
</add-channel>
<add-channel id="powerWakeDelay"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:powerWakeDelay</type>
</add-channel>
<add-channel id="sunriseDuration"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:sunriseDuration</type>
</add-channel>
<add-channel id="sunriseBrightness"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:sunriseBrightness</type>
</add-channel>
<add-channel id="sunriseSchema"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:colorSchema</type>
</add-channel>
<add-channel id="sound"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>somneo:alarmSound</type>
</add-channel>
<add-channel id="volume"
groupIds="alarm1,alarm2,alarm3,alarm4,alarm5,alarm6,alarm7,alarm8,alarm9,alarm10,alarm11,alarm12,alarm13,alarm14,alarm15,alarm16">
<type>system:volume</type>
</add-channel>

</instruction-set>
</thing-type>

</update:update-descriptions>

0 comments on commit 95c9676

Please sign in to comment.