xiaomi_airpurifier icon indicating copy to clipboard operation
xiaomi_airpurifier copied to clipboard

Add deerma.humidifier.jsq4 support

Open aktifin opened this issue 4 years ago • 11 comments

Logger: custom_components.xiaomi_miio_airpurifier.fan Source: custom_components/xiaomi_miio_airpurifier/fan.py:1011 Integration: xiaomi_miio_airpurifier (documentation, issues)

Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: deerma.humidifier.jsq4

hass:0.118.3 miio:0.54(after copy the official xiaomi_miio component to custom_components)

aktifin avatar Nov 26 '20 06:11 aktifin

Could you provide some details about your device? Product name, model no. on the label, some specs. I want to use this information to update the list of supported devices as soon as the device is supported.

syssi avatar Nov 26 '20 07:11 syssi

Mi Smart Evaporative Humidifer (deerma.humidifier.jsq4)

Miot specs: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:humidifier:0000A00E:deerma-jsq4:1

Service: siid 1: (Device Information): 4 props, 0 actions
  * Property piid: 1 (Device Manufacturer): (string, unit: None) (acc: ['read'], value-list: [], value-range: None)
  * Property piid: 2 (Device Model): (string, unit: None) (acc: ['read'], value-list: [], value-range: None)
  * Property piid: 3 (Device Serial Number): (string, unit: None) (acc: ['read'], value-list: [], value-range: None)
  * Property piid: 4 (Current Firmware Version): (string, unit: None) (acc: ['read'], value-list: [], value-range: None)
Service: siid 2: (Humidifier): 4 props, 0 actions
  * Property piid: 1 (Switch Status): (bool, unit: None) (acc: ['read', 'write', 'notify'], value-list: [], value-range: None)
  * Property piid: 2 (Device Fault): (uint8, unit: none) (acc: ['read', 'notify'], value-list: [{'value': 0, 'description': 'No Faults'}, {'value': 1, 'description': 'Insufficient Water'}, {'value': 2, 'description': 'Water Separation'}], value-range: None)
  * Property piid: 5 (Fan Level): (uint8, unit: none) (acc: ['read', 'write', 'notify'], value-list: [{'value': 1, 'description': 'Level1'}, {'value': 2, 'description': 'Level2'}, {'value': 3, 'description': 'Humidity'}], value-range: None)
  * Property piid: 6 (Target Humidity): (uint8, unit: percentage) (acc: ['read', 'write', 'notify'], value-list: [], value-range: [40, 80, 1])
Service: siid 3: (Environment): 2 props, 0 actions
  * Property piid: 1 (Relative Humidity): (uint8, unit: percentage) (acc: ['read', 'notify'], value-list: [], value-range: [0, 100, 1])
  * Property piid: 7 (Temperature): (int8, unit: celsius) (acc: ['read', 'notify'], value-list: [], value-range: [-30, 100, 1])
Service: siid 5: (Alarm): 1 props, 0 actions
  * Property piid: 1 (Alarm): (bool, unit: None) (acc: ['read', 'write', 'notify'], value-list: [], value-range: None)
Service: siid 6: (Indicator Light): 1 props, 0 actions
  * Property piid: 1 (Switch Status): (bool, unit: None) (acc: ['read', 'write', 'notify'], value-list: [], value-range: None)
Service: siid 7: (custom): 2 props, 0 actions
  * Property piid: 1 (water-shortage-fault): (bool, unit: none) (acc: ['read', 'notify'], value-list: [], value-range: None)
  * Property piid: 2 (the-tank-filed): (bool, unit: none) (acc: ['read', 'notify'], value-list: [], value-range: None)
  * Event eiid 1 (lack-of-water): (args: [1])
  * Event eiid 2 (bring-water-tank): (args: [2])

syssi avatar Nov 26 '20 07:11 syssi

Model: deerma.humidifier.jsq4
Hardware version: RTL8720C
Firmware version: 2.0.2

aktifin avatar Nov 26 '20 08:11 aktifin

bash-5.0# miiocli airhumidifiermiot --ip xxxxxx --token xxxxxx status
Traceback (most recent call last):
File "/usr/local/bin/miiocli", line 8, in
sys.exit(create_cli())
File "/usr/local/lib/python3.8/site-packages/miio/cli.py", line 45, in create_cli
return cli(auto_envvar_prefix="MIIO")
File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 59, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/miio/click_common.py", line 285, in wrap
result_msg = result_msg_fmt.format(**kwargs)
File "/usr/local/lib/python3.8/site-packages/miio/airhumidifier_miot.py", line 107, in water_level
return int(self.data["water_level"] / 1.20)
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

aktifin avatar Nov 26 '20 08:11 aktifin

The airhumidifiermiot device implements the CA4 model:

https://github.com/rytilahti/python-miio/blob/master/miio/airhumidifier_miot.py#L13

The miot specs of your device needs to be added here for your model name (deerma.humidifier.jsq4).

syssi avatar Nov 26 '20 09:11 syssi

I'll add more deerma.humidifier.jsq4 We also encountered the same problem. Can we update and add support as soon as possible?

liuhuaipu avatar Dec 26 '20 03:12 liuhuaipu

@liuhuaipu Could you provide some details about your device? Product name, model no. on the label, some specs. I want to use this information to update the list of supported devices as soon as the device is supported.

syssi avatar Dec 26 '20 08:12 syssi

微信图片_20201226193025 BS_PIC_2020-12-26-19-35-14 微信图片_20201226193929 What else do you need? I'll give it to you.

liuhuaipu avatar Dec 26 '20 11:12 liuhuaipu

@liuhuaipu The screenshots already helps a lot! Could you provide a (english) product name? It will be used at the first column of the supported device list here: https://github.com/syssi/xiaomi_airpurifier/#supported-devices

syssi avatar Dec 26 '20 12:12 syssi

Product name: Mi Smart Evaporative Humidifer

liuhuaipu avatar Dec 30 '20 03:12 liuhuaipu

2018-11-05 225308 微信图片_20201230110711 微信图片_20201230110716

liuhuaipu avatar Dec 30 '20 03:12 liuhuaipu