Commit Graph

58 Commits

Author SHA1 Message Date
Marcel
0cde89c327
[miio] update json files to new definition (#9239)
* Update some of the miot files to the new definition
* Apply units,category & tags for some channels
* apply standard sorting

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-12-05 12:59:48 -08:00
Marcel
05b7bbdccf
[miio] Add discovery from cloud feature. (#9176)
* [miio] Add discovery from cloud feature.

This allows to discover things that are not directly on the same subnet

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Co-authored-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
2020-12-04 21:26:44 -08:00
Marcel
2597ff20d4
[miio] dynamically generate channelTypes (#9158)
* [miio] dynamically generate channelTypes

Simplify the json database creation for new models and less chance for
errors
Related to #7276

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Co-authored-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
2020-12-04 13:01:18 -08:00
Marcel
35528eda3b
[miio] Implement alternative MiIoQuantityTypes (#9203)
* [miio] Implement alternative MiIoQuantityTypes

* Improved way avoiding multiple entries for Unit
* Test cases for the MiIoQuantityTypes class
* Apply suggestions from code review

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Co-authored-by: Connor Petty <mistercpp2000+gitsignoff@gmail.com>
2020-12-04 09:37:49 -08:00
Marcel
707d840c73
[miio] Channel Updates to Quantitypes (#9196)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-12-02 09:25:25 -08:00
Marcel
852f19f5c2
[miio] Update channels only if they are linked (#9163)
* [miio] Update channels only if they are linked

With introduction of miot devices with enormous amount of channels
refreshes can become slow. With this change only relevant updates are
done.

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-28 21:03:44 -08:00
Marcel
ad202edefa
[miio] Cloud Communication for devices (#8981)
* [miio]  Cloud Communication for devices

Allows to define if communication to devices is direct or send via the
Xiaomi cloud.
Introduce additional channel to execute commands via cloud.

Other small improvements
* Use common method from abstract handler to send commands
* Common way to handle custom commands
* Introduce small delay before refreshing robot properties after sending
commands (similar to the basic handler) so devices have time to update
their properties

* [miio] simplify cloudconnector
* [miio] Cleanup all jobs when unloading
* [miio] update to use dedicated ScheduledExecutorService

Use dedicated ScheduledExecutorService to avoid unloading problems

* Update bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoAbstractHandler.java
* [miio] fix for removeif
* miio- Improve scheduler
* [miio] fix communication error if device is not on the network
* [miio] update with comments from feedback

* remove scheduler tracking
* improve status setting for cloud communication
* [miio] update with feedback review

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

Co-authored-by: Connor Petty <mistercpp2000@gmail.com>
2020-11-28 20:03:12 -08:00
Marcel
d646215288
[miio] update for vacuum.e2 (#9139)
* [miio] update for vacuum.e2

small update now critical commands are confirmed working.

* [miio] update readme

as dock command is now also confirmed

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-26 16:04:46 -08:00
Marcel
8040a710fd
[miio] update line endings for readme maker (#9142)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-26 14:53:55 -08:00
Marek Skrobacki
0a9ea9fd45
[miio] add support for zhimi.humidifier.ca4 (Smartmi Evaporative Air Humidifier 2) (#9093)
* miio: add support for zhimi.humidifier.ca4

This change adds support for Xiaomi Smartmi Evaporation Air Humidifier 2.

The device uses MIOT protocol, exact spec is available at:

http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:humidifier:0000A00E:zhimi-ca4:2

Signed-off-by: Marek Skrobacki <skrobul@skrobul.com>
2020-11-26 14:32:39 -08:00
Kai Kreuzer
007c3b56e5
removed deprecated author information from binding.xml (#9113)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-23 19:06:33 -08:00
Marcel
158cbe0c65
[miio] Use QuantityTypes for time & area in the vacuumhandler (#9058)
closes #7752

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-17 16:23:23 -08:00
Marcel
d41927c703
[miio] Add support zhimi.heater.zb1 & zhimi.heater.za2 (#9055)
* [miio] Add support zhimi.heater.zb1 & zhimi.heater.za2
* [miio] capitalize channel labels

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-17 16:16:36 -08:00
Marcel
d86edfe32b
[miio] send miot actions parameter as jsonObject (#9056)
* [miio] send miot actions parameter as jsonObject
* [miio] avoid maven error

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-17 12:32:52 -08:00
Marcel
2930e431ad
[miio] Fix readme for line breaks inside table cell (#9052)
* [miio] Fix readme for line breaks inside table cell
* [miio] improve readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-17 10:46:20 -08:00
Marcel
d6d68c7a96
[miio] update readme (#9014)
* [miio] update readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-16 12:26:50 -08:00
Marcel
1e5aaf948c
[miio] add support for lumi.curtain.hagl05 Xiaomi youpin Curtain Controller (Wi-Fi) (#9017)
* [miio] add support for lumi.curtain.hagl05
* [miio] improve channel description
* [miio] improved mapping for curtain hagl05
* [miio] fix channelTypes

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-15 17:19:00 -08:00
Marcel
406b7e4392
[miio] Add support for mijia.vacuum.v2 (#9036)
* [miio] Add support for mijia.vacuum.v2

related issue #9005
* [miio] fix channelTypes based on review

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-15 17:17:59 -08:00
Marcel
02341d3536
[miio] Use generic channeltypes if none provided (#8999)
To prevent channels not showing up in OH3 main UI

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-13 15:09:39 -08:00
Marcel
13a37f0c8c
[miio] add support for scishare smart capsule coffee machine s1102 (#9015)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-13 14:48:15 -08:00
J-N-K
ba4c96d99d
[infrastructure] move infered nullness warnings to error and update EEA (#8949)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-11-12 21:07:11 +01:00
Marcel
258f709ab8
[miio] Add zhimi.fan.za1 (#8998)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-11 11:28:39 -08:00
Marcel
918408eac1
[miio] Allow for quantity Type (#8756)
* [miio] Allow for quantity Type in the basic handler

This extends the miio:basic handler with the option to define channels
with QuantityType e.g. to use number:temperature

* [miio] add missing breaks

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-09 08:39:50 -08:00
Marcel
9f22e64ffd
[miio] update readme with db location details (#8987)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-08 19:17:13 -08:00
Marcel
71566e47af
[miio] add poweroff properties to zhimi powerstrip (#8899)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-01 14:32:56 -08:00
Marcel
15312d33f2
[miio] update readme with Roborock app info (#8935)
As per  https://community.openhab.org/t/xiaomi-robot-vacuum-binding/31317/1729

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-01 21:30:43 +01:00
Marcel
b4bc6d7e77
[miio] remove unneeded debug msg (#8919)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-11-01 00:17:40 -07:00
J-N-K
bd664ff0c8
[infrastructure] add external null-annotations (#8848)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
2020-10-31 00:29:03 +01:00
Marcel
9a5832a2ee
[miio] Fix handling commands with curly brackets (#8897)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-29 23:24:20 -07:00
Marcel
472c0fd960
[miio] avoid Invalid URI host: null error (#8867)
* [miio] avoid Invalid URI host: null error

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-27 16:08:13 +01:00
Marcel
788ca22724
[miio] delay refresh to avoid devices not ready yet (#8838)
* [miio] delay refresh to avoid devices not ready yet

Delay refresh after command is send as some devices are not ready yet
with the execution and will report wrong status.
This is confusing to the users.

Related forum topic:
https://community.openhab.org/t/xiaomi-mi-air-purifier-xiaomi-mi-io/34840/300

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

* [miio] remove change from PR
2020-10-23 18:45:03 -07:00
Marcel
df261980c8
[miio] add FAQ to readme (#8837)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-22 15:27:35 -07:00
Marcel
8606f57b56
[miio] cleanup duplicate paths (#8835)
Use the path defined in the binding constants

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-22 18:13:08 +02:00
Marcel
49580b59bb
[miio] Add temperature value to chuangmi.plug.v1 (#8832)
Based on: https://github.com/marcelrv/openhab2/pull/12

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-22 18:06:57 +02:00
Marcel
ed6d68ffd7
[miio] add new country server and improve readme (#8816)
* [miio] add new country server and improve readme
* [miio] apply spotless

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-21 14:14:14 -07:00
Marcel
998d11455c
[miio] Allow for custom refresh commands (#8796)
* [miio] Allow for custom refresh commands

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-21 14:01:22 -07:00
Marcel
71fd87c5c9
[miio] add suppport for Mr Bond M1 pro Smart Clothes Dryer (#8749)
Add support for following types
"mrbond.airer.m1s",
"mrbond.airer.m1pro",
"mrbond.airer.m1super"

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-16 10:01:23 -07:00
Marcel
aef1d10f40
[miio] Add Zhimi Heater za1 (#8743)
add model zhimi.heater.za1

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-14 13:59:38 -07:00
Marcel
2913018e4a
[miio] add several Philips lights (#8736)
Add following models:
philips.light.sread2
philips.light.cbulb
philips.light.cbulbs
philips.light.dcolor
philips.light.rwread

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-11 18:18:43 -07:00
Marcel
343981fc12
[miio] add chungmi plug (#8728)
add
chuangmi.plug.hmi206
chuangmi.plug.hmi208

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-11 11:58:09 -07:00
Marcel
a5657bb5d9
[miio] eliminate warning org.apache.commons.io.FileUtils in readmemaker (#8718)
* [miio] eliminate warning org.apache.commons.io.FileUtils in readmemaker

Eliminate
[WARNING] org.openhab.binding.miio.internal.ReadmeHelper.java:[25]
The package org.apache.commons.io.FileUtils should not be used.

* [miio] add StandardCharsets.UTF_8 to file readwrite

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-10 19:24:06 -07:00
Marcel
aa98737e9f
[miio] Improved unsupported handler that build experimental support (#8716)
* [miio] Improved unsupported handler that build experimental support

New unsupported handler that tries to find channels for unsupported
devices and creates experimental database file for it.

* [miio] logger fixes

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-10 11:03:33 -07:00
Marcel
bf72bd2ce3
[miio] Miio philips miot lights (#8699)
* [miio] add Philips miot ceiling lights

adding models
philips.light.dlight
philips.light.mceil
philips.light.mceilm
philips.light.mceils
philips.light.obceil
philips.light.obceim
philips.light.obceis
philips.light.xzceil
philips.light.xzceim
philips.light.xzceis
philips.light.sceil
philips.light.sceilm
philips.light.sceils

* [miio] change name downlight

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-08 20:14:51 -07:00
Marcel
435c78ef8c
[miio] Add several Philips ceiling lights (#8681)
Adding
philips.light.bceiling1
philips.light.bceiling2
philips.light.lnblight1
philips.light.lnblight2
philips.light.lnlrlight
philips.light.lrceiling

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-07 14:39:27 -07:00
Marcel
782a4210a4
[miio] allow for device remarks in the readme from json db (#8676)
* [miio] allow for device remarks in the readme from json db
* Update bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ReadmeHelper.java

Signed-off-by: Marcel Verpaalen marcel@verpaalen.com
2020-10-06 15:04:36 -07:00
Marcel
3403216154
[miio] add several xjx.toiletseats (#8677)
* [miio] add several xjx.toiletseats

To enjoy your quiet moment with Openhab...

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-06 12:55:44 -07:00
Marcel
43be10c204
[miio] onoffpara commandtype fix (#8675)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-06 12:45:10 -07:00
Marcel
a980dbfb4d
[miio] Add many new Yeelights models (#8668)
* [miio] Add many new Yeelights models

closing #8082
* [miio] update doc

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-05 10:35:00 -07:00
Marcel
a857592f07
[miio] allow for comments to channels in json db (#8666)
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-04 16:56:36 -07:00
Marcel
7b2d184676
[miio] add yunmi waterpurifiers (#8665)
* Add several new models waterpurifiers
* Add many new properties

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
2020-10-04 15:29:53 -07:00