rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.73k stars 558 forks source link

Support for Xiaomi Aqara Camera (lumi.camera.aq1) #373

Open miguelangel-nubla opened 6 years ago

miguelangel-nubla commented 6 years ago

$ mirobo discover INFO:miio.discovery:Discovering devices with mDNS, press any key to quit... WARNING:miio.discovery:Found unsupported device lumi-camera-aq1_miio75547134._miio._udp.local. at 192.168.1.33, please report to developers

edit: copied over from #347: https://fr.gearbest.com/ip-cameras/pp_978606.html?wid=1433363

rytilahti commented 6 years ago

Can you tell us more about this device? Is it the same as the one mentioned in #347?

miguelangel-nubla commented 6 years ago

Yes, It is the same. Is a camera with functionality as a zigbee gateway.

How can I help, what do you need to know about it?

rytilahti commented 6 years ago

We need to obtain the commands the app is sending to the device. This guide can be helpful for doing that: https://github.com/aholstenson/miio/blob/master/docs/protocol.md . Can you try mirobo discover --handshake true to see if you get a token directly from the device? If yes, can you execute mirobo --ip <ip> --token <token> info and paste the results here?

miguelangel-nubla commented 6 years ago

Does not report the token this way, but I have it with the other methods.

mirobo discover --handshake true INFO:miio.device:Sending discovery to with timeout of 5s.. INFO:miio.device: IP 192.168.1.33 (ID: 0480****) - token: b'ffffffffffffffffffffffffffffffff'

Replaced credentials with #####.

user@LAPTOP:$ miiocli device --ip 192.168.1.33 --token ###################### info Model: lumi.camera.aq1 Hardware version: Linux Firmware version: 3.3.7_240 Network: {'localIp': '192.168.1.33', 'mask': '255.255.255.0', 'gw': '192.168.1.1'} AP: {'ssid': 'wifi######', 'rssi': -67, 'bssid': '44:FF:##:##:##:##'}

-> 10.42.0.178 data= {"id":4704,"method":"start_zigbee_join","params":[0]} <- 10.42.0.214 data= {"result":["ok"],"id":4704} -> 10.42.0.178 data= {"id":4705,"method":"start_zigbee_join","params":[30]} <- 10.42.0.214 data= {"result":["ok"],"id":4705} -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":4706,"method":"start_zigbee_join","params":[0]} <- 10.42.0.214 data= {"result":["ok"],"id":4706} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":8532,"method":"start_zigbee_join","params":[30]} <- 10.42.0.214 data= {"result":["ok"],"id":8532} user@LAPTOP: $ miio protocol json-dump --token 6d6b426e674a70746d59497941616769 cameraDump3.json user@LAPTOP: $ miio protocol json-dump --token 6d6b426e674a70746d59497941616769 cameraDump2.json -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A user@LAPTOP: $ miio protocol json-dump --token 6d6b426e674a70746d59497941616769 cameraDump.json -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":65001,"method":"get_ipcprop","params":["all"]} <- 10.42.0.214 data= {"p2p_id":"#################","app_type":"celing","offset_x":"0","offset_y":"0","offset_radius":"0","md_status":1,"video_state":1,"fullstop":0,"led_status":1,"ir_status":1,"mdsensitivity":6000000,"channel_id":0,"flip_state":0,"avID":"####","avPass":"####","id":65001} -> 10.42.0.178 data= {"id":3623,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":3623} -> 10.42.0.178 data= {"id":3624,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":3624} -> 10.42.0.178 data= {"id":3625,"method":"set_arming","params":["on"]} <- 10.42.0.214 data= {"result":["ok"],"id":3625} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":3626,"method":"set_arming","params":["off"]} <- 10.42.0.214 data= {"result":["ok"],"id":3626} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":3627,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":3627} -> 10.42.0.178 data= {"id":3628,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":3628} -> 10.42.0.178 data= {"id":65001,"method":"get_ipcprop","params":["video_state"]} <- 10.42.0.214 data= {"result":["on"],"id":65001} -> 10.42.0.178 data= {"id":6209,"method":"get_gateway_volume","params":[]} <- 10.42.0.214 data= {"result":[40],"id":6209} -> 10.42.0.178 data= {"id":6210,"method":"set_gateway_volume","params":[41]} <- 10.42.0.214 data= {"result":["ok"],"id":6210} -> 10.42.0.178 data= {"id":6211,"method":"set_gateway_volume","params":[65]} <- 10.42.0.214 data= {"result":["ok"],"id":6211} -> 10.42.0.178 data= {"id":6212,"method":"set_gateway_volume","params":[30]} <- 10.42.0.214 data= {"result":["ok"],"id":6212} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":3629,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":3629} -> 10.42.0.178 data= {"id":3630,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":3630} -> 10.42.0.178 data= {"id":65002,"method":"get_ipcprop","params":["video_state"]} <- 10.42.0.214 data= {"result":["on"],"id":65002} user@LAPTOP: $ miio protocol json-dump --token 6a4d6b48706f4d6353796153426f7333 cameraDump4.json -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":65001,"method":"get_ipcprop","params":["all"]} <- 10.42.0.214 data= {"p2p_id":"#####################","app_type":"celing","offset_x":"0","offset_y":"0","offset_radius":"0","md_status":1,"video_state":1,"fullstop":0,"led_status":1,"ir_status":1,"mdsensitivity":6000000,"channel_id":0,"flip_state":0,"avID":"#########","avPass":"############","id":65001} -> 10.42.0.178 data= {"id":2661,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":2661} -> 10.42.0.178 data= {"id":2662,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2662} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":2663,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":2663} -> 10.42.0.178 data= {"id":2664,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2664} -> 10.42.0.178 data= {"id":65001,"method":"get_ipcprop","params":["video_state"]} <- 10.42.0.214 data= {"result":["on"],"id":65001} -> 10.42.0.178 data= {"id":65002,"method":"set_video","params":["off"]} <- 10.42.0.214 data= {"result":["ok"],"id":65002} -> 10.42.0.178 data= {"id":65003,"method":"set_video","params":["on"]} <- 10.42.0.214 data= {"result":["ok"],"id":65003} -> 10.42.0.178 data= {"id":2665,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":2665} -> 10.42.0.178 data= {"id":2666,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2666} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":2667,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":2667} -> 10.42.0.178 data= {"id":2668,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2668} -> 10.42.0.178 data= {"id":65004,"method":"get_ipcprop","params":["video_state"]} <- 10.42.0.214 data= {"result":["on"],"id":65004} -> 10.42.0.178 data= {"id":2669,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2669} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":2670,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2670} -> 10.42.0.178 data= {"id":2671,"method":"get_alarming_volume","params":[]} <- 10.42.0.214 data= {"result":[90],"id":2671} -> 10.42.0.178 data= {"id":2672,"method":"get_device_prop","params":["lumi.0","alarm_time_len"]} <- 10.42.0.214 data= {"result":[30],"id":2672} -> 10.42.0.178 data= {"id":2673,"method":"get_music_info","params":[0]} <- 10.42.0.214 data= {"result":{"default":"0","total":10,"list":[{"index":0,"mid":"0","time":1},{"index":1,"mid":"1","time":1},{"index":2,"mid":"2","time":1},{"index":3,"mid":"3","time":1},{"index":4,"mid":"4","time":1},{"index":5,"mid":"5","time":1},{"index":6,"mid":"6","time":1},{"index":7,"mid":"7","time":1},{"index":8,"mid":"8","time":1},{"index":9,"mid":"9","time":1}]},"id":2673} -> 10.42.0.178 data= {"id":2674,"method":"get_alarming_volume","params":[]} <- 10.42.0.214 data= {"result":[90],"id":2674} -> 10.42.0.178 data= {"id":2675,"method":"get_music_info","params":[0]} <- 10.42.0.214 data= {"result":{"default":"0","total":10,"list":[{"index":0,"mid":"0","time":1},{"index":1,"mid":"1","time":1},{"index":2,"mid":"2","time":1},{"index":3,"mid":"3","time":1},{"index":4,"mid":"4","time":1},{"index":5,"mid":"5","time":1},{"index":6,"mid":"6","time":1},{"index":7,"mid":"7","time":1},{"index":8,"mid":"8","time":1},{"index":9,"mid":"9","time":1}]},"id":2675} -> 10.42.0.178 data= {"id":2676,"method":"set_default_music","params":[0,"1"]} <- 10.42.0.214 data= {"result":["ok"],"id":2676} -> 10.42.0.178 data= {"id":2677,"method":"play_music_new","params":["1",90]} <- 10.42.0.214 data= {"result":["ok"],"id":2677} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":2678,"method":"set_sound_playing","params":["off"]} <- 10.42.0.214 data= {"result":["ok"],"id":2678} -> 10.42.0.178 data= {"id":2679,"method":"get_alarming_volume","params":[]} <- 10.42.0.214 data= {"result":[90],"id":2679} -> 10.42.0.178 data= {"id":2680,"method":"get_device_prop","params":["lumi.0","alarm_time_len"]} <- 10.42.0.214 data= {"result":[30],"id":2680} -> 10.42.0.178 data= {"id":2681,"method":"get_music_info","params":[0]} <- 10.42.0.214 data= {"result":{"default":"1","total":10,"list":[{"index":0,"mid":"0","time":1},{"index":1,"mid":"1","time":1},{"index":2,"mid":"2","time":1},{"index":3,"mid":"3","time":1},{"index":4,"mid":"4","time":1},{"index":5,"mid":"5","time":1},{"index":6,"mid":"6","time":1},{"index":7,"mid":"7","time":1},{"index":8,"mid":"8","time":1},{"index":9,"mid":"9","time":1}]},"id":2681} -> 10.42.0.178 data= {"id":2682,"method":"set_alarming_volume","params":[27]} <- 10.42.0.214 data= {"result":["ok"],"id":2682} -> 10.42.0.178 data= {"id":2683,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2683} -> 10.42.0.178 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A -> 10.42.0.178 data= {"id":2684,"method":"get_arming","params":[]} <- 10.42.0.214 data= {"result":["off"],"id":2684} -> 10.42.0.178 data= {"id":2685,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2685} -> 10.42.0.178 data= {"id":2685,"method":"get_arm_wait_time","params":[]} <- 10.42.0.214 data= {"result":[0],"id":2685} -> 10.42.0.178 data= {"id":65005,"method":"get_ipcprop","params":["video_state"]} <- 10.42.0.214 data= {"result":["on"],"id":65005} -> 10.42.0.178 data= N/A <- 10.42.0.214 data= N/A

And on the plugin of MiHome app I can find:

.field public static final LUMI_CAMERA_GET_FULLSTOP:Ljava/lang/String; = “get_fullstop” .field public static final LUMI_CAMERA_GET_PROP:Ljava/lang/String; = “get_ipcprop” .field public static final LUMI_CAMERA_GET_SD_FORMAT:Ljava/lang/String; = “sdformat” .field public static final LUMI_CAMERA_GET_SD_STATUS:Ljava/lang/String; = “get_sdstatus” .field public static final LUMI_CAMERA_SET_FLIP:Ljava/lang/String; = “set_flip” .field public static final LUMI_CAMERA_SET_FULLSTOP:Ljava/lang/String; = “set_fullstop” .field public static final LUMI_CAMERA_SET_IR:Ljava/lang/String; = “set_ir” .field public static final LUMI_CAMERA_SET_LED:Ljava/lang/String; = “set_led” .field public static final LUMI_CAMERA_SET_MD:Ljava/lang/String; = “set_md” .field public static final LUMI_CAMERA_SET_VIDEO:Ljava/lang/String; = “set_video”

rytilahti commented 6 years ago

Ok, great. The API seems to be similar to that of the gateway device.

You could also try to see what kind of output you get when sending get_sdstatus and get_fullstop with raw_command to the device. I can wrap a preliminary implementation for testing, so any extra information you can extract and report back are appreciated.

rytilahti commented 6 years ago

I added a very preliminary support, there are open issues:

miguelangel-nubla commented 6 years ago

Every method pasted here is self-descriptive and works as expected. All the changes are verified from the app or manually checking them.

That is partially correct, this camera starts behaving different here.

$ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_device_prop "['lumi.0', 'device_list']" Running command raw_command Error: {'code': -5005, 'message': 'params error'}

So I currently don't know how to get the device list for the gateway part. I don't know if it is even implemented, or directly speaks to xiaomi servers without a way to poll them directly via this API like the previous gateways.

Sure do, 1 on success beginning format.

$ miiocli device --ip 192.168.1.33 --token ######################## raw_command sdformat Running command raw_command 1

Without sd card inserted:

$ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_sdstatus Running command raw_command 0

SD card needs format:

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_sdstatus Running command raw_command 2

While formatting SD card:

$ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_sdstatus Running command raw_command 3

SD card ok, the app reports "good"

$ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_sdstatus Running command raw_command 1

Also have "arming" state

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_arming Running command raw_command ['oning'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_arming Running command raw_command ['on'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_arming '["off"]' Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_arming Running command raw_command ['off']

Arm delay seconds

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_arm_wait_time Running command raw_command [0] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_arm_wait_time '["5"]' Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_arm_wait_time Running command raw_command [5]

Volume is 0 to 100, but accepts and reports bigger values whithout problem (bug)

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_alarming_volume 100 Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_alarming_volume 10 Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_alarming_volume 30 Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_alarming_volume 200 Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_alarming_volume Running command raw_command [200] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_alarming_volume 20 Running command raw_command ['ok']

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_music_info '[0]' Running command raw_command {'default': '1', 'total': 10, 'list': [{'index': 0, 'mid': '0', 'time': 1}, {'index': 1, 'mid': '1', 'time': 1}, {'index': 2, 'mid': '2', 'time': 1}, {'index': 3, 'mid': '3', 'time': 1}, {'index': 4, 'mid': '4', 'time': 1}, {'index': 5, 'mid': '5', 'time': 1}, {'index': 6, 'mid': '6', 'time': 1}, {'index': 7, 'mid': '7', 'time': 1}, {'index': 8, 'mid': '8', 'time': 1}, {'index': 9, 'mid': '9', 'time': 1}]}

Play the sound directly. First param is the mid value from one item of the previous list (sound ID), second volume at which to play it.

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command play_music_new '["1", 30]' Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command play_music_new '["3", 30]' Running command raw_command ['ok']

The first param 0 seems to be the type of sound setting, for now only found id 0 wich is the alarm sound setting. Returns a 'defaut' value wich is the sound id for the sound setting, in this case the alarm is set to sound ID 1.

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_music_info '[0]' Running command raw_command {'default': '1', 'total': 10, 'list': [{'index': 0, 'mid': '0', 'time': 1}, {'index': 1, 'mid': '1', 'time': 1}, {'index': 2, 'mid': '2', 'time': 1}, {'index': 3, 'mid': '3', 'time': 1}, {'index': 4, 'mid': '4', 'time': 1}, {'index': 5, 'mid': '5', 'time': 1}, {'index': 6, 'mid': '6', 'time': 1}, {'index': 7, 'mid': '7', 'time': 1}, {'index': 8, 'mid': '8', 'time': 1}, {'index': 9, 'mid': '9', 'time': 1}]}

Change alarm

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_default_music '[0, "3"]' Running command raw_command ['ok']

Reports back

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_music_info '[0]' Running command raw_command {'default': '3', 'total': 10, 'list': [{'index': 0, 'mid': '0', 'time': 1}, {'index': 1, 'mid': '1', 'time': 1}, {'index': 2, 'mid': '2', 'time': 1}, {'index': 3, 'mid': '3', 'time': 1}, {'index': 4, 'mid': '4', 'time': 1}, {'index': 5, 'mid': '5', 'time': 1}, {'index': 6, 'mid': '6', 'time': 1}, {'index': 7, 'mid': '7', 'time': 1}, {'index': 8, 'mid': '8', 'time': 1}, {'index': 9, 'mid': '9', 'time': 1}]}

Sensitivity set from the app allows high (6000000), medium(10000000), low(11000000), but can set any value. Don't know the unit.

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_mdsensitivity Running command raw_command ['6000000'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_mdsensitivity Running command raw_command ['10000000'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_mdsensitivity Running command raw_command ['11000000'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_mdsensitivity 362346 Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_mdsensitivity Running command raw_command ['362346']

set_video toogles sleep mode Turns off the video completelly. No video feed or motion alarm. Even infrared night light is disabled.

user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_ipcprop '["all"]' Running command raw_command {'p2p_id': '####################', 'app_type': 'celing', 'offset_x': '0', 'offset_y': '0', 'offset_radius': '0', 'md_status': 0, 'video_state': 1, 'fullstop': 1103029089, 'led_status': 0, 'ir_status': 1, 'mdsensitivity': 63454, 'channel_id': 0, 'flip_state': 0, 'avID': '#########', 'avPass': '#########', 'id': 1} user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_video '["off"]' Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_ipcprop '["all"]' Running command raw_command {'p2p_id': '####################', 'app_type': 'celing', 'offset_x': '0', 'offset_y': '0', 'offset_radius': '0', 'md_status': 0, 'video_state': 0, 'fullstop': 1103029089, 'led_status': 0, 'ir_status': 1, 'mdsensitivity': 63454, 'channel_id': 0, 'flip_state': 0, 'avID': '#########', 'avPass': '#########', 'id': 1} user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command set_video '["on"]' Running command raw_command ['ok'] user@LAPTOP: $ miiocli device --ip 192.168.1.33 --token ######################## raw_command get_ipcprop '["all"]' Running command raw_command {'p2p_id': '####################', 'app_type': 'celing', 'offset_x': '0', 'offset_y': '0', 'offset_radius': '0', 'md_status': 0, 'video_state': 1, 'fullstop': 1103029089, 'led_status': 0, 'ir_status': 1, 'mdsensitivity': 63454, 'channel_id': 0, 'flip_state': 0, 'avID': '#########', 'avPass': '#########', 'id': 1}

rytilahti commented 6 years ago

Thanks for a comprehensive feedback, I updated the PR based on that information. I think the main thing missing now is to figure out how the video&audio can be accessed. If you don't mind testing the PR, it would be helpful (please comment your findings in the PR, so it is easier to correct them).

sendorm commented 6 years ago

There is a solution to video playback here: https://github.com/miguelangel-nubla/videoP2Proxy

humpedli commented 6 years ago

@sendorm Great! Thank you, I just tried out the linked solution and it worked. I made a docker container for the script if anyone would like to run it in docker: https://github.com/humpedli/docker-xiaomi-aqara-rtsp

dgiese commented 5 years ago

I need to communicate better, see slide 33-38 here: http://dgiese.scripts.mit.edu/talks/DEFCON26/DEFCON26-Having_fun_with_IoT-Xiaomi.html If you have installed the firmware update, I will have some news on Twitter soon. In addition to that I will push a commit to the dustcloud-documentation repo in the next days. It will also contain the exact rooting methods.

sendorm commented 5 years ago

@miguelangel-nubla's great work ceased to work after lumi.camera.aq1 3.3.7_248.0143 firmware update.

penolove commented 2 years ago

sorry to bother, curious about the speaker mentioned above

The camera has a speaker, right? (those music parts)
Yes, same functionality as a gateway, radio, alarm and 2 way audio communication from the video feed.
2 way audio also over TUTK protocol.

is it possible to make the camera play a prepared mp3 via a function call?