Skip to content

Commit

Permalink
Xiaomi Smart Home Binding - added Ringtone methods (wip)
Browse files Browse the repository at this point in the history
Signed-off-by: kubawolanin <[email protected]>
  • Loading branch information
kubawolanin committed Feb 18, 2017
1 parent 46c8ad8 commit 1303801
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 183 deletions.
120 changes: 60 additions & 60 deletions addons/binding/org.openhab.binding.mihome/ESH-INF/thing/sensor_ht.xml
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="mihome"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">
<thing:thing-descriptions bindingId="mihome" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<thing-type id="sensor_ht">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge"/>
</supported-bridge-type-refs>
<thing-type id="sensor_ht">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<label>Xiaomi Mi Temperature &amp; Humidity Sensor</label>
<description>Reports temperature and humidity. Operating temperature: −20°C to 60°C. Operating humidity: 0 to 100%.
<label>Xiaomi Mi Temperature &amp; Humidity Sensor</label>
<description>Reports temperature and humidity. Operating temperature: −20°C to 60°C. Operating humidity: 0 to 100%.
Sensor reports the temperature when there's a difference around 0.5°C. If there is no significant temperature change, sensor reports temperature once a 50 minutes.\
</description>

<channels>
<channel id="temperature" typeId="temperature"/>
<channel id="humidity" typeId="humidity"/>
<channel id="voltage" typeId="voltage"/>
<channel id="batteryLevel" typeId="batteryLevel"/>
</channels>
<channels>
<channel id="temperature" typeId="temperature" />
<channel id="humidity" typeId="humidity" />
<channel id="voltage" typeId="voltage" />
<channel id="batteryLevel" typeId="batteryLevel" />
</channels>

<config-description>
<parameter name="itemId" type="text" readOnly="true">
<label>Item ID</label>
<description>An identifier for the item connected.</description>
<required>true</required>
</parameter>
</config-description>
</thing-type>
<config-description>
<parameter name="itemId" type="text" readOnly="true">
<label>Item ID</label>
<description>An identifier for the item connected.</description>
<required>true</required>
</parameter>
</config-description>
</thing-type>

<channel-type id="temperature">
<item-type>Number</item-type>
<label>Temperature</label>
<category>Temperature</category>
<tags>
<tag>weather</tag>
</tags>
<state min="-50" max="60" step="0.1" pattern="%.1f °C" readOnly="true">
</state>
</channel-type>

<channel-type id="humidity">
<item-type>Number</item-type>
<label>Humidity</label>
<category>Humidity</category>
<tags>
<tag>weather</tag>
</tags>
<state min="0" max="100" step="0.1" pattern="%.1f%%" readOnly="true">
</state>
</channel-type>
<channel-type id="temperature">
<item-type>Number</item-type>
<label>Temperature</label>
<category>Temperature</category>
<tags>
<tag>weather</tag>
</tags>
<state min="-50" max="60" step="0.1" pattern="%.1f °C" readOnly="true">
</state>
</channel-type>

<channel-type id="voltage">
<item-type>Number</item-type>
<label>Battery Voltage</label>
<category>Battery Voltage</category>
<state pattern="%d mv" readOnly="true"></state>
</channel-type>
<channel-type id="humidity">
<item-type>Number</item-type>
<label>Humidity</label>
<category>Humidity</category>
<tags>
<tag>weather</tag>
</tags>
<state min="0" max="100" step="0.1" pattern="%.1f%%" readOnly="true">
</state>
</channel-type>

<channel-type id="batteryLevel">
<kind>trigger</kind>
<label>Battery Level</label>
<event>
<options>
<option value="LOW">low</option>
</options>
</event>
</channel-type>
<channel-type id="voltage" advanced="true">
<item-type>Number</item-type>
<label>Battery Voltage</label>
<category>Battery Voltage</category>
<state pattern="%d mv" readOnly="true"></state>
</channel-type>

<channel-type id="batteryLevel" advanced="true">
<kind>trigger</kind>
<label>Low Battery Level</label>
<description>Triggers LOW event when voltage is below 2800 mv</description>
<event>
<options>
<option value="LOW">low</option>
</options>
</event>
</channel-type>

</thing:thing-descriptions>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

<channels>
<channel id="isOpen" typeId="isOpen" />
<channel id="voltage" typeId="voltage"/>
<channel id="batteryLevel" typeId="batteryLevel"/>
<channel id="voltage" typeId="voltage" />
<channel id="batteryLevel" typeId="batteryLevel" />
</channels>

<config-description>
Expand All @@ -33,16 +33,17 @@
<state readOnly="true"></state>
</channel-type>

<channel-type id="voltage">
<channel-type id="voltage" advanced="true">
<item-type>Number</item-type>
<label>Battery Voltage</label>
<category>Battery Voltage</category>
<state pattern="%d mv" readOnly="true"></state>
</channel-type>

<channel-type id="batteryLevel">
<channel-type id="batteryLevel" advanced="true">
<kind>trigger</kind>
<label>Battery Level</label>
<label>Low Battery Level</label>
<description>Triggers LOW event when voltage is below 2800 mv</description>
<event>
<options>
<option value="LOW">low</option>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="mihome"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<thing-type id="sensor_motion">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge"/>
</supported-bridge-type-refs>

<label>Xiaomi Mi Motion Sensor</label>
<description>Sensor that detects movement. Also called Occupancy Sensor or Human Body Sensor. After it detects motion, it goes to sleep for 1 minute.</description>

<channels>
<channel id="motion" typeId="motion"/>
<channel id="lastMotion" typeId="lastMotion"/>
<channel id="voltage" typeId="voltage"/>
<channel id="batteryLevel" typeId="batteryLevel"/>
</channels>

<config-description>
<parameter name="itemId" type="text" readOnly="true">
<label>Item ID</label>
<description>An identifier for the item connected.</description>
<required>true</required>
</parameter>
</config-description>
</thing-type>

<channel-type id="motion">
<item-type>Switch</item-type>
<label>Motion Status</label>
<category>Motion</category>
<state readOnly="true"></state>
</channel-type>
<channel-type id="lastMotion">
<item-type>DateTime</item-type>
<label>Last Activity (Date/Time)</label>
<description>Date/time when last motion was detected</description>
<state readOnly="true"></state>
</channel-type>
<channel-type id="voltage">
<item-type>Number</item-type>
<label>Battery Voltage</label>
<category>Battery Voltage</category>
<state pattern="%d mv" readOnly="true"></state>
</channel-type>

<channel-type id="batteryLevel">
<kind>trigger</kind>
<label>Battery Level</label>
<event>
<options>
<option value="LOW">low</option>
</options>
</event>
</channel-type>
<thing:thing-descriptions bindingId="mihome" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd">

<thing-type id="sensor_motion">
<supported-bridge-type-refs>
<bridge-type-ref id="bridge" />
</supported-bridge-type-refs>

<label>Xiaomi Mi Motion Sensor</label>
<description>Sensor that detects movement. Also called Occupancy Sensor or Human Body Sensor. After it detects motion, it goes to sleep for 1 minute.</description>

<channels>
<channel id="motion" typeId="motion" />
<channel id="lastMotion" typeId="lastMotion" />
<channel id="voltage" typeId="voltage" />
<channel id="batteryLevel" typeId="batteryLevel" />
</channels>

<config-description>
<parameter name="itemId" type="text" readOnly="true">
<label>Item ID</label>
<description>An identifier for the item connected.</description>
<required>true</required>
</parameter>
</config-description>
</thing-type>

<channel-type id="motion">
<item-type>Switch</item-type>
<label>Motion Status</label>
<category>Motion</category>
<state readOnly="true"></state>
</channel-type>

<channel-type id="lastMotion">
<item-type>DateTime</item-type>
<label>Last Activity (Date/Time)</label>
<description>Date/time when last motion was detected</description>
<state readOnly="true"></state>
</channel-type>

<channel-type id="voltage" advanced="true">
<item-type>Number</item-type>
<label>Battery Voltage</label>
<category>Battery Voltage</category>
<state pattern="%d mv" readOnly="true"></state>
</channel-type>

<channel-type id="batteryLevel" advanced="true">
<kind>trigger</kind>
<label>Low Battery Level</label>
<description>Triggers LOW event when voltage is below 2800 mv</description>
<event>
<options>
<option value="LOW">low</option>
</options>
</event>
</channel-type>

</thing:thing-descriptions>
Loading

0 comments on commit 1303801

Please sign in to comment.