+1 for camera first of all
+1. Would be great if we could get this implemented into home assistant.
Do you have connect this camera to HA?
oh no, i have two of these cameras, is there any future update coming to integrate the camera and gateway?
Almost same here, but I have only one. The worst is that I canāt even use it on motioneye (at least i couldnāt figure out how).
Did anyone else have issues getting this camera to connectā¦ at all?
Iāve got the Mi Home app, but I canāt find the camera to add it. I see the open wireless access point when I look in the Android settings, but no matter what I do, I canāt get it to add, even though the red light is blinking at the top of the camera.
Please check if you have Mainland China in your app settings.
Hello guys.
I bought Aqara camera hub with gateway like this, https://www.gearbest.com/ip-cameras/pp_978606.html?wid=1433363
When I discovered hidden options I tried to enable lumi mode and it is not possible to save the configuration. I have reached ārequest time outā. Is there anyone knows how to connect it to hass ?
Yep, definitely Mainland China, as I had to do that to set up the gateway (the non-camera Zigbee gateway).
Iām currently pawing through the decompiled APK to try and see how to manually connect it. Port 23 (telnet) is open on the device, so Iām thinking thatās the key to setting this up without needing the app.
The telnet port is open in original firmware ? Good to hear that If it could be possible to set lumi mode and key by telnet. I will check it this week.
What about UART-Serial connection ? anyone tries ?
btw. Do you have any spacial character in name or password in WiFi configuration ?
Are you using 2,4 GHz ? because 5GHz is not supported
Nope, 2.4GHz network. Password has an exclamation point in it, but the Mi Home app never gets to the point where I can pick which WiFi network I want, let alone to the point where I can put my WiFi network password in.
And I think itās the camera which has that port open. I just ran nmap 192.168.1.1 192.168.1.254
to scan the whole subnet, and that port on 192.168.1.1 was the only thing that was returned. I put in my Linux username and password to ensure I wasnāt accidentally connecting to my own device, but it didnāt accept it, so I assume thatās the camera.
I scoured through the APK to try and find the password, but couldnāt find much. When I have a moment I might try and find the firmware file and run it through strings or binwalk or something to see if itās in there. I also tried hooking up my monitor-mode enabled WiFi dongle and capturing some Wireshark packets, but that yielded me nothing of use.
I dont knows if it matters but tryb enabling bluetooth in phone - this camera has it build inne and maybe mi home os searching cam via btā¦
192.168.1.1 od most probably your router.
Bluetooth is always switched on (I have a Pebble smartwatch), so it wasnāt that. And I was connected directly to the cameraās WiFi access point, so it couldnāt have been the router, because the cameraās not connected to the home WiFi yet. Wireshark shows my phone asking who has 192.168.1.1 and telling it to report that to 192.168.1.81, which has no open ports and canāt be pinged.
In any case, Iāve posted my question over on their forums. Not sure if Iāll get an answer, but worth a shot.
Hmmmā¦
If i rememember correctly I connected phone to my home wi-fi when i was adding camera to mi home then searched cam. I was not connecting to camera wifi manually at any point.
One more thing - i would disconnect with pebble just to be sure it isnāt the problem.
Do you know what is telnet login and password ?
I originally tried connecting via my home WiFi (on both the 2.4ghz and 5ghz connections), but got nothing, so I tried the access point itself, just to rule it out.
I also disconnected my Pebble and tried again, but it made no difference. I thought that would have been the case, as the camera is WiFi, not Bluetooth.
Iām still pawing through the APK, looking for the location of a firmware file so I can try and work out what the telnet password is, but nothing yet.
Okay, so I got the camera set up in Mi Home. It took a dozen or more tries, but I got it. The next step is to get the camera to appear in Home Assistant. Hereās a dump of things I know, stuff Iāve tried etc.:
- The device has two open ports, and several filtered ports (according to a thorough nmap scan I ran). These ports are:
- 23/tcp open telnet
- 652/tcp filtered hello-port
- 8359/tcp filtered unknown
- 9802/tcp filtered unknown
- 9803/tcp filtered unknown
- 10774/tcp filtered unknown
- 15764/tcp filtered unknown
- 20251/tcp filtered unknown
- 22851/tcp filtered unknown
- 25731/tcp filtered unknown
- 37506/tcp filtered unknown
- 38318/tcp filtered unknown
- 53796/tcp filtered unknown
- 54180/tcp filtered unknown
- 54355/tcp open unknown
- 57775/tcp filtered unknown
- 62497/tcp filtered unknown
- 62775/tcp filtered unknown
- 54355 instantly closes HTTP connections, so I donāt know whatās itās for.
- I believe, like some of the other Xiaomi cameras (Xiaofang etc.), itās running Linux. I havenāt tried looking at the micro-SD card slot yet, and I havenāt pulled the device apart. Those are outside of my expertise.
- I donāt know the telnet username and password. Itās not in the APK and I canāt seem to find a URL for the firmware file. Running
file
,strings
andbinwalk
on a Xiaofang firmware file suggests that it might be encrypted, because none of those utils returned anything useful. - I canāt turn on ādeveloper modeā on the camera. I can get to the menu item by tapping the firmware version number, but the middle menu item does nothing. Going into the bottom option and hitting the left-hand button takes me to the tickbox where I can enable it and generate a password, but clicking Confirm does nothing.
- The camera can definitely work without the internet, I opened the camera in Mi Home on my phone, then disconnected the phone line from my modem (cutting off my internet connection entirely). I could still see the live image, take photos, use push-to-talk and such.
- I tried five different apps to try and work out what the local port / URL / whatever is: Wireshark in monitor mode, Charles Proxy for Windows,
cat /proc/net/tcp
in an Android terminal, a traffic sniffing app, and an app that shows all open connections on your phone. None of them showed local connections, so I must be doing something wrong here?
Someone with a rooted phone might be of some use here. They could poke around where Mi Home stores itās settings and look through there for some connection info.
EDIT: I think it might use UDP, using one or more of these ports: 54321, 55254, 43921, 40636. Trying to open a UDP stream in VLC does nothing (takes a while to time out) so Iāll keep looking.
EDIT 2: The stream is H.264 (based on running adb logcat
from my Windows machine), but it may be encrypted, as thereās mention of hencrypt and hdecrypt in the logs? The APK doesnāt mention anything about encryption. Also logcat
tells me that trying to turn on the ādeveloper modeā times out, but doesnāt tell me much more
Has anyone got a rooted device and a little bit of technical know-how? Iām wondering if thereās a database file created by Mi Home that stores encryption keys or connection info or something
Watching this with interest I have 7 of these bad boys that I would love to integrate.
Is it possible to use token from MiHome app instead of lumi mode and password ? What do you think ?