
Repurposing Old Smartphones for Home Automation - ashitlerferad
https://www.linux.com/news/repurposing-old-smartphones-home-automation
======
sudojudo
Though it's not on this level of sophistication, I'm using three old Android
phones as wireless security cameras. Anyone else doing the same?

The phones are running a free IP camera app, while in airplane mode, with WiFi
turned on. Then, I've got an old whitebox (PIII / 1GB RAM) running Lubuntu,
that monitors the feeds via Motion[1]. Everything is isolated on a subnet,
where WAN access is denied. If needed, it's easy to allow remote access to the
whitebox and/or camera feeds, automatic FTP uploads of captured data, and
email alerts.

It was unbelievably simple to set up, completely free, and it works like a
charm. The most difficult part was physically positioning the phones. You
could get fancy and use ZoneMinder, but Motion's footprint is tiny enough that
the old Lubuntu machine doesn't even break a sweat (7-12% CPU / 10% RAM total,
including the OS).

[1]
[http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome](http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome)

~~~
ekiara
Which android phones are you using? I'm guessing they can not be too old.

~~~
sudojudo
Two of them are circa 2012 Samsung SCH-S720C (1GHz CPU / 512MB RAM), running
Gingerbread. I don't want to pull the third one down to look, but it's a
little newer, maybe a Galaxy S3.

They're not nearly as old as the whitebox, but they're _old_ in smartphone
terms, and there are millions of them floating around that can be had for dirt
cheap. Mine are just phones that I upgraded from, they were doing nothing but
gathering dust.

------
nixusg
A couple months ago I setup an old Android phone to be a 3G hotspot for some
ESP8266 devices. It also created a SSH reverse tunnel so that I could access
the devices from the internet. After rooting the phone, compiling autossh &
nginx and getting the whole system setup, the phone broke. At this point it
was cheaper and way easier to just get a RasberryPi with a 3G dongle. So
unless you have lots of the same old phone lying around this can be a lot more
work than the alternatives. Using something like
[http://janos.io/](http://janos.io/) may have made things a bit easier but
device support was an issue.

~~~
brbsix
Getting a Dropbear or OpenSSH server set up on Android can be a mess. For a
super simple setup that "just works", you can just use a SSH server
application (e.g. Rooted SSH/SFTP Daemon [0]) and a ZeroTier virtual network
[1] so that you can access the devices from the Internet.

[0]:
[https://play.google.com/store/apps/details?id=web.oss.sshsft...](https://play.google.com/store/apps/details?id=web.oss.sshsftpDaemon)

[1]:
[https://play.google.com/store/apps/details?id=com.zerotier.o...](https://play.google.com/store/apps/details?id=com.zerotier.one)

------
beardicus
Related to repurposing an old smartphone, specifically a firefox OS phone, is
JanOS: [http://janos.io/](http://janos.io/)

Not really under active development, it seems, especially with FirefoxOS going
bye bye, but it basically boots you right into the browser, no cruft or
chrome, and puts you in "god mode" with access to everything possible through
Mozilla's special "web api" stuff. It's pretty neat, and fun, and really got
me jazzed about the idea of repurposing $30 phones to do cool stuff. You can't
even get a GSM radio for dev boards for $30, much less the screen, battery,
charging circuitry, accelerometer, etc.

Does anybody know of a stripped down android install that is similar? Maybe
scriptable with javascript or lua, basic browser-based display available?

~~~
dave2000
I suppose the obvious answer here is cyanogenmod.

------
cickpass_broken
This sort of repurposing is how I got the most use out of my Firefox phone
(Geeksphone Peak). There's a fork of FirefoxOS called JanOS[1] intended for
powering IoTs, which I came across before FirefoxOS pivoted.

I ended up keeping a footbag[2] ontop of the proximity sensor and when it was
removed, it would notify my office-mates (via slack) that it was time to stop
working and come play some footbag :) Source is on GitHub[3]

[1] [http://janos.io/about.html](http://janos.io/about.html)

[2]
[https://en.wikipedia.org/wiki/Footbag](https://en.wikipedia.org/wiki/Footbag)

[3] [https://github.com/staydecent/footbag-
os](https://github.com/staydecent/footbag-os)

------
reitanqild
This could be really useful.

A simple way to get started on Android can be "Automagic".

It lets you trigger actions based on events and conditions.

Events can be almost anything the phone can sense.

Actions can be almost anything the phone can do including sending requests
over http(s), mail or sms.

(Not affiliated, just like it.)

~~~
icebraining
Didn't know about Automagic, seems interesting. I use Tasker, but I find it a
pain to do any complex logic. The flowcharts in that app are probably much
easier to use.

~~~
reitanqild
Some of the reviews in the app store says they are from former tasker users,
so I guess you are right. I never really used tasker so I cannot say.

------
rememberlenny
This is brilliant. I turned my old iPhone 4 into a server to listen for my
Amazon Dash buttons.

~~~
pavel_lishin
Would you mind writing up how you did so? I've got a box of old cellphones
laying around, and at least two of them are old iphones.

~~~
pavel_lishin
Sort-of-edit: I knew that username sounded familiar! Hey Leonard!

------
yxlx
Direct link to talk, e.g. for mobile users:
[https://www.youtube.com/watch?v=4RWSXlai6PE](https://www.youtube.com/watch?v=4RWSXlai6PE)

------
fencepost
I'll also note that old phones with OLED screens make nice capable digital
clocks with streaming, etc. LCD screens aren't nearly as nice because you can
always see the backlight.

------
WordyMcWordface
Sounds cool, but I think you can achieve a lot of this with tasker.

