Skip to content

Commit

Permalink
[miio] Initial Contribution Mi IO Binding
Browse files Browse the repository at this point in the history
This is a combination of 84 commits.
Initial commit for Mi IO binding

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] add basic functionality to control other miio devices

* Generate channels based on database
* Update properties based on database
* Execute commands based on database

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
[miio] fix author tags

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
[miio] remove version constraint on gson

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
refine pom & Java 1.8

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
add yeelight ceiling for tests

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
add channels when defining thing type

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
Revert "add channels when defining thing type"

This reverts commit 8067f57.

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>

[miio] improve starting sequence & device identification

* Fix sending empty string commands
* Adding device identification string to config

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com

[miio] remove mock data & check model in database

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix initiation for vacuum

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Fix incorrect format for vacuum

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] restructure database

* restructured database format
* added Xiaomi Philips ceeling light

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] fixed findbug error

* mibasic: error handling when updating channels

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
intrim add philips lightr

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

intrim adjust manifest

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
intrim update to latest version
attempt to fix communication problems

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

intrim resolve travis errors

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

Update CommandParameterType.java

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] rework binding to async (WIP)

*added 2nd discovery method

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] reworked async communication

* Improve discovery speed
* Added Philips light bulb support
* reworked async communication incl implementation of queue

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix copyright header

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add support encrypted tokens (IOS)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix dependency issue

simplified encrypted pwd handling
cleanup

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] transitioned vacuum to async

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improved commands handling

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] limit the properties requested in 1 go

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] updated airpurifier temp channel

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] avoid polling job crashing

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix command without parameter sending

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update airpurifier. improve json null handling

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] missing properties

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add zimi powerstrip

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add 2 properties for Xiaomi powerstrip

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add chuangmi.plug.m1 & fix status issue

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix minor discovery issue

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix IOS token decoding

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add channels for AIR PURIFIER 2

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix formatting

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] updated purifier properties

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] find database in case multiple models id's in database

add model purifier pro (v6) databse
add chumi plug v1 database entry

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] add transformation option to db

* updated airpurifier v6 & m1 to use transformation
* Fix typo in channel name filtermaxLife

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix database entries switch iso onoftype

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] avoid cancelled refresh for basic devices

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] variable timeout

*on-off for vacuum
*improve basic refesh in case of timing issues

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] avoid npe & add cleaning record

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] several small improvements

vacuum - new switch channel for on/off to allow alexa integration
vacuum - reset consumables channel
airpurifiers - fix temperature reading (/10)
all - small improvements in abstract handler

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update powerstrip database

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve ping to avoid connection issues

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Updated device list

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve initiation & update plug.

* removes NPE is specific cases during change of type
* Removing unavailable properties from plug m1

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Several improvements

* Fix toggle
* improve documentation
* Improve handling of different command types

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

Delete .README.md.html

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] experimentally add yeelights

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] added support for new vacuum v2

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix database issue

Experimental support color

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fixing several code warnings

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] various fixes

* fix discovery
* Fixes lamp definitions and missing channels
* Fix several code warnings

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>

[miio] minor changes

* Update pom to 2.3 snapshot
* Change log level

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix build

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] revert back change to new MDNSDiscovery participant

revert back change to new MDNSDiscovery participant as users report
issue in runtime

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] replace depreciated bundle reference

* Removed depreciated bundle ref
* Fixed typo for vacuum v2
* Add conversion for scene

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
 Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB) (openhab#7)

* Added item "Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)"

- added new device yeelink.light.ceiling4 ("Yeelight LED Ceiling Lamp v4
(JIAOYUE 650 RGB)")
- fixed checkstyle errors (mainly 2017 > 2018 in copyright message) and
some warnings about string placeholders in debug messages

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

* Added support for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)

- Added compatibility for Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)
- Added new channels ambientColor and ambientColorTemperature

Signed-off-by: AnthraxLeprosyPi <anthrax.leprosy.pi@gmail.com>

[miio] add humidifier and other fixes

* Add humidifier
* Fix database issues yeelight color
* Add new commands robot v2

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix issue humidifier db

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor fixes in database

* fixed set humification in for humidifier
* fixed powerstrip v1 id

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add devices

* philips ceiling lamp
* waterpurifier

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix yeelight issues

* Handling of brightness in the color control
* Adding additional parameters to allow ct adjustment

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor bug fix

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] powerplug & db fixes

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
add Philips Eyecare 2 & improve Yeelight 650 (openhab#8)

Signed-off-by: Dieter Schmidt <dima.loschkin@gmail.com>
[miio] add AirPurifier 2S

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix open port issue

* Fix port not being closed issue
* Align discovery labels

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fixing typo and update devices

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Add to pom

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Several commits to fix wrongly added files

[miio] fixing some checkstyle errors

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] change pom to 2.4 snapshot

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] Experimental support for Mi Smart Fan

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve mi smartfan

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add Philips downlight to db

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor fixes and add yeelink.light.color2 to db

* Fix double comma issue in some json
* Fix sending empty property
* Add yeelink.light.color2
* Update fan

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] documentation update

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] cleanups

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] minor fix readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add zhimi.fan.sa1

add Xiaomi Mi Smart Pedestal Fan
minor fixes for network response

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update readme with example item files

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] improve documentation & remove spaces

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] database updates

new device (experimental) Philips light moon
updated led strip

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] add philips candle

added some additional device strings

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix typo & mising database entries

Fix some database missing & wrong items

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] fix usbpower for chuangmi plug

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio]

merging changes of t1lt3rr0r
* Added channel for changing rgb color on yeelights
* Fixed the "delayoff" channel to use correct command
* Added a "preCommandParameter1" to MiIoDeviceAction.java to use a value
in front of the send value/command (for example necessary for the
yeelight method "cron_add" with value [0,VALUE]
* Added toString() method to MiIoDeviceAction.java

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
[miio] update documentation

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
  • Loading branch information
marcelrv committed Nov 4, 2018
1 parent 4af6a96 commit 9e11b10
Show file tree
Hide file tree
Showing 68 changed files with 9,001 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addons/binding/org.openhab.binding.miio/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

33 changes: 33 additions & 0 deletions addons/binding/org.openhab.binding.miio/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.openhab.binding.miio</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ds.core.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<binding:binding id="miio"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:binding="http://eclipse.org/smarthome/schemas/binding/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd">
<name>Xiaomi Mi IO Binding</name>
<description>Binding for Xiaomi Mi Io device like Mi Robot Vacuum</description>
<author>Marcel Verpaalen</author>
</binding:binding>
41 changes: 41 additions & 0 deletions addons/binding/org.openhab.binding.miio/ESH-INF/config/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:config-description="http://eclipse.org/smarthome/schemas/config-description/v1.0.0"
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/config-description/v1.0.0http://eclipse.org/smarthome/schemas/config-description-1.0.0.xsd">

<config-description uri="thing-type:miio:config">
<parameter name="host" type="text" required="true">
<context>network-address</context>
<label>IP address</label>
</parameter>
<parameter name="token" type="text" pattern="^([A-Fa-f0-9]{96}|[A-Fa-f0-9]{32}|.{16})$" required="true">
<label>Token</label>
<description>Token for communication (in Hex)</description>
<default>FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF</default>
</parameter>
<parameter name="deviceId" type="text" required="false">
<label>Device ID</label>
<description>Device ID number for communication (in Hex)</description>
<advanced>true</advanced>
</parameter>
<parameter name="model" type="text" required="false">
<label>Device Model String</label>
<description>Device model string, used to determine the subtype.</description>
<default></default>
<advanced>true</advanced>
</parameter>
<parameter name="refreshInterval" type="integer" min="0" max="9999" required="false">
<label>Refresh interval</label>
<description>Refresh interval for refreshing the data in seconds. (0=disabled)</description>
<default>30</default>
<advanced>true</advanced>
</parameter>
<parameter name="timeout" type="integer" min="1000" max="60000" required="false">
<label>Time out</label>
<description>Timeout time in milliseconds</description>
<default>10000</default>
<advanced>true</advanced>
</parameter>
</config-description>
</config-description:config-descriptions>
Original file line number Diff line number Diff line change
@@ -0,0 +1,299 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="miio"
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">

<channel-group-type id="network" advanced="true">
<label>Network</label>
<channels>
<channel id="ssid" typeId="ssid" />
<channel id="bssid" typeId="bssid" />
<channel id="rssi" typeId="rssi" />
<channel id="life" typeId="life" />
</channels>
</channel-group-type>

<!-- Network channels -->
<channel-type id="ssid" advanced="true">
<item-type>String</item-type>
<label>SSID</label>
<state readOnly="true" />
</channel-type>
<channel-type id="bssid" advanced="true">
<item-type>String</item-type>
<label>BSSID</label>
<state readOnly="true" />
</channel-type>
<channel-type id="rssi" advanced="true">
<item-type>Number</item-type>
<label>RSSI</label>
<state readOnly="true" />
</channel-type>
<channel-type id="life" advanced="true">
<item-type>Number</item-type>
<label>Life</label>
<state readOnly="true" />
</channel-type>

<!-- Common Actions channels -->
<channel-type id="commands" advanced="true">
<item-type>String</item-type>
<label>Execute Command</label>
</channel-type>
<channel-type id="power">
<item-type>Switch</item-type>
<label>Power On/Off</label>
</channel-type>
<channel-type id="ambientPower">
<item-type>Switch</item-type>
<label>Ambient Power On/Off</label>
</channel-type>
<channel-type id="eyecare">
<item-type>Switch</item-type>
<label>Eyecare Mode On/Off</label>
</channel-type>
<channel-type id="mode">
<item-type>String</item-type>
<label>Mode</label>
</channel-type>
<channel-type id="modeGreen">
<item-type>String</item-type>
<label>Mode</label>
<state>
<options>
<option value="green">Green</option>
<option value="normal">Normal</option>
</options>
</state>
</channel-type>
<channel-type id="brightness">
<item-type>Number</item-type>
<label>Brightness</label>
</channel-type>
<channel-type id="ambientBrightness">
<item-type>Number</item-type>
<label>Ambient Brightness</label>
</channel-type>
<channel-type id="nightlightBrightness">
<item-type>Number</item-type>
<label>Nightlight Brightness</label>
</channel-type>
<channel-type id="illumination">
<item-type>Number</item-type>
<label>Environment Illumination</label>
</channel-type>
<channel-type id="led">
<item-type>Switch</item-type>
<label>Led</label>
</channel-type>
<channel-type id="colorMode">
<item-type>Number</item-type>
<label>Color Mode</label>
</channel-type>
<channel-type id="ambientColorMode">
<item-type>Number</item-type>
<label>Ambient Color Mode</label>
</channel-type>
<channel-type id="colorTemperature">
<item-type>Number</item-type>
<label>Color Temperature</label>
</channel-type>
<channel-type id="ambientColorTemperature">
<item-type>Number</item-type>
<label>Ambient Color Temperature</label>
</channel-type>
<channel-type id="cct">
<item-type>Number</item-type>
<label>Correlated Color Temperature</label>
</channel-type>
<channel-type id="scene">
<item-type>Number</item-type>
<label>Scene</label>
</channel-type>
<channel-type id="customScene">
<item-type>String</item-type>
<label>Custom Scene</label>
</channel-type>
<channel-type id="dv">
<item-type>Number</item-type>
<label>DV</label>
</channel-type>
<channel-type id="delayoff">
<item-type>Number</item-type>
<label>Delay off</label>
</channel-type>
<channel-type id="act_det">
<item-type>Switch</item-type>
<label>AirAutoDetect</label>
</channel-type>
<channel-type id="buzzer">
<item-type>Switch</item-type>
<label>Buzzer</label>
</channel-type>
<channel-type id="childlock">
<item-type>Switch</item-type>
<label>Child Lock</label>
</channel-type>
<channel-type id="color">
<item-type>Color</item-type>
<label>Color</label>
</channel-type>
<channel-type id="ambientColor">
<item-type>Color</item-type>
<label>Ambient Color</label>
</channel-type>
<channel-type id="setHumidity">
<item-type>Number</item-type>
<label>Humidity Set</label>
</channel-type>

<!-- Common Properties channels -->
<channel-type id="temperature">
<item-type>Number</item-type>
<label>Temperature</label>
<state pattern="%.1f" readOnly="true" />
</channel-type>
<channel-type id="humidity">
<item-type>Number</item-type>
<label>Humidity</label>
<state readOnly="true" />
</channel-type>
<channel-type id="aqi">
<item-type>Number</item-type>
<label>Air Quality Index</label>
<state readOnly="true" />
</channel-type>
<channel-type id="averageaqi">
<item-type>Number</item-type>
<label>Air Quality Index Average</label>
<state readOnly="true" />
</channel-type>
<channel-type id="favoritelevel">
<item-type>Number</item-type>
<label>Favorite_level</label>
<state pattern="%.0f" />
</channel-type>
<channel-type id="filtermaxlife">
<item-type>Number</item-type>
<label>Filter Max Life</label>
<state readOnly="true" />
</channel-type>
<channel-type id="filterhours">
<item-type>Number</item-type>
<label>Filter Use Time</label>
<state pattern="%.0f" readOnly="true" />
</channel-type>
<channel-type id="usedhours">
<item-type>Number</item-type>
<label>Run Time</label>
<state pattern="%.0f" readOnly="true" />
</channel-type>
<channel-type id="motorspeed">
<item-type>Number</item-type>
<label>Motor Speed</label>
<state pattern="%.0f" readOnly="true" />
</channel-type>
<channel-type id="filterlive">
<item-type>Number</item-type>
<label>Filter Life</label>
<state pattern="%.0f%%" readOnly="true" />
</channel-type>
<channel-type id="purifyvolume">
<item-type>Number</item-type>
<label>Volume Purified</label>
<state pattern="%.0f m3" readOnly="true" />
</channel-type>
<channel-type id="current">
<item-type>Number</item-type>
<label>Current</label>
<state pattern="%.2fA" readOnly="true" />
</channel-type>
<channel-type id="powerUsage">
<item-type>Number</item-type>
<label>Power Usage</label>
<state pattern="%.0fW" readOnly="true" />
</channel-type>
<channel-type id="powerPrice">
<item-type>Number</item-type>
<label>Power Price</label>
<state pattern="%.0f kW/h" />
</channel-type>
<channel-type id="translevel">
<item-type>Number</item-type>
<label>Trans Level</label>
</channel-type>
<channel-type id="dry">
<item-type>Switch</item-type>
<label>Dry</label>
</channel-type>
<channel-type id="depth">
<item-type>Number</item-type>
<label>Depth</label>
</channel-type>
<channel-type id="angleEnable">
<item-type>Switch</item-type>
<label>Enable Angle</label>
</channel-type>
<channel-type id="angle">
<item-type>Number</item-type>
<label>Angle</label>
<state min="0" max="360" step="1" pattern="%.0f" readOnly="false" />
</channel-type>
<channel-type id="move">
<item-type>String</item-type>
<label>Move</label>
<state>
<options>
<option value="left">left</option>
<option value="right">right</option>
</options>
</state>
</channel-type>
<channel-type id="poweroffTime">
<item-type>Number</item-type>
<label>Power Off Timer</label>
<state min="0" max="28800" step="1" pattern="%.0f" readOnly="false" />
</channel-type>
<channel-type id="speed">
<item-type>Number</item-type>
<label>Speed</label>
<state pattern="%.0f" readOnly="false" />
</channel-type>
<channel-type id="speedLevel">
<item-type>Number</item-type>
<label>Speed Level</label>
<state min="0" max="99" step="1" pattern="%.0f%%" readOnly="false" />
</channel-type>
<channel-type id="naturalLevel">
<item-type>Number</item-type>
<label>Natural Fan Level</label>
<state min="0" max="99" step="1" pattern="%.0f%%" readOnly="false" />
</channel-type>
<channel-type id="acPower">
<item-type>Switch</item-type>
<label>AC Power</label>
<state readOnly="true" />
</channel-type>
<channel-type id="battery">
<item-type>Number</item-type>
<label>battery</label>
<state pattern="%.0f" readOnly="true" />
</channel-type>
<channel-type id="bat_state">
<item-type>String</item-type>
<label>Battery State</label>
<state readOnly="true" />
</channel-type>
<channel-type id="gonight">
<item-type>Switch</item-type>
<label>Go Night</label>
<state readOnly="false" />
</channel-type>
<channel-type id="usb">
<item-type>Switch</item-type>
<label>USB Power</label>
<state readOnly="false" />
</channel-type>

</thing:thing-descriptions>
Loading

0 comments on commit 9e11b10

Please sign in to comment.