.comment-link {margin-left:.6em;}

tolerate everything in moderation

Wednesday, January 05, 2022

MotionPi in the sky

Years ago I bought an Arduino project kit when Kieran was little.  I thought it might interest him.  I still have it and I made 1 project with it and showed him how to write code to make it work.  It was this project to make a motorized pinwheel.

He said to me. 

Papa, the stuff you just did on the computer.  I don't care about.  I was only interested in pushing that button that made the thing spin.

I just looked at him and smiled.  I think I did a few other Arduino starter projects, but I quickly lost interest cuz it wasn't something useful to me. 


So earlier this year from chatting with buddies who made raspberryPi (rPi) projects like old retro gaming projects for his little kids (I think he made it for himself though).  I may do this too for fun.  Or not since we have Nintendo switch.  But it lives in Kieran's room somewhere.

MotionEye
But the first rPi project was the pi-hole project to get rid of all the ads that every friggin site on the InterWeb has that redirects you to other sites and collects all your clicks and who knows what else.  In any case I got tired of it slowing down the site loading.  And it's been handy.  Now others are asking me what to do to set one up.  I do have to disable it from time to time when I'm shopping for something.  It even sometimes blocks me from posting reviews.  But I disable for 30s so I can click on a google search item and let it do what it was meant to do again.  The only thing it doesn't block are those YouTube ads.  Those are embedded into the video stream so it doesn't work.

pi-zero-2-w

So motionEye is another project that does motion detection via a web cam.  It's not a new project and has been around for at least 5-7yrs and the question for me was how was it compared to ones that are available out of the box like Google Nest, Ring, Amazon, Wyze, Eufy, Swann, etc.  There's lots.

Sony 8MP NoIR
I have seen the video from Google's Nest door bell cam and it is amazing in terms of resolution and it also has sound.  Even the night video is amazingly clear.  It must have an IR light on it to get the night quality to be so clear.

However, for all of these products they require you to pay a subscription fee per year to get video recordings.  But it goes to a cloud site and who knows what happens to that data.  Some give you video stream and notification but no recordings.

The MotionEye project provides, motion detection, video stream, recording (even TTLs on how long to keep the files - forever is an option), notification with images, even a web interface.  What's cool is that MotionEye will add a shortcut to itself so you can see who's at the front door if you hear a knock.  It is quite neat.

cheese!
The hardware is a Pi-zero-2-W and a Sony 8MP NOIR camera.  The newer pi-zero-2-W is not compatible with the MotionEye OS images currently available.  I didn't know this before I ordered the stuff.  It was only after I went through the setup that I noticed it was not booting up.  After googling I found a thread with someone trying a few months back to get it working on the exact same rPi board and got an image working and uploaded an image with a link.  Thanks buddy for that...  The original maintainer of this project was no longer doing ports to newer boards.  I just assumed the newer board would work since it was still a Pi-Zero-W.  But apparently not.

knock, knock!
I downloaded the source code so I can maybe have a look and understand the changes.  Worth a try.  Hopefully it's not in some obscure language like Scala.  Don't get me started on that.  Very hard to read and understand.  Code looks pretty, but incredibly difficult to follow and understand how it actually works.  So much is hidden or obfuscated.  Unless. you know where to look.  You won't know.  Like why do it this way?

In any case enough of that.  I finally decided to try this out to see if a security cam was something that would be of use for us.  First use case is we have a very old door.  Original to the house and it's solid wood.  And often I hear our knocker when someone is there or light knocking that I barely hear.  

Who's there?
And lately we have had marketers coming asking for donations for hospitals, underprivileged kids in some foreign country.  Just $1 a loonie a day.  I am not a scrooge, but my response is always the same.  I give to my church because it helps those that in need and are local.  I want to help and improve the local area first before I venture to help save the world.  Then they usually say, how generous and then add, how about signing up then.  Then I say... nice try, but still can't.

The other thing is.  There was the whole Salvation Army thing where the top management was taking 75% of the money being donated.  So who is it really benefiting?

It's Kevin the cat
So this MotionPi was so I could look on my phone, tablet, whatever and see who was knocking on my door.  Was it CanadaPost, Fedex, UPS, or Amazon?  Then I'm heading down to open the door to collect my stuff!

If was a neighbour, I'll decide if I was expecting them or not and I'll contact them later to see what they needed.  The thing is, neighbours don't know you are working from home, they just know you are home.  So if I was at work, this wouldn't happen.  But then again, I am at work and I have work to do.

purrrrr...
And if it was some marketing thing or someone who wanted to talk about the bible scriptures. Then I'm not opening my door at all and wasting my time that I'd rather watch TV or Netflix.  If you haven't watched Click Bait, do yourself a favour an go check it out.

But if it's Kevin.  Then I'll go get a bowl of milk.

And he can come in and warm up and have a nap.