Open iromeo opened 3 years ago
I have this device. Is there any chance to get it work?
@wxy8866 I'm working on a PR in my spare time, not ready yet.
Hi. I have the same problem.
@MJeka @wxy8866
Hi guys, I implemented code to support this device, so e.g. it could be used for further integration with Home-Assistant (https://github.com/syssi/xiaomi_airpurifier/issues/50) or some other home automation hub. But before opening a pull request and merging it into python-miio
we need to test my fix. I have only prev model shuii.humidifier.jsq001
, so I cannot test shuii.humidifier.jsq002
, they have different commands and response params.
In order to test my integration with device, you need to:
1) I assume you are familiar with command line and have git and python installed. It is easier to make it using Mac OS or Linux. But windows is also ok. 2) Also I assume you already have a token for your device, e.g you could use https://github.com/Squachen/micloud project or https://python-miio.readthedocs.io/en/latest/discovery.html 3) Clone my repo with fix and install miiocli tool from sources (with my changes). Here steps are similar to https://python-miio.readthedocs.io/en/latest/discovery.html#installation but using my repo.
git clone --branch features/1171_jsq002_support https://github.com/iromeo/python-miio.git python-miio-iromeo
cd python-miio-iromeo
poetry install
4) List of available commands:
$ poetry run miiocli airhumidifierjsq002 --help
Usage: miiocli airhumidifierjsq002 [OPTIONS] COMMAND [ARGS]...
Options:
--ip TEXT [required]
--token TEXT [required]
--model TEXT
--help Show this message and exit.
Commands:
info Get (and cache) miIO protocol information...
off Power off.
on Power on.
raw_command Send a raw command to the device.
set_buzzer Set buzzer on/off.
set_child_lock Set child lock on/off.
set_heater Set water heater on/off.
set_led Turn led on/off.
set_led_brightness Set led brightness.
set_mode Set mode.
set_target_humidity Set the target humidity %, only 0..99.
set_target_water_temperature Set the target water temperature degrees...
status partial(func, *args, **keywords) - new...
test_properties Helper to test device properties.
5) Please test commands, check that they changes device settings as expected. Also that in status
command results all fields have values as expected.
Some times command could not from the first attempt due to Error: Unable to discover the device ..
. Just retry in few seconds.
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> info
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> on
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> off
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_buzzer true
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_buzzer false
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_child_lock true
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_child_lock false
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_heater true
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_heater false
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_led true
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_led false
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_led_brightness off
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_led_brightness low
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_led_brightness high
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_mode level1
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_mode level2
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_mode level3
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_humidity 30
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_humidity 0
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_humidity 31
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_humidity 99
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_water_temperature 30
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_water_temperature 33
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> set_target_water_temperature 60
miiocli airhumidifierjsq002 --ip <IP> --token <TOKEN> status
Checked all the commands. The commands to turn on and off the water heater do not work. All other commands are working.
miiocli airhumidifierjsq002 --ip <my ip> --token <my token> set_heater true
- I get an error
Turning on water heater
Traceback (most recent call last):
File "
miiocli airhumidifierjsq002 --ip <my ip> --token <my token> set_heater false
- I get an error
Turning off water heater
Traceback (most recent call last):
File "
@AleksandrBoyarshinov Thx a lot! I fixed an error in the heater command.
Please check again: 1) Update project:
cd python-miio-iromeo
git pull
2) Re-install library:
poetry install
3) Check heater:
miiocli airhumidifierjsq002 --ip <my ip> --token <my token> set_heater true
miiocli airhumidifierjsq002 --ip <my ip> --token <my token> set_heater false
@iromeo
I checked, now everything works.
miiocli airhumidifierjsq002 --ip
miiocli airhumidifierjsq002 --ip
Hi. Can you merge 1171_jsq002_support https://github.com/iromeo/python-miio.git branch with the master branch which adds support shuii.humidifier.jsq002?
--branch features/1171_jsq002_support https://github.com/iromeo/python-miio.git
Device information:
Use
miiocli device --ip <ip address> --token <token>
.shuii.humidifier.jsq002
ESP8266
1.4.0
Additional context Some time ago I added
shuii.humidifier.jsq001
support. Now I'm going to make a PR forshuii.humidifier.jsq002
device support. This issue is a first step for supporting it in HomeAssistant, as part of https://github.com/syssi/xiaomi_airpurifier/issues/50