Skip to content

Xiaomi Yeelight Bedside Lamp

Jevgeni Kiski edited this page May 5, 2019 · 3 revisions

Description

JSON payloads and responses that are available for yeelink.light.bslamp1

Acquired by reverse engineering app -> device communication and inspecting firmware file.

Some methods have duplicates in the list. Probably they act differently and accept different argument lengths.

miIO.info

Request:

{
  "id":581,
  "method":"miIO.info",
  "params":[]
}

Response:

{
  "result":{
    "life":6955,
    "token":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "mac":"AA:BB:CC:DD:EE:F1",
    "fw_ver":"1.5.9_0170",
    "hw_ver":"MTK7697",
    "uid":"1971339949",
    "model":"yeelink.light.bslamp1",
    "wifi_fw_ver":"20180702211408",
    "config_type":"app",
    "ap":{
      "rssi":-52,
      "ssid":"WiFi",
      "bssid":"AA:BB:CC:DD:EE:F0"
    },
    "netif":{
      "localIp":"192.168.1.2",
      "mask":"255.255.255.0",
      "gw":"192.168.1.1",
      "gw_mac":"AA:BB:CC:DD:EE:FF"
    },
    "mmfree":55168
  },
  "id":581
}

OTA

miIO.get_ota_state

Request:

{"id":451,"method":"miIO.get_ota_state","params":[]}

Response:

{"result":["idle"],"id":451}

miIO.ota_install

miIO.get_ota_progress

Request:

{"id":451,"method":"miIO.get_ota_progress","params":[]}

Response:

{"result":[101],"id":451}

miIO.ota

Other

miIO.xgetKeys

miIO.xdel

miIO.xset

miIO.xget

miIO.config_router

Request:

{
  "id":451,
  "method":"miIO.config_router",
  "params":[ ???? ]
}

miIO.stop_diag_mode

miIO.bind_stat

Request:

{"id": 451, "method": "miIO.bind_stat", "params": []}

Response:

{"result":["ok"],"id":451}

miIO.restore

miIO.get_disable_local_restore

bind_key

Request:

{"id": 451, "method": "bind_key", "params": []}

Response:

{"result":["ok"],"id":451}

miIO.reboot

miIO.config

miIO.disable_local_restore

miIO.wifi_assoc_state

Request:

{"id": 451, "method": "miIO.wifi_assoc_state", "params": []}

Response:

{"result":{"state":"CONNECTING","auth_fail_count":0,"conn_succes_count":1,"conn_fail_count":0,"dhcp_fail_count":0},"id":451}

miIO.set_test

This can brick your device

miIO.set_xy

get_aging_status

Request:

{"id": 451, "method": "get_aging_status", "params": []}

Response:

{"result":[0, 5, 1],"id":451}

miio_test

This can brick your device

miio_test_exit

This can brick your device

set_ps

get_ps

Request:

{"id": 451, "method": "get_ps", "params": ["1"]}

Response:

{"result":[""],"id":451}

Yeelight

stop_cf

adjust_color

set_hsv

adjust_ct

set_name

set_music

cron_del

toggle

start_cf

set_rgb

adjust_bright

set_scene

set_power

cron_get

Request:

{"id": 451, "method": "cron_get", "params": [0]}

Response:

{"result":[],"id":451}

set_bright

set_adjust

set_ct_abx

cron_add

set_default

get_prop

Bluetooth

miIO.bleEvtRuleAdd

miIO.bleGetNearbyBandList

miIO.bleScan

miIO.ble_get_version

miIO.bleCharRead

miIO.ble_alive_dev

miIO.bleSetBandNearbyMode

miIO.bleEvtRuleDel

miIO.bleSetIosNearbyMode

miIO.ble_get_list

Hangs when executed

miIO.ble_keepalive_test

miIO.ble_dbg_tbl_dump

miIO.ble_dbg_tbl_dump

miIO.setBleDev

miIO.ble_get_version

Request:

{"id": 451, "method": "miIO.ble_get_version", "params": []}

Response:

{"result":["1.5.9_0170"],"id":451}

miIO.ble_alive_dev

miIO.ble_get_list

miIO.ble_get_version

miIO.bleConnect

miIO.ble_get_list

miIO.bleAdv

miIO.bleStartSearchBand

miIO.ble_alive_dev

miIO.bleConnect

Clone this wiki locally