-
-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERR: miiocli genericmiot --ip 192.168.5.x --token xxxx status #1933
Comments
Looks like the device is responding with invalid JSON (the two objects in the result list are not separated by a comma) so this is a firmware problem. #1890 had a different version and it was apparently working :-( If you just need the data, you could use |
Actually, I want to control the on and off of this plug. miiocli genericmiot --ip 192.168.5.x --token xxxx actions |
That toggle action you see could be called using So here's how this device shows up in the simulator (
so the command to change the state would be Alternatively, you can use the siid/piid (shown if you call Hope that helps! |
The program runs fine, but it cannot ON or OFF the plug
|
This work find.
Thank you very much. |
Thanks |
Glad you got it working! It's odd that the |
|
|
Describe the bug
ERR: miiocli genericmiot --ip 192.168.5.x --token xxxx status
Version information (please complete the following information):
Device information:
If the issue is specific to a device [Use
miiocli device --ip <ip address> --token <token> info
]:Model: cuco.plug.cp1
Hardware version: esp8285
Firmware version: 2.0.1_0013
Supported using: GenericMiot
Command: miiocli genericmiot --ip 192.168.5.x --token xxxx
Supported by genericmiot: True
To Reproduce
Steps to reproduce the behavior:
1.miiocli genericmiot --ip 192.168.5.x --token xxxx status
Expected behavior
get status of plug
Console output
miiocli genericmiot --ip 192.168.5.x --token xxxx status
Running command status
ERROR:miio.protocol:Unable to parse json 'b'{"id":2,"result":[{"did":"switch:on","siid":2,"piid":1,"code":0,"value":false}{"did":"indicator-light:on","siid":3,"piid":1,"code":0,"value":true}]}'': Expecting ',' delimiter: line 1 column 79 (char 78)
ERROR:miio.click_common:Exception: Unable to parse message payload
Traceback (most recent call last):
File "/Users/xia/src/Xiaomi-cloud-tokens-extractor/venv/lib/python3.12/site-packages/miio/protocol.py", line 204, in _decode
return json.loads(decoded)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.3/Frameworks/Python.framework/Versions/3.12/lib/python3.12/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 79 (char 78)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
The text was updated successfully, but these errors were encountered: