Gateway + Motion

Started by Dave, January 06, 2016, 12:31:00 PM

Dave

Hi Felix,

First of all, let me say thanks for all the hard work on developing Moteino, it has been really fun to create fun automation projects around my house.

I was able to setup the Gateway on my Raspberry Pi 2 and it works perfectly. What I would like to do is use the Raspberry Pi 2 also as a motion detector by using the camera module connected to the CSI port. I followed these steps:

https://programmingpraxis.files.wordpress.com/2015/01/securitycamera.pdf

The installation goes fine with no errors, but I noticed that when I make the following change in the /etc/default/motion file (I set start_motion_daemon=yes) and then reboot the Raspberry Pi, when I connect to the Gateway url it remains stuck on the "waiting on socket connection" page. If I manually turn off the motion (sudo /etc/init.d/motion stop) and refresh the Gateway url, the page loads fine and I see my nodes again on the GUI.

I made a workaround by adding these commands in the /etc/rc.local file:

sudo motion stop
sudo motion start

It worked a few times so I ultimately had motion enabled and the gateway GUI working, but other times the gateway GUI was "waiting for socket connection", so I don't think this is a good solution.

Would you have any pointers?

Thanks,

David


Felix

Hi David, thanks for your feedback, glad to hear you find my gateway software useful.
My guess is motion sets up a webserver that overrides the port 80 or 443. Maybe you can configure Motion to use other ports?
Or perhaps you could configure nginx to run at ports that don't conflict with Motion.
Would it be more appropriate to move any camera/motion on a different Pi altogether to avoid 1.conflicts 2.performance loss?