GithubHelp home page GithubHelp logo

miservice's People

Contributors

yonsm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

miservice's Issues

TTS无法播报,报-704220025

尝试了几种播报,都失败,不知是什么原因?
F:\projects\MiService>python micli.py 5 你好
-704220025

F:\projects\MiService>python micli.py 5-1 你好
-704220025

F:\projects\MiService>python micli.py 5-1 你好 #0
-704220025

L05B设备,无法mute

控制台能正常显示,使用命令python3 xiaogpt.py --hardware L05B --use_chatgpt_api --mute_xiaoai
只有小爱自己的回答进行播报,无法播报gpt的内容

[SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]

➜ MiService-main python micli.py list
Exception on login =[email protected]: Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1089, in create_connection
transport, protocol = await self._create_connection_transport(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1119, in _create_connection_transport
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/sslproto.py", line 534, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 975, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Users/xxxxxx/Downloads/MiService-main/miservice/miaccount.py", line 56, in login
resp = await self._serviceLogin(f'serviceLogin?sid={sid}&_json=true')
File "/Users/xxxxxx/Downloads/MiService-main/miservice/miaccount.py", line 94, in _serviceLogin
async with self.session.request('GET' if data is None else 'POST', url, data=data, cookies=cookies, headers=headers) as r:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 982, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]
Error https://api.io.mi.com/app/home/device_list: Login failed

ha配置小米账号 报错

Setup failed for zhimi: Requirements for zhimi not found: ['miservice>=2021.3.24'].
提示这个
配置
zhimi:
username: '18xxxxxxxx'
password: 'xxxxxxxx'

micli 5-4一直报-704220025

使用micli.py 5-4 查询天气 #1micli.py 5-5 查询天气 #1
返回-704220025
使用micli 5-5 查询天气 \#1
返回0,无回应
只有使用micli 5-5 查询天气 \#0 或者 micli.py action '{"did":"123465789","siid":5,"aiid":5,"in":["查询天气",0]}'可以正常输出天气

下面是我的spec,我看不懂为什么这个命令必须是5-5

Device_Information = 1
    Device_Manufacturer = 1
    Device_Model = 2
    Device_Serial_Number = 3
    Current_Firmware_Version = 4

Speaker = 2
    Volume = 1  # uint8  # rw
    Mute = 2  # bool  # rw

Play_Control = 3
    _Playing_State = 1  # uint8  # n

    _Play = 1
    _Pause = 2
    _Next = 3
    _Previous = 4

Microphone = 4
    Mute = 1  # bool  # rw

Intelligent_Speaker = 5
    _Text_Content = 1
    _Silent_Execution = 2  # uint8
    Sleep_Mode = 3  # bool  # rwn
    Audio_Id = 4  # rn

    _Play_Text = 1  # in=[1]
    _Wake_Up = 2  # in=[1]
    _Play_Radio = 3
    _Execute_Text_Directive = 4  # in=[1, 2]

Clock = 6

    _Stop_Alarm = 1

Speaker_Volume
    MIN = 5
    MAX = 100

Play_Control_Playing_State
    Stop = 0
    Playing = 1
    Pause = 2

Intelligent_Speaker_Silent_Execution
    On = 0
    Off = 1

KeyError: 'userId'/Error https://api.io.mi.com/app/home/device_list: Login failed

运行 ./micli.py list 后,出现下面的错误:
Exception on login 187********: 'userId'
Traceback (most recent call last):
File "/Users/renyajun/gitee/MiBot/miservice/miaccount.py", line 71, in login
self.token['userId'] = resp['userId']
KeyError: 'userId'
Error https://api.io.mi.com/app/home/device_list: Login failed

该怎么解决呢?之前看到有人通过取消代理解决,但是我这边操作后还是不行。

home assistant升级到2022.3.0后报错

hacs安装提示“Repository structure for main is not compliant”
手动安装报错“Unable to install package miservice>=2021.3.24: ERROR: Could not find a version that satisfies the requirement miservice>=2021.3.24 (from versions: 2021.2.24, 2021.3.1, 2021.3.16, 2021.3.17, 2021.3.18, 2021.3.20, 2021.3.22, 2021.3.24) ERROR: No matching distribution found for miservice>=2021.3.24”

micli list got Error https://api.io.mi.com/app/home/device_list: Login failed

Exception on login mm2fox: {'qs': '%3Fsid%3Dxiaomiio%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '0psXfr43eNI0IX6q9Suk3qWbRqU=', 'sid': 'xiaomiio', 'result': 'error', 'captchaUrl': None, 'callback': 'https://sts.api.io.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}
Traceback (most recent call last):
File "/home/mm2fox/.local/lib/python3.10/site-packages/miservice/miaccount.py", line 69, in login
raise Exception(resp)
Exception: {'qs': '%3Fsid%3Dxiaomiio%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '0psXfr43eNI0IX6q9Suk3qWbRqU=', 'sid': 'xiaomiio', 'result': 'error', 'captchaUrl': None, 'callback': 'https://sts.api.io.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}
Error https://api.io.mi.com/app/home/device_list: Login failed

[SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]

image
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]
Error https://api.io.mi.com/app/home/device_list: Login failed
没有用代理

登录失败,报错self.token['userId'] = resp['userId'] 解决方案

miaccount.py的67行打印结果后,发现返回值类似于
{'notificationUrl': '/identity/authStart?sid=xxxxxxxxx_locale=zh_CN', 'result': 'ok', 'code': 0, 'captchaUrl': None, 'description': '成功', 'location': '', 'securityStatus': 16, 'pwd': 0, 'child': 0, 'desc': '成功'}

解决方案:修改小米账号密码 重新登陆就好了

Got Error https://api.io.mi.com/app/home/device_list: Login failed

I'm trying to depoy this project on my linux device, i set the MI_USER and MI_PASS first ,when i run the micli.py list, I got this.
it works well on my other deivces except this one

Exception on login 118***9572: 'userId'
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/miservice/miaccount.py", line 71, in login
self.token['userId'] = resp['userId']
~~~~^^^^^^^^^^
KeyError: 'userId'
Error https://api.io.mi.com/app/home/device_list: Login failed

请问是否支持播放自定义音频文件呢?

spec如下:
Intelligent_Speaker = 7
_Text_Content = 1
_Silent_Execution = 2 # bool
Sleep_Mode = 3 # bool # rwn
Audio_Id = 4 # rn

_Wake_Up = 1
_Play_Radio = 2
_Play_Text = 3  # in=[1]
_Execute_Text_Directive = 4  # in=[1, 2]
_Play_Music = 5

里面有 Play_Radio 和 Play_Music 的选项,但是没有 in 的入参,应该如何实现呢?

安装不了啦

$ pip3 install miservice
Collecting miservice
Using cached miservice-2.0.1.tar.gz (12 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "C:\Users\peter\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\peter\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\peter\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\peter\AppData\Local\Temp\pip-build-env-f9_my6xa\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\peter\AppData\Local\Temp\pip-build-env-f9_my6xa\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "C:\Users\peter\AppData\Local\Temp\pip-build-env-f9_my6xa\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\peter\AppData\Local\Temp\pip-build-env-f9_my6xa\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "", line 25, in
File "C:\Users\peter\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1135, in read_text
return f.read()
File "C:\Users\peter\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 2062: character maps to
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

How to run script through http and https proxy?

I set
export http_proxy=http://x.x.x.x:3128
export https_proxy=http://x.x.x.x:3128

in /etc/profile

But when I run micli.py, it return errors:

Exception on login xxxxxxx: Cannot connect to host account.xiaomi.com:443 ssl:default [Connect call failed ('110.43.87.14', 443)]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/aiohttp/connector.py", line 969, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
    sock = await self._connect_sock(
  File "/usr/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
    return await fut
  File "/usr/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('110.43.87.14', 443)

how to set proxy in micli.py script?

如何控制下一首播放

Play_Control = 3
    _Playing_State = 1  # uint8  # n

    _Play = 1
    _Pause = 2
    _Next = 3
    _Previous = 4

我试过3 3-1 3-2 3-3 =#1 #true #3都没效果

小米触屏音箱无法执行指令

{
"type": "urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx04:1",
"description": "Speaker",
"services": [
{
"iid": 1,
"type": "urn:miot-spec-v2:service:device-information:00007801:xiaomi-lx04:1",
"description": "Device Information",
"properties": [
{
"iid": 1,
"type": "urn:miot-spec-v2:property:manufacturer:00000001:xiaomi-lx04:1",
"description": "Device Manufacturer",
"format": "string",
"access": [
"read"
]
},
{
"iid": 2,
"type": "urn:miot-spec-v2:property:model:00000002:xiaomi-lx04:1",
"description": "Device Model",
"format": "string",
"access": [
"read"
]
},
{
"iid": 3,
"type": "urn:miot-spec-v2:property:serial-number:00000003:xiaomi-lx04:1",
"description": "Device Serial Number",
"format": "string",
"access": [
"read"
]
},
{
"iid": 4,
"type": "urn:miot-spec-v2:property:firmware-revision:00000005:xiaomi-lx04:1",
"description": "Current Firmware Version",
"format": "string",
"access": [
"read"
]
}
]
},
{
"iid": 2,
"type": "urn:miot-spec-v2:service:speaker:0000781C:xiaomi-lx04:1",
"description": "Speaker",
"properties": [
{
"iid": 1,
"type": "urn:miot-spec-v2:property:volume:00000013:xiaomi-lx04:1",
"description": "Volume",
"format": "uint8",
"access": [
"read",
"write"
],
"unit": "percentage",
"value-range": [
5,
100,
1
]
},
{
"iid": 2,
"type": "urn:miot-spec-v2:property:mute:00000040:xiaomi-lx04:1",
"description": "Mute",
"format": "bool",
"access": [
"read",
"write"
]
}
]
},
{
"iid": 3,
"type": "urn:miot-spec-v2:service:play-control:0000781D:xiaomi-lx04:1",
"description": "Play Control",
"properties": [
{
"iid": 1,
"type": "urn:miot-spec-v2:property:playing-state:00000041:xiaomi-lx04:1",
"description": "Playing State",
"format": "uint8",
"access": [
"read",
"notify"
],
"value-list": [
{
"value": 0,
"description": "Pause"
},
{
"value": 1,
"description": "Playing"
}
]
}
],
"actions": [
{
"iid": 1,
"type": "urn:miot-spec-v2:action:play:0000280B:xiaomi-lx04:1",
"description": "Play",
"in": [],
"out": []
},
{
"iid": 2,
"type": "urn:miot-spec-v2:action:pause:0000280C:xiaomi-lx04:1",
"description": "Pause",
"in": [],
"out": []
},
{
"iid": 3,
"type": "urn:miot-spec-v2:action:next:0000280F:xiaomi-lx04:1",
"description": "Next",
"in": [],
"out": []
},
{
"iid": 4,
"type": "urn:miot-spec-v2:action:previous:0000280E:xiaomi-lx04:1",
"description": "Previous",
"in": [],
"out": []
}
]
},
{
"iid": 4,
"type": "urn:miot-spec-v2:service:microphone:00007826:xiaomi-lx04:1",
"description": "Microphone",
"properties": [
{
"iid": 1,
"type": "urn:miot-spec-v2:property:mute:00000040:xiaomi-lx04:1",
"description": "Mute",
"format": "bool",
"access": [
"read",
"write"
]
}
]
},
{
"iid": 5,
"type": "urn:miot-spec-v2:service:intelligent-speaker:0000789B:xiaomi-lx04:1",
"description": "Intelligent Speaker",
"properties": [
{
"iid": 1,
"type": "urn:miot-spec-v2:property:text-content:000000FA:xiaomi-lx04:1",
"description": "Text Content",
"format": "string",
"access": []
},
{
"iid": 2,
"type": "urn:miot-spec-v2:property:silent-execution:000000FB:xiaomi-lx04:1",
"description": "Silent Execution",
"format": "uint8",
"access": [],
"value-list": [
{
"value": 0,
"description": "On"
},
{
"value": 1,
"description": "Off"
}
]
}
],
"actions": [
{
"iid": 1,
"type": "urn:miot-spec-v2:action:play-text:00002841:xiaomi-lx04:1",
"description": "Play Text",
"in": [
1
],
"out": []
},
{
"iid": 2,
"type": "urn:miot-spec-v2:action:wake-up:0000283F:xiaomi-lx04:1",
"description": "Wake Up",
"in": [
1
],
"out": []
},
{
"iid": 3,
"type": "urn:miot-spec-v2:action:play-radio:00002840:xiaomi-lx04:1",
"description": "Play Radio",
"in": [],
"out": []
},
{
"iid": 4,
"type": "urn:miot-spec-v2:action:execute-text-directive:00002842:xiaomi-lx04:1",
"description": "Execute Text Directive",
"in": [
1,
2
],
"out": []
}
]
},
{
"iid": 6,
"type": "urn:miot-spec-v2:service:clock:0000789A:xiaomi-lx04:1",
"description": "Clock",
"actions": [
{
"iid": 1,
"type": "urn:miot-spec-v2:action:stop-alarm:00002843:xiaomi-lx04:1",
"description": "Stop Alarm",
"in": [],
"out": []
}
]
}
]
}

TTS正常,但是直接执行指令就不行,返回

/config # micli.py 5-4 查询天气 #1
{
"did": "********",
"miid": 0,
"siid": 5,
"aiid": 4,
"code": -704220025,
"exe_time": 0,
"net_cost": 0,
"ot_cost": 0,
"otlocalts": 0,
"oa_cost": 0,
"_oa_rpc_cost": 0
}

修改密码后登陆失败

Auth error on request https://api.io.mi.com/app/home/device_list {"code":3,"message":"auth err"}, relogin...
Traceback (most recent call last):
File "/usr/local/bin/micli.py", line 55, in
loop.run_until_complete(main(username, password, did, ' '.join(argv[1:])))
File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
return future.result()
File "/usr/local/bin/micli.py", line 31, in main
result = await miio_command(service, did, text, sys.argv[0] + ' ')
File "/usr/local/lib/python3.6/dist-packages/miservice/miiocommand.py", line 63, in miio_command
return await service.device_list(argc > 0 and argv[0], argc > 1 and string_to_value(argv[1]), argc > 2 and argv[2])
File "/usr/local/lib/python3.6/dist-packages/miservice/miioservice.py", line 97, in device_list
result = await self.miio_request('/home/device_list', {'getVirtualModel': bool(getVirtualModel), 'getHuamiDevices': int(getHuamiDevices)})
File "/usr/local/lib/python3.6/dist-packages/miservice/miioservice.py", line 58, in miio_request
return (await self.account.mi_request('xiaomiio', self.server + uri, prepare_data, headers))['result']
File "/usr/local/lib/python3.6/dist-packages/miservice/miaccount.py", line 129, in mi_request
return await self.request(sid, url, data, headers, False)
AttributeError: 'MiAccount' object has no attribute 'request'

miservice/miaccount.py的129行改成return await self.mi_request(sid, url, data, headers, False)后问题解决

xiaomi.wifispeaker.l05c action命令后貌似没反应

image
/usr/local/bin/micli.py action '{"did":"小米play增强版did","miid":1,"siid":5,"aiid":4,"in":["天气",1]}'
虽然返回的是0,但是小米play增强版没有任何反应
同样的命令放在xiaomi.wifispeaker.lx04 小米触屏音箱就正常
看spec这两个音箱的,siid和piid应该是一样的5-4

能问一下 关于accout 中 securityTokenService 加签验证 这一步

'{
"server": "Tengine",
"date": "Wed, 06 Sep 2023 16:32:50 GMT",
"content-type": "text/plain; charset=utf-8",
"content-length": "2",
"connection": "close",
"request-id": "qRS4DWGaTQm4f9fY8CJ5xQ",
"x-xiaomi-status-code": "400"
}'

 public async securityTokenService(
    location: string,
    nonce: string,
    ssecurity: string
  ): Promise<string> {
    const nsec = `nonce=${nonce}&${ssecurity}`;
    const clientSign = crypto.createHash('sha1').update(nsec).digest('base64');
    let url = `${location}&clientSign=${encodeURI(clientSign)}`;
    const response = await axios.get(url, {
      headers: {
        'User-Agent':
          'APP/com.xiaomi.mihome APPV/6.0.103 iosPassportSDK/3.9.0 iOS/14.4 miHSTS',
        'Content-Type': 'application/x-www-form-urlencoded',
      },
    });
    const serviceToken = response.headers['set-cookie'][0].split('=')[1];
    if (!serviceToken) {
      throw new Error(`serviceToken is undefined \n ${response.data}`);
    }
    return serviceToken;
  }

总是 400 拿不到 service token 。。

UnicodeDecodeError: 'gbk'

Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\shanj\AppData\Local\Temp\pip-install-bggi9i8r\miservice_9e80c86c7c174642b4ed64e394edb624\setup.py", line 25, in
long_description=Path('README.md').read_text(),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Python\Python311\Lib\pathlib.py", line 1059, in read_text
return f.read()
^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0x9a in position 194: illegal multibyte sequence

安装就直接报错了,强制改了read 方法才过的

Login failed

$ micli.py list
Exception on login 3228425: {'code': 87001, 'desc': '验证码输入错误', 'captchaUrl': '/pass/getCode?icodeType=login&0.17358375688458416', 'type': 'manMachine'}
Traceback (most recent call last):
File "/home/ec2-user/.local/lib/python3.7/site-packages/miservice/miaccount.py", line 69, in login
raise Exception(resp)
Exception: {'code': 87001, 'desc': '验证码输入错误', 'captchaUrl': '/pass/getCode?icodeType=login&0.17358375688458416', 'type': 'manMachine'}
Error https://api.io.mi.com/app/home/device_list: Login failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.