-
-
Save marcelrv/20509106e97b4c7dd8c9056aefda2332 to your computer and use it in GitHub Desktop.
http://miot-spec.org/miot-spec-v2/instances?status=all | |
http://miot-spec.org/miot-spec-v2/instances?status=debug | |
http://miot-spec.org/miot-spec-v2/instances?status=released | |
and for example air purifier 3 cn (zhimi.airpurifier.ma4) | |
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-ma4:1 | |
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:light:0000A001:philips-bulb:1 | |
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:fan:0000A005:zhimi-sa1:1 | |
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:light:0000A001:philips-sread1:1 | |
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:rockrobo-v1:1 | |
other queries | |
Type | |
DeviceType | |
http://miot-spec.org/miot-spec-v2/spec/devices | |
ServiceType | |
http://miot-spec.org/miot-spec-v2/spec/services | |
PropertyType | |
http://miot-spec.org/miot-spec-v2/spec/properties | |
ActionType | |
http://miot-spec.org/miot-spec-v2/spec/actions | |
EventType | |
http://miot-spec.org/miot-spec-v2/spec/events | |
DeviceType | |
http://miot-spec.org/miot-spec-v2/spec/device?type=urn:miot-spec-v2:device:light:0000A001 | |
ServiceType | |
http://miot-spec.org/miot-spec-v2/spec/service?type=urn:miot-spec-v2:service:fan:00007808 | |
PropertyType | |
http://miot-spec.org/miot-spec-v2/spec/property?type=urn:miot-spec-v2:property:on:00000006 | |
ActionType | |
http://miot-spec.org/miot-spec-v2/spec/action?type=urn:miot-spec-v2:action:play:0000280B | |
https://github.com/MiEcosystem/miot-spec-doc/ | |
https://translate.google.com/translate?sl=zh-CN&tl=en&u=https%3A%2F%2Fiot.mi.com%2Fnew%2Fdoc%2F02-%25E5%25BC%2580%25E5%258F%2591%25E8%2580%2585%25E9%25A1%25BB%25E7%259F%25A5%2F02-%25E5%25B0%258F%25E7%25B1%25B3IoT%25E5%258D%258F%25E8%25AE%25AE%25E8%25A7%2584%25E8%258C%2583%2F04-%25E5%25AE%259E%25E4%25BE%258B%25E5%25AE%259A%25E4%25B9%2589.html | |
https://github.com/Yeelight/miot-api | |
e.g. All outlets | |
http://www.miot-spec.org/instance/devices?name=outlets | |
http://miot-spec.org/instance/devices?vendor=yeelink | |
http://miot-spec.org/instance/devices | |
Vacuum examples | |
http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:rockrobo-v1:1 | |
POST https://de.api.io.mi.com/app/v2/plugin/fetch_plugin HTTP/1.1
data: {"latest_req":{"region":"DE","app_platform":"Android","plugins":[{"type":"MPK","package_id":1479,"model":"rockrobo.vacuum.v1"}],"api_version":10035,"package_type":""},"backup_req":{"api_level":101,"plugins":[{"type":"MPK","package_id":1479,"model":"rockrobo.vacuum.v1"}],"app_platform":"phone"}}
{"code":0,"message":"","result":{"latest_info":[],"backup_info":[{"model":"rockrobo.vacuum.v1","new_version":0,"plugin_id":0,"package_id":0,"force":0,"version":0,"change_log":"","download_url":"","safe_url":"","package_name":"","length":0,"type":"","api_level":0}]}}
POST https://de.api.io.mi.com/app/v2/miotspec/devicelist HTTP/1.1
no data
resp =>
{"code":0,"message":"ok","result":{"list":[{"did":"49884063","name":"Mi LED Desk Lamp ","pd_id":150,"model":"yeelink.light.lamp1","type":"urn:miot-spec-v2:device:light:0000A001:yeelight-lamp1:1"},{"did":"55512643","name":"Mi Robot Vacuum ","pd_id":85,"model":"rockrobo.vacuum.v1","type":"urn:miot-spec-v2:device:vacuum:0000A006:rockrobo-v1:1"}]}}
Miot subcommand response codes
| 0 | Success |
| 1 | Request received, but the operation has not been completed yet |
| -4001 | Unreadable attribute |
| -4002 | Attribute is not writable |
| -4003 | Properties, methods, events do not exist |
| -4004 | Other internal errors |
| -4005 | Attribute value error |
| -4006 | Method in parameter error |
| -4007 | did error
I would like to download all pages from that website. Wouldnt there be a way to rip the whole website and find all pages for all devices?
Here are 2 more for both the smart heaters ZA1 and ZB1:
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:heater:0000A01A:zhimi-za1:1
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:heater:0000A01A:zhimi-zb1:1
It seems like http://miot-spec.org/instance/devices is out dated or they changed to another page setup for newer devices. These heaters arent shown on there.
Here the complete list of all devices out there...
https://miot-spec.org/miot-spec-v2/instances
Every instance in that list can be brought up by replacing the "/instances" part with "/instance?type=" and then the instance in the page i provided.
not all devices support miot spec, prob your cgllc is one of those.
For older devices, typically not all commands are suported but a subset of the commands may be supported by the miot spec.
You can recognise this as these commands can't be send directly to the device, but instead, need to be send to the cloud and the Xiaomi cloud will do the translation to the device commands.
Lastest version
POST https://de.api.io.mi.com/app/v2/plugin/fetch_plugin HTTP/1.1
data: {"latest_req":{"region":"DE","app_platform":"Android","plugins":[{"model":"rockrobo.vacuum.v1"}],"api_version":10035,"package_type":""},"backup_req":{"api_level":101,"plugins":[{"model":"rockrobo.vacuum.v1"}],"app_platform":"phone"}}
resp
{"code":0,"message":"","result":{"latest_info":[],"backup_info":[{"model":"rockrobo.vacuum.v1","new_version":1,"plugin_id":80,"package_id":1479,"force":0,"version":125,"change_log":"","download_url":"http://cdn.awsde0.fds.api.mi-img.com/default/com.rockrobo.app_2019042811141769713.zip?Expires=1587523514000&GalaxyAccessKeyId=5721718224520&Signature=Hh/xUW/pQ7yyDAZZmZSvcBPhTaA=","safe_url":"https://cdn.awsde0.fds.api.mi-img.com/default/com.rockrobo.app_2019042811141769713.zip?Expires=1592333563000&GalaxyAccessKeyId=5721718224520&Signature=eHe96RdBHEZzmuIrTzI/kzXYNSk=","package_name":"com.rockrobo.app","length":6260865,"type":"MPK","api_level":2}]}}