You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
I want to use genericmiot to control Mi Smart Power Plug 2 (Wi-Fi and Bluetooth Gateway), but when I use 'status' parameter it said did need. And when I use 'actions' it return nothing.
Version information (please complete the following information):
This error is coming from the device and one could only guess that this device/firmware doesn't like the way this library is using the did in the requests. At the moment, this is used to store a simplified name, but perhaps this device requires a real did of the device?
You could try to use raw_command command of the tool with a payload you see in your debug logs, but replacing the did part with the real device id. You can find that id in the debug output of protocol responses, there's a field called device_id which has it as a hex-encoded string:
device_id = unhexlify('02f2abba')
For the raw payload, you want to convert this to an integer, for example using python:
I change all the did to real device id and it works, but when I run each property separately it can run without changing the did. I also use API to get single property from the device without did and it also works. However, if I get more than one property without changing the 'did' it just failed and say that I need 'did' .I'm confused.
Yeah, that's a firmware bug. Let's keep this issue open, we need to add some type of quirk handling for such cases, likely by passing the real did for listed models.
rytilahti
changed the title
Can't control Mi Smart Power Plug 2 with miiocli
Mi Smart Power Plug 2 (chuangmi.plug.212a01) requires real did for multirequests
Feb 16, 2024
Describe the bug
A clear and concise description of what the bug is.
I want to use genericmiot to control Mi Smart Power Plug 2 (Wi-Fi and Bluetooth Gateway), but when I use 'status' parameter it said did need. And when I use 'actions' it return nothing.
Version information (please complete the following information):
Device information:
Running command info
Model: chuangmi.plug.212a01
Hardware version: esp32
Firmware version: 2.1.8_0044
Supported using: GenericMiot
Command: miiocli genericmiot --ip 192.168.10.245 --token
Supported by genericmiot: True
To Reproduce
Steps to reproduce the behavior:
1.
Expected behavior
A clear and concise description of what you expected to happen.
Console output
DEBUG:miio.miioprotocol:192.168.10.245:54321 (ts: 1970-01-01 07:41:19+00:00, id: 2) << {'error': {'code': -32602, 'message': 'need did'}, 'exe_time': 10, 'id': 2}
ERROR:miio.click_common:Exception: {'code': -32602, 'message': 'need did'}
The text was updated successfully, but these errors were encountered: