Giter Club home page Giter Club logo

Comments (18)

aholstenson avatar aholstenson commented on August 14, 2024

To help with figuring out the mapping you can install the latest miio CLI via npm install -g miio and call the above command on your gateway with: miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'.

This should return a flat array with the devices. Each device seems to have 5 entries:

  • The first index is the identifier of the subdevice and matches the Developer API
  • The second index seems to be the type of device. I need help figuring these out as I don't have access to all devices.
  • The rest is three numbers that I have no idea what they could stand for

You can compare that output to the output of miio --discover and see if you can find the type ids of your devices.

The types I know of right now:

1 - lumi.switch
8 - lumi.cube
10 - lumi.sensor_ht

from miio.

fxdpz avatar fxdpz commented on August 14, 2024

FYI:

root@rpb1:pi# miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'
INFO Attempting to control lumi.gateway.v3

INFO Got result:
[
"lumi.158d00015xxxxx", //Model info: lumi.sensor_ht (sensor)
10,
1,
0,
2,
"lumi.158d00015xxxxx", //Model info: lumi.motion (motion)
2,
1,
0,
11,
"lumi.158d00014xxxxx", //Model info: lumi.ctrl_neutral1 (power-switch)
9,
1,
18,
1,
"lumi.158d00015xxxxx", //Model info: lumi.sensor_ht (sensor)
10,
1,
0,
2
]

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

@fxdpz Thanks!

from miio.

sangkooki avatar sangkooki commented on August 14, 2024

I installed miio 0.12.0 version.
But log is

/var/lib/homebridge $ miio --control lumi.gateway.v3 --method get_device_prop --params '["lumi.0","device_list"]'
INFO Attempting to control lumi.gateway.v3

WARNING Could not find device

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

@sankooki My mistake, that command works for the 3rd gen gateway, you might have the one called lumi.gateway.v2 instead. Try adjusting the command to: miio --control lumi.gateway.v2 --method get_device_prop --params '["lumi.0","device_list"]'

If that doesn't work you can run miio --discover to find the address of your device and replace the model name in the command with the address of your gateway.

from miio.

sangkooki avatar sangkooki commented on August 14, 2024

I have a gateway.v3(mijia version). but

Device ID: 52231412
Model info: Unknown
Address: 10.0.1.11 // gateway v3 ip
Token: 71761b2e28df3afaa4da62eefad5a209 via auto-token
Support: Unknown

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

@sankooki Alright, I've been depending on hostname lookup to figure out the model of the device but I realize now that it might fail more often than I would've hoped. I've added a new issue in #27 to implement a fix for that.

Does using --control with the IP work for listing your devices?

from miio.

sangkooki avatar sangkooki commented on August 14, 2024

/var/lib/homebridge $ miio --control 10.0.1.11 --method get_device_prop --params '["lumi.0","device_list"]'
INFO Attempting to control 10.0.1.11

INFO Got result:
[
"lumi.158d0000efec7e", // switch
1,
1,
0,
10,
"lumi.158d0000f6fcda", // motion
2,
1,
0,
10,
"lumi.158d0000e75d33", //door
3,
1,
0,
10,
"lumi.158d0001104c5a", // zigbee plug
11,
1,
22,
1,
"lumi.0",
0,
0,
0,
0
]

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

@sankooki Thanks! Interesting to see that your gateway lists lumi.0 as a device, I would not have expected that.

The last device, the one with id lumi.158d0001104c5a what kind of device is that? It has an id I haven't seen before.

from miio.

sangkooki avatar sangkooki commented on August 14, 2024

that's zigbee plug.

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

@sankooki Thanks for your help! I've updated the type listing to include it.

from miio.

sangkooki avatar sangkooki commented on August 14, 2024

I'm pleasured.

from miio.

Gromina avatar Gromina commented on August 14, 2024

I wonder why gateway's model and support are shown as Unknown.
The device names itself as "lumi-gateway-v3_miio....." (hostname)

Hope my dump will help you somehow:

`[1] % miio --control 192.168.88.70 --method get_device_prop --params '["lumi.0","device_list"]'
INFO Attempting to control 192.168.88.70

INFO Got result:
[
"lumi.158d0000e87e4a",
10,
1,
0,
1,
"lumi.158d0001032fdf",
2,
1,
0,
10,
"lumi.158d0000f8614b",
3,
1,
0,
10,
"lumi.158d0001118dbd",
8,
1,
0,
3
]`

% miio --discover

`Device ID: 45835427
Model info: Unknown
Address: 192.168.88.70
Token: xxxxxxxxxxxxxxxx via auto-token
Support: Unknown

Device ID: 158d0000e87e4a
Model info: lumi.sensor_ht (sensor)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic

Device ID: 158d0001032fdf
Model info: lumi.motion (motion)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic

Device ID: 158d0000f8614b
Model info: lumi.magnet (magnet)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic

Device ID: 158d0001118dbd
Model info: lumi.cube (controller)
Address: Owned by 45835427
Token: Automatic via parent device
Support: At least basic`

from miio.

Gromina avatar Gromina commented on August 14, 2024

Oh, is it the same issue with host lookup? Didn't see that other issue

from miio.

aholstenson avatar aholstenson commented on August 14, 2024

@Gromina Looks like the same issue, going to look into that issue in the next few days and see what I can do about it.

from miio.

imReker avatar imReker commented on August 14, 2024

52: lumi.motion.aq2 Aqara light and motion sensor
12: lumi.86sw2 Aqara 86 model duplex button switch

More devices on the way, will update tomorrow or later

from miio.

pentiumd2015 avatar pentiumd2015 commented on August 14, 2024

Hi, i need help. How can i set prop value for subdevice of gateway ? get_device_prop_exp - OK, but how send command to subdevice ?

from miio.

pipisco avatar pipisco commented on August 14, 2024

Hi, i need help. How can i set prop value for subdevice of gateway ? get_device_prop_exp - OK, but how send command to subdevice ?

Where did you find the options for subdevices? Could you show me?

{"result":{"life":98676,"cfg_time":0,"token":"0d570a3591ce4a5a4e460c903af21b20","mac":"04:CF:8C:A0:F2:A7","fw_ver":"1.4.1_170","hw_ver":"MW300","uid":4166460975,"model":"lumi.gateway.v3","mcu_fw_ver":"0143","wifi_fw_ver":"SD878x-14.76.36.p84-702.1.0-WM","ap":{"rssi":-38,"ssid":"omprslow","bssid":"68:FF:7B:6A:24:2D"},"netif":{"localIp":"192.168.0.103","mask":"255.255.255.0","gw":"192.168.0.1","gw_mac":"68:FF:7B:6A:24:2D"},"mmfree":172304,"ot":"otu","otu_stat":[243,190,1710,139,1471,17],"ott_stat":[10, 0, 21, 218]},"id":1030}

My subdevices

{"result":["lumi.158d00033b117e",11,0,0,1,"lumi.158d000325e853",2,1,0,11,"lumi.158d00031e7d4d",3,1,0,10,"lumi.158d00036ccf70",1,1,0,10],"id":1000}

There is no way to get even status parameters.

'{"id":1000,"method":"get_device_prop_exp","params":[["lumi.158d000325e853","status"]]}'

null resault, like to

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

Thanks a lot!

from miio.

Related Issues (20)

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.