Using an old android phone as webcam

This question is a little bit out on the edge of this forum. I want to use an old android phone as camera on my octoprint server for 3d printing. The thing is:
I have a wifi-plug running the printer, some lights, and the octopi. When I turn on the plug, the printer and print server is ready to print. I have a simple rpi-cam, but I want to upgrade it, because the visuals are lousy. The pi-hq camera is expensive, and buying a dedicated webcam is also kinda lavish.

I don’t want to keep the camera on 24/7, and I want to have the option to turn it on and off remotely. Are there any ways to manage this? (other than making a servo setup to manually turn on and off the phone…) (I know this is silly! Bare with me :crazy_face:)

I’m using the IP WebCam App on an older Android phone for the 3D printer I’ve got in an enclosure in my workshop. I haven’t figured out how to have the app start automatically when the phone is powered on, but it works okay for the Octoprint plug-ins. It supports streaming video and grabbing still photos. I’d rather have something wired into the Pi than rely on wi-fi, but figuring that out hasn’t worked its way to the top of the to-do list yet.

1 Like

Yes, I have used a similar setup. Before I got the octoprint server, I used an internet wifi-switch to turn off the printer in case of spagetthi incident. I watched over it with a similar app as you mention.

Now I prefer octoprint with the telegram plugin, to monitor a big print when out of the hosue. The dream setup would be using an android phone, which is wired in a way you mention, so that it turned out automatically when powering the octopi. But I guess it’s far down on the list, as you say…

Sorry I don’t have any experience with PIs but I will follow this thread so I can learn what you find out :slight_smile:

1 Like

I have found a solution of sorts, but not in a way originally hoped for. I guess I could have disassembled the phone and connected a GPIO relay of some sorts to the power button, to turn it on from the octopi. Then I could tweak android to autostart the Webcam stream.

Buuut, life is too short to have time for all these silly ideas. I actually lack a proper webcam. The one in my laptop is below the screen and gives a terrible view of all my nose hairs…

So - now I have found an excuse to buy a new usb Webcam! When not home-officing, it can stay hooked up to the octopi, and deliver better print visuals - and when I need a proper camera that doesn’t reveal too many nose hairs - I have a great alternative.

But please let me know if any of you tries to hack their old phones for a similar situation!

So my question is why turn the phone off? It’s not like a phone pulls much power. I understand not keeping the camera on. But there must be a network start app out there that let’s you remotely start an app

I’m now looking into buying old laptop internal webcams (available as spare parts) which use USB interfaces and just plugging one into the Pi, thereby removing the need for the phone. Still not high on the priority list, but they’re small and cheap so I may get a couple to tinker with.

I wasn’t interested in hanging the bulk and weight of a whole standalone webcam off of the end of the Z axis to travel up and down with the print head, but with the small size, minimal weight, and negligible cost of some of the options on ebay I’m now considering having separate cameras to get both “focus on the nozzle” and “overall print bed” angles.

1 Like

I have used the raspberry pi camera on my octopi instances for a long time. I also have a 720p webcam that cost $25 a few years ago. The pi can handle a lot of different options. Any IP camera that runs on wifi or ethernet is going to give me privacy and security heartburn. Having an android phone would be ok, but seems like a lot of hassle.

I started down the Android phone path because I had several old ones sitting around in a drawer. It has proven to be, as my father used to say, the long way around Robin Hood’s barn to get this done.

Your idea is a good one. If I HAD to use an android phone, keeping it on would be the simplest way. The rest of the printer setup could be kept on a wifi relay control. But, as people are saying, the whole android approach is kinda over complicating things. I have a rpi camera, but I struggle with focus and image quality. I guess I should give it some more attention.

It just feels bad getting YET ANOTHER gadget that I not necessarily need. Therefore using old androids would be perfect, but the hassle is too rough.Old laptop webcams is not a bad idea!

I agree i think the laptop camera idea is the best (cheap) solution I have heard to date! @ttraband, let us know if you make any progress with it :slight_smile:

I did find this write-up a while back but didn’t see the benefit of rooting and busybox if I still had to run IP Webcam and have wi-fi on the android phone anyway.

Ouch… a little too messy for my taste. It doesn’t change much from the IP cam setup, as you mention.

I just got a Logitech C922. A great improvement for the video-meetings! I’m really happy I got it, it has actually bothered me quite a lot with the up-nose camera… both the low video quality, and the embarassing angle… When not in use, it’s hooked up to the octopi and gives great print view! I’m using motion, so techincally it’s an IP cam. I guess there should be ways to integrate in octoprint without needing to make a network stream out of it? I’ll chime in when I figure out.

Edit - it seems like motion takes up alot of CPU (50-70%) - but the load average (15mins) is only 0.40. Didn’t try with printing yet. Reading up, it seems like I should be using mjpg-streamer… scratching my head right now!

Edit - ha, embarassing. It seems like I messed up some configs, everything works right out of the box. I had the octopi.txt setup for raspi… everything works just fine, without motion. Phew!

1 Like