- Is this compatible with my camera?
This controller works with the MJSXJ02CM camera:
- Get a shell
Install these mods to get a shell from within your camera:
https://github.com/telmomarques/xiaomi-360-1080p-hacks
- Install the toolchain
$ sudo apt-get install gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabi clang
$ curl https://sh.rustup.rs -sSf | sh
$ rustup toolchain install stable
- Clone the repository
$ git clone https://github.com/aslafy-z/xiaomi-1080-360-motor-control.git
- Kitchen is ready
$ make
make run -- ptz move pan forward 10
export MIJIA_LIB_PATH=$(pwd)/mocks
./control-debug ptz move pan forward 10
- Build release binary
make release
export MIJIA_LIB_PATH=/mnt/data/lib
./control ptz calibrate
./control ptz move pan forward 10
./control ptz up 10
./control ptz right 5
./control ptz save 1
./control ptz set 1 1
./control ptz restore 1
./control server --listen 0.0.0.0:8888
curl http:https://0.0.0.0:8888/ptz/move/pan/forward/10
curl http:https://0.0.0.0:8888/ptz/set/1/10
curl http:https://0.0.0.0:8888/ptz/set/1/10
Big thanks to all the involved people: