Skip to content

aslafy-z/xiaomi-1080-360-motor-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xiaomi-1080-360-motor-control

Developement

  1. Is this compatible with my camera?

This controller works with the MJSXJ02CM camera:

MJSXJ02CM camera

  1. Get a shell

Install these mods to get a shell from within your camera:
https://github.com/telmomarques/xiaomi-360-1080p-hacks

  1. 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
  1. Clone the repository
 $ git clone https://github.com/aslafy-z/xiaomi-1080-360-motor-control.git
  1. Kitchen is ready
 $ make
make run -- ptz move pan forward 10
export MIJIA_LIB_PATH=$(pwd)/mocks
./control-debug ptz move pan forward 10
  1. Build release binary
make release

Usage

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://0.0.0.0:8888/ptz/move/pan/forward/10
curl http://0.0.0.0:8888/ptz/set/1/10
curl http://0.0.0.0:8888/ptz/set/1/10

Credits

Big thanks to all the involved people: