Random strange shed project. Day 4


OK, a quick update on this geeky shed insanity then. Basically, I grabbed an old solar charger and wanted to know if there was enough daylight coming through my shed window to keep an Android phone alive constantly. I’ve detailed the various stages in Day 1, Day 2 and Day 3.

The news so far is good. Head to the very bottom for the live stats and a live picture now too. The phone, as you can see from my my quick and dirty logging page, is working well and remains alive even on dull and rainy days. Behind the scenes, for the purposes of showing you all this, I have used a script on the Coolsmartphone server to poll my home broadband connection, get details of the battery, the amount of light and to see if the web server is running. In practice, if you wanted to do this, you wouldn’t need a separate server.


So, I’ve installed this PHP / MySQL / Web server app onto the phone and then I installed WordPress. It’s a relatively simple task and it’s working surprisingly well. If you’ve got a fast phone with, say, a couple of GB of RAM, it performs without issue and is a great way to run a personal web server for your family and friends. Above is how it looks when I browse to it.

But wait, how do you get that online? Well, you could buy a domain and point it to the IP address of your home broadband connection. However, your home ADSL / fibre connection is sometimes going to be given a new IP address when you reboot, and your website then won’t resolve. The best thing, for a small-scale setup, is to use a Dynamic DNS provider like ChangeIP, DNSdynamic, DNSexit, DNSMadeEasy, DNS-O-Matic, DNSPark, DynDNS or one of the many others . Then you can give out something like myhome.publicvm.com (as given by DNSExit.com) and people can browse to it. Your phone / shed server, with the aid of apps like Dynamic DNS Updater, can keep services like this updated as your external IP address moves. Clever.

You’ll also need to do some network address translation. This is so that traffic routes through properly to your shed phone. If someone out there on the internet places a request for a website on port 80, it’s going to hit your broadband router first (once you’ve done all the Dynamic DNS stuff) and your router is going to just kill the request dead. It won’t know what to do with a request on port 80, so you need to setup a NAT rule within your router. I wrote about how to do this back in 2016 when the original “Running a website from your phone” piece went live. Basically it’s a matter of telling your router where to send those requests, and in my case I’ve sent it to a new port internally (port 8080 inside) and a new IP address (my “Shed Phone” is on 192.168.0.200 inside my home). Once you’ve done that, you can browse to myhome.publicvm.com from anywhere and see your website. You can even update it via the WordPress installation, upload images and do everything that I’m doing right now on the “big” Coolsmartphone server.

So, back to my status update. If this was you, at home, and you were doing this right now, you could use the REST API app that I detailed earlier (see the links in Day 1, Day 2 and Day 3) to get a picture from the camera on your smartphone. You can get a live picture, even a video. Check apps like Camera Stream to use your phone as a live video camera accessible over the web.

Normally you could set all this up and directly access it all, but if I give you guys the direct links to my setup you’ll all destroy my home internet connection. Even with fibre broadband, the upload capacity isn’t going to be enough to cope with thousands of you lot viewing it, so I’ve got the Coolsmartphone server connecting to it and then displaying the results here.

Here’s the live details then. The position of the phone still needs work – it’s a bit far from the shed window as I don’t want my neighbours to think I’m snapping shots of them! :)

LIVE FROM THE SHED!

Samsung Galaxy Watch now at EE
A new phone from Nuu Mobile, the G3 -Review