Skip to content
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

add json decode quirk for xiaomi e10 #1837

Merged
merged 2 commits into from Oct 7, 2023
Merged

Conversation

kolos
Copy link
Contributor

@kolos kolos commented Oct 7, 2023

Device:

Model: xiaomi.vacuum.b112
Hardware version: esp32
Firmware version: 2.2.4_0049

Fixes decode JSON error:

miiocli genericmiot --ip <IP> --token <TOKEN> status
Running command status
ERROR:miio.protocol:Unable to parse json 'b'{"id":4,"result":[{"did":"sweep:mop-hours","siid":7,"piid":15,"code":0,"value":180},{"did":"sweep:time-zone","siid":7,"piid":20,"code":0,"value":-7200},{"did":"sweep:cur-lang","siid":7,"piid":21,"code":0,"value":"ZH_CN"},{"did":"sweep:cleaning-time","siid":7,"piid":22,"code":0,"value":0},{"did":"sweep:cleaning-area","siid":7,"piid":23,"code":0,"value":0},,{"did":"sweep:consumablesinfo","siid":7,"piid":48,"code":0,"value":"[99_357,98_177,98_177,100_180]"},{"did":"sweep:charge-pose","siid":7,"piid":49,"code":0,"value":"[0,0]"},{"did":"order:all-enable-count","siid":8,"piid":18,"code":0,"value":"hello"},{"did":"point-zone:target-point","siid":9,"piid":5,"code":0,"value":"0,0"}],"exe_time":40}'': Expecting value: line 1 column 358 (char 357)
ERROR:miio.click_common:Exception: Unable to parse message payload

Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @kolos! Please run pre-commit run -a to fix the linting issues and this is good to go!

@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

Merging #1837 (b645492) into master (79d2685) will decrease coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1837      +/-   ##
==========================================
- Coverage   80.88%   80.87%   -0.02%     
==========================================
  Files         193      193              
  Lines       18597    18599       +2     
  Branches     4020     4021       +1     
==========================================
- Hits        15043    15042       -1     
- Misses       3276     3279       +3     
  Partials      278      278              
Files Coverage Δ
miio/protocol.py 93.75% <ø> (-3.06%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rytilahti rytilahti merged commit 4390234 into rytilahti:master Oct 7, 2023
15 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants