From 34032161546c68efe80d5dc4c6ad40b0d5f9653a Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 6 Oct 2020 21:55:44 +0200 Subject: [PATCH] [miio] add several xjx.toiletseats (#8677) * [miio] add several xjx.toiletseats To enjoy your quiet moment with Openhab... Signed-off-by: Marcel Verpaalen --- bundles/org.openhab.binding.miio/README.md | 88 +++++++++++++++++++ .../binding/miio/internal/MiIoDevices.java | 4 + .../main/resources/database/xjx.toilet.json | 74 ++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json diff --git a/bundles/org.openhab.binding.miio/README.md b/bundles/org.openhab.binding.miio/README.md index 3f7f28607c5..3ffc2f91d1c 100644 --- a/bundles/org.openhab.binding.miio/README.md +++ b/bundles/org.openhab.binding.miio/README.md @@ -223,6 +223,10 @@ or in case of unknown models include the model information e.g.: | Mi Water Purifier lx12 | miio:basic | [yunmi.waterpuri.lx12](#yunmi-waterpuri-lx12) | Yes | | | Xiaomi Wifi Extender | miio:unsupported | xiaomi.repeater.v2 | No | | | Mi Internet Speaker | miio:unsupported | xiaomi.wifispeaker.v1 | No | | +| Xiaomi Mijia Whale Smart Toilet Cover | miio:basic | [xjx.toilet.pro](#xjx-toilet-pro) | Yes | | +| Xiaomi Mijia Smart Toilet Cover | miio:basic | [xjx.toilet.relax](#xjx-toilet-relax) | Yes | | +| Xiaomi Mijia Smart Toilet Cover | miio:basic | [xjx.toilet.pure](#xjx-toilet-pure) | Yes | | +| Xiaomi Mijia Smart Toilet Cover | miio:basic | [xjx.toilet.zero](#xjx-toilet-zero) | Yes | | | Yeelight Lamp | miio:basic | [yeelink.light.bslamp1](#yeelink-light-bslamp1) | Yes | | | Yeelight Lamp | miio:basic | [yeelink.light.bslamp2](#yeelink-light-bslamp2) | Yes | | | Yeelight Lamp | miio:basic | [yeelink.light.bslamp3](#yeelink-light-bslamp3) | Yes | | @@ -1848,6 +1852,42 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena | f3_usedflow | Number | Filter 3 Used Flow | | | f3_usedtime | Number | Filter 3 Used Time | | +### Xiaomi Mijia Whale Smart Toilet Cover (xjx.toilet.pro) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| seat_temp | Number | Seat Temperature | | +| status_seatheat | Number | Seat Status | | +| water_temp_t | Number | Water Temperature | | +| fan_temp | Number | Fan Temperature | | + +### Xiaomi Mijia Smart Toilet Cover (xjx.toilet.relax) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| seat_temp | Number | Seat Temperature | | +| status_seatheat | Number | Seat Status | | +| water_temp_t | Number | Water Temperature | | +| fan_temp | Number | Fan Temperature | | + +### Xiaomi Mijia Smart Toilet Cover (xjx.toilet.pure) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| seat_temp | Number | Seat Temperature | | +| status_seatheat | Number | Seat Status | | +| water_temp_t | Number | Water Temperature | | +| fan_temp | Number | Fan Temperature | | + +### Xiaomi Mijia Smart Toilet Cover (xjx.toilet.zero) Channels + +| Channel | Type | Description | Comment | +|------------------|---------|-------------------------------------|------------| +| seat_temp | Number | Seat Temperature | | +| status_seatheat | Number | Seat Status | | +| water_temp_t | Number | Water Temperature | | +| fan_temp | Number | Fan Temperature | | + ### Yeelight Lamp (yeelink.light.bslamp1) Channels | Channel | Type | Description | Comment | @@ -4415,6 +4455,54 @@ Number f3_usedflow "Filter 3 Used Flow" (G_waterpuri) {channel="miio:basic:water Number f3_usedtime "Filter 3 Used Time" (G_waterpuri) {channel="miio:basic:waterpuri:f3_usedtime"} ``` +### Xiaomi Mijia Whale Smart Toilet Cover (xjx.toilet.pro) item file lines + +note: Autogenerated example. Replace the id (toilet) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_toilet "Xiaomi Mijia Whale Smart Toilet Cover" +Number seat_temp "Seat Temperature" (G_toilet) {channel="miio:basic:toilet:seat_temp"} +Number status_seatheat "Seat Status" (G_toilet) {channel="miio:basic:toilet:status_seatheat"} +Number water_temp_t "Water Temperature" (G_toilet) {channel="miio:basic:toilet:water_temp_t"} +Number fan_temp "Fan Temperature" (G_toilet) {channel="miio:basic:toilet:fan_temp"} +``` + +### Xiaomi Mijia Smart Toilet Cover (xjx.toilet.relax) item file lines + +note: Autogenerated example. Replace the id (toilet) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_toilet "Xiaomi Mijia Smart Toilet Cover" +Number seat_temp "Seat Temperature" (G_toilet) {channel="miio:basic:toilet:seat_temp"} +Number status_seatheat "Seat Status" (G_toilet) {channel="miio:basic:toilet:status_seatheat"} +Number water_temp_t "Water Temperature" (G_toilet) {channel="miio:basic:toilet:water_temp_t"} +Number fan_temp "Fan Temperature" (G_toilet) {channel="miio:basic:toilet:fan_temp"} +``` + +### Xiaomi Mijia Smart Toilet Cover (xjx.toilet.pure) item file lines + +note: Autogenerated example. Replace the id (toilet) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_toilet "Xiaomi Mijia Smart Toilet Cover" +Number seat_temp "Seat Temperature" (G_toilet) {channel="miio:basic:toilet:seat_temp"} +Number status_seatheat "Seat Status" (G_toilet) {channel="miio:basic:toilet:status_seatheat"} +Number water_temp_t "Water Temperature" (G_toilet) {channel="miio:basic:toilet:water_temp_t"} +Number fan_temp "Fan Temperature" (G_toilet) {channel="miio:basic:toilet:fan_temp"} +``` + +### Xiaomi Mijia Smart Toilet Cover (xjx.toilet.zero) item file lines + +note: Autogenerated example. Replace the id (toilet) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. + +```java +Group G_toilet "Xiaomi Mijia Smart Toilet Cover" +Number seat_temp "Seat Temperature" (G_toilet) {channel="miio:basic:toilet:seat_temp"} +Number status_seatheat "Seat Status" (G_toilet) {channel="miio:basic:toilet:status_seatheat"} +Number water_temp_t "Water Temperature" (G_toilet) {channel="miio:basic:toilet:water_temp_t"} +Number fan_temp "Fan Temperature" (G_toilet) {channel="miio:basic:toilet:fan_temp"} +``` + ### Yeelight Lamp (yeelink.light.bslamp1) item file lines note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered. diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index 7efd295dd51..ebeab71a9fa 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java @@ -165,6 +165,10 @@ public enum MiIoDevices { WATER_PURIFIER_LX12("yunmi.waterpuri.lx12", "Mi Water Purifier lx12", THING_TYPE_BASIC), WIFI2("xiaomi.repeater.v2", "Xiaomi Wifi Extender", THING_TYPE_UNSUPPORTED), WIFISPEAKER("xiaomi.wifispeaker.v1", "Mi Internet Speaker", THING_TYPE_UNSUPPORTED), + XJX_TOILET_PRO("xjx.toilet.pro", "Xiaomi Mijia Whale Smart Toilet Cover", THING_TYPE_BASIC), + XJX_TOILET_RELAX("xjx.toilet.relax", "Xiaomi Mijia Smart Toilet Cover", THING_TYPE_BASIC), + XJX_TOILET_PURE("xjx.toilet.pure", "Xiaomi Mijia Smart Toilet Cover", THING_TYPE_BASIC), + XJX_TOILET_ZERO("xjx.toilet.zero", "Xiaomi Mijia Smart Toilet Cover", THING_TYPE_BASIC), YEELIGHT_BSLAMP("yeelink.light.bslamp1", "Yeelight Lamp", THING_TYPE_BASIC), YEELIGHT_BSLAMP2("yeelink.light.bslamp2", "Yeelight Lamp", THING_TYPE_BASIC), YEELIGHT_BSLAMP3("yeelink.light.bslamp3", "Yeelight Lamp", THING_TYPE_BASIC), diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json b/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json new file mode 100644 index 00000000000..77647ae6855 --- /dev/null +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json @@ -0,0 +1,74 @@ +{ + "deviceMapping": { + "id": [ + "xjx.toilet.pro", + "xjx.toilet.relax", + "xjx.toilet.pure", + "xjx.toilet.zero" + ], + "channels": [ + { + "property": "seat_temp", + "friendlyName": "Seat Temperature", + "channel": "seat_temp", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_seat_temp", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "status_seatheat", + "friendlyName": "Seat Status", + "channel": "status_seatheat", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [] + }, + { + "property": "water_temp_t", + "friendlyName": "Water Temperature", + "channel": "water_temp_t", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_water_temp_t", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "fan_temp", + "friendlyName": "Fan Temperature", + "channel": "fan_temp", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_fan_temp", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "status_led", + "friendlyName": "Night Light", + "channel": "status_led", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "work_night_led", + "parameterType": "NUMBER" + } + ] + } + ], + "experimental": true + } +}