cck56 / mijia-720p-ctrl

The code controls the pan/tilt motors of Mijia 720p 360 degree version
23 stars 9 forks source link

nice project but how to run it ? #1

Closed max5962 closed 4 years ago

max5962 commented 6 years ago

Is it possible to explain how to run it ?

max5962 commented 6 years ago

./mijia_ctl

pwm dev open failed pwm init failed

how to resolv the issue ? :) thnaks

max5962 commented 6 years ago

now i had : ircut init failed :(

cck56 commented 6 years ago

You can try kill the miio processes before running the executable.

killall restartd
killall miio_avstreamer
killall miot_devicekit
max5962 commented 6 years ago

seems working but breaks this hacks : https://github.com/ghoost82/mijia-720p-hack/blob/master/README.md

how to run the two project ? thnaks

shexbeer commented 6 years ago
# killall restartd
killall: restartd: no process killed
# killall miio_avstreamer
killall: miio_avstreamer: no process killed
# killall miot_devicekit
killall: miot_devicekit: no process killed
# ./mijia_ctrl
ircut init failed

I also use ghoost82 mijia 720p hack. Has anybody got a solution?

ghoost82 commented 6 years ago

If you get the ircut init failed error the gpio pins 14 and 15 are not enabled. This can be fixed with

echo "14" > /sys/class/gpio/export
echo "15" > /sys/class/gpio/export

Currently I also get the pwm init failed error, not sure why, the device file /dev/ftpwmtmr010 exists and should not be used by any Mijiao services as they are all disabled.

ghoost82 commented 6 years ago

Hi,

OK I had some time too test this a little bit more. First I identified what prevent pwm to init. It was ir_sample that was running on my cam to auto toggle the night vision. I also modified the code a little bit to catch some init errors and if there are still something left that could not be initialized it will only disabled the commands that are not working without it. I will do a PR with the changes today.

hrch3k commented 6 years ago

Can someone give some some advice on how to access motor control. I have similar IP cam based on GM8135s i can control IR with this mod, but cant access the motor. /dev/motor not found. I have np_motor_t.ko on my IP camera. Tried to edit the code of mijia_ctrl with np_motor_t.ko. No initialization error, but after sending MOVE comand, motor does not move.

sunflowerABB commented 5 years ago

Can someone give some some advice on how to access motor control. I have similar IP cam based on GM8135s i can control IR with this mod, but cant access the motor. /dev/motor not found. I have np_motor_t.ko on my IP camera. Tried to edit the code of mijia_ctrl with np_motor_t.ko. No initialization error, but after sending MOVE comand, motor does not move.

See https://github.com/ghoost82/mijia-720p-hack/issues/3