al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.55k stars 642 forks source link

chuangmi.plug.v1 -10000 Method not found #13

Closed xuefer closed 3 years ago

xuefer commented 3 years ago
Device info
chuangmi.plug.v1
by chuangmi
Firmware: 1.2.4_7

was good with xiaomi_miio, but error after switching to xiaomi_miot

2021-02-02 19:08:16 ERROR (MainThread) [custom_components.xiaomi_miot] Got exception while fetching the state for WorkRoom Desktop Light USB Switch Status: {'code': -10000, 'message': 'Method not found.'}
2021-02-02 19:08:16 ERROR (MainThread) [custom_components.xiaomi_miot] Got exception while fetching the state for WorkRoom Desktop Light Power Switch Status: {'code': -10000, 'message': 'Method not found.'}

beside this issue, temperature sensor is missing

al-one commented 3 years ago

This device needs enable miot_cloud.

xuefer commented 3 years ago

customize.yaml

switch.workroom_desktop_light_power_switch_status:
  miot_cloud: 'true'
sensor.ih_cooker_induction_cooker:
  miot_cloud: 'true'
sensor.ih_cooker_2:
  miot_cloud: 'true'

Is there anything wrong with this configuration?

This is generated by "Configuration > Customize > Select Entity > Add Other Attribute"

I wonder why xiaomi_miio don't need micloud username/password

al-one commented 3 years ago

customize.yaml ··· switch.workroom_desktop_light_power_switch_status: miot_cloud: 'true' sensor.ih_cooker_induction_cooker: miot_cloud: 'true' sensor.ih_cooker_2: miot_cloud: 'true' ··· Is there anything wrong with this configuration?

This is generated by "Configuration > Customize > Select Entity > Add Other Attribute"

I wonder why xiaomi_miio don't need micloud username/password

Because this device does not support miot-spec in LAN.

xuefer commented 3 years ago

Because this device does not support miot-spec in LAN.

hrm.. I'm sure this device is supported by xiaomi_miio integration using LAN, but not sure what protocol it use. Did you mean this devices support old miio spec but not new miot spec?

http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:outlet:0000A002:chuangmi-v1:1

al-one commented 3 years ago

Yes. You can try this shell:

pip3 install python-miio
miiocli -d device --ip 192.168.lan.ip --token xxxxxx raw_command get_properties "[{'did': 'result', 'siid': 2, 'piid': 1}]"
miiocli -d device --ip 192.168.lan.ip --token xxxxxx raw_command get_properties "[{'did': 'result', 'siid': 3, 'piid': 1}]"

This device support miot-spec only in cloud. https://debugger.iot.mi.com/iot/devices

xuefer commented 3 years ago

反馈给小米了,等他们升级吧,也可能不升级了

同 #6