No fixed IP address? No problem!

January 14, 2019

Over the years I’ve been pretty lucky with our ISPs – I’ve usually been able to get a fixed IP address so setting up a DNS entry for a subdomain to point back to ‘home’ has been fairly simple. I’ve been able to use that to VPN/tunnel back to the home network to access resources and fix the families machines from anywhere in the world. It also made using the SmartDNSProxy service really simple as it was a set and forget exercise.

Sadly with our new ISP (and long awaited move to NBN) fixed IP addresses are not offered for residential packages (and the cost of upgrading from residential to ‘business’ offered very little value) so I had to come up with a solution.

I could have gone with a service like NoIp.com or DynDns, both of which are supported by our router, but it added additional cost and either required me to move DNS hosting or use (and pay for) a DNS name that I didn’t control and while that supported my “phone home” scenarios, it didn’t help with the Smart DNS Proxy configuration every time the IP address changed. None of the existing IP updater utilities that I could find addressed the problem either.

Luckily, Cloudflare (my DNS provider) has an API that let’s me quickly update the IP address for a specific subdomain, so the DNS entry I use for ‘home’ could be updated, and SmartDNSProxy also have an API to programatically update the relevant details for their service.

As I have a Windows PC that’s always on (it’s the hub for our Media Center, and some of the home automation scripts) I decided to put together a quick PowerShell script that I could set TaskManager to run every five minutes and following a reboot (power outages being the most common cause of an IP address change) and would:

  • Obtain our current public IP address
  • Check the entry for my ‘home’ DNS entry at Cloudflare
  • If they differed, update CloudFlare, SmartDNSProxy (and any other services) and log the change (just for my curiosity)

So far it’s worked flawlessly (the CloudFlare API took a bit of figuring out, it’s very flexible but luckily well documented and has meaningful error messages!) so I’ve tidied it up a bit, removed my API keys and other identifying ‘stuff’ and shared it as a GitHub project for anyone who needs to do something similar.

Over time I may re-write the script for bash so I can run it on the Raspberry Pi that I have around for some other little projects but at the moment it’s not an always-on machine so no urgency … though if anyone needs it, let me know.

Links:

Keeping cool on two wheels

January 11, 2019

In the 30+ years I’ve been riding Motorcycles (has it really been that long!) one rule has stuck with me – ATGATT (All The Gear, All The Time). In a car you’re protected with seatbelts and solid panels, but on a bike what you’re wearing is your safety net if things go horribly wrong, so it makes sense to pay attention to that. The basics are a helmet, jacket (depending on the weather I have a choice of leather or ballistic nylon, both have armour inserts), pants (while the logic of chaps is undeniable, the Village People have rather claimed that look!), gloves, and good boots (ankle protectors, and a patch to stop the shifter wearing the top). The habit is so well ingrained that I get twitchy just rolling the bike off the drive into the garage if I’m not dressed right! Read the rest of this entry »

Pi and Blyncing lights

August 28, 2018

A while ago I put together a simple proof of concept to use an Embrava Blynclight to flash various colors to let people know their conference room booking was coming to an end (it ran off a PC as a NodeJS app, and connected to the Office365 graph to see when the room booking was ending… it would use color and flashing to signal when it was time to start packing up, and when you needed to clear out. Source isn’t currently shared, but contact me via the comments if you’re interested).

I’d tweaked the light control source a little and made it more general purpose and shared the project in case it was useful, but not done much else with it until recently.

I’ve been helping out on a local TV show, and we needed a way to communicate with the hosts while recording was going on – and a simple blinking light next to the monitor turned out to be a simple and easy solution… once I put the pieces together!

To make it work, and keep it self-contained and standalone (we needed to be able to control it from the Control Room, but didn’t want to run cables for it) I needed to get a light I could easily control over wifi – as luck would have it, I have my Blynclight Mini and a Raspberry Pi B+ (which has built-in Wifi), so it was just a case of connecting them together.

First of all, I had to get the Blynclight working with the RPi B+. While Node already works well on the device, getting the HID libraries working took a little bit more effort (but luckily other people had already worked out how). Once I could control the Blynclight form the RPi, I added a simple web page to let me choose a color and blink speed (still using Node), and was able to use my phone or iPad to adjust the lights.

The initial version however did still rely on both the iPad and the RPi both being on the same wifi network, which was going to be a problem in the studio because of how the network was locked down. Luckily, you can configure the RPi to act as it’s own hotspot, so I followed these instructions, and was able to get a standalone wifi network that I could log the iPad onto and control the light.

One last thing was to check that we could run the RPi off a battery pack, as there wasn’t easy power availability near where we wanted the light – I was delighted to find that it ran happily off the battery I carry to top up my phone, and connected to the 1a output comfortably lasted long enough to record 2 episodes (though in future I might try and find a bigger battery pack, or make sure I recharge it between episodes, as after shooting two back to back it was down to the last bar on the battery pack!)

And what does this Frankensteins’ Monster of a creation look like you ask? Wonder no more…

MVIMG_20180829_134238

 

Minimal GPS for a Motorbike

June 30, 2018

As a motorcyclist I often need a GPS to help get somewhere. I don’t want or need a dedicated unit because (a) they’re expensive and (b) Google Maps, Waze, or Here on my phone are rock solid and why would I want to pay for something that doesn’t do as good a job. Yes, I know they need phone coverage for live traffic routing, and apart from Here they don’t have a good download/off-line solution, but its rare that I have no coverage with my riding (YMMV of course).

What I don’t like though is clunky phone mounts that leave my expensive pocket computer at the mercy of the weather, stone chips, and taking a tumble if I don’t get it properly secured. And to be honest, while the mapping apps have great UX for a car driver or pedestrian, as a motorcyclist I really want a very focussed, minimalistic UI so minimize distraction.

I think my ideal solution would be a small waterproof/shockproof device, that has versatile mounting options (to cater for everything from pushbikes, to scooters, to Cruisers, Tourers, or Street Bikes), can be powered from the bike and/or contain a rechargeable battery, that supports Bluetooth (4.x/LE) to be driven from the phone and has an eInk display with a photocell and backlight for automatically providing good visibility in any lighting condition.

The display would show just the basics of what I need to navigate – the turn I’m coming up to (and how far away it is, and ideally an indication of what comes after that if it’s going to be in close proximity), what lane I need to be in (especially helpful for roundabouts or complex junctions) and not much else. Speed limit reminders, clock, time to destination, and other notifications would be handy but optional (my bike has a clock so I’d be happy to have the screen real estate optimized to not show that, but as my previous bike didn’t have one I would have liked it, so let the rider decide).

While I’m not a fan of notifications about text messages, emails, snapchats etc I can see the benefit of a non-obtrusive icon to allow filtered notifications (eg let me know my family is trying to get hold of me).

Sadly I think we’re stuck with a catch-22. Without a hardware device to display this information there’s no incentive for Google, Apple, or Here to add support for a minimal external display to their Maps apps, and without the APIs or support in the apps to pipe minimal directions and graphics then it’s hard to see anyone going to the expense of creating the device.

As we slowly get to a future where HUD displays become more of a reality for motorcyclists (I always wanted to try Google Glass in that scenario) having this minimal UX available to project in that limited space would be a great way for a mapping provider to win hearts and minds of a sizable community…

Update: Looks like there’s a possible solution in the Beeline Moto … pledged for one of these so maybe it’ll answer my need (though not sure if the single arrow display is too minimal)

Calendars still need too much thought

June 27, 2018

Scheduling a meeting is a pain. Finding free spots on people’s calendars can be difficult especially with a distributed team that might span a couple of timezones. Another wrinkle is being able to combine work and personal calendars to avoid needing to try and keep things like dentist appointments in sync across both. I’ve yet to find a calendaring app that deals particularly well with these sorts of real-world problems.

Having the ability to “share, but not co-mingle” work and personal calendars would be great. By default personal appointments would be private but visible to the owner, and editing in either the work or private calendar would sync (across systems and domains – don’t expect people to do everything in just Google or Exchange). Only personal appointment specifically marked as ‘blocking’ would show as unavailable during work hours (but when viewing a calendar request I’d see any work or personal appointments that might conflict).

I have an added level of complexity for scheduling though. I travel quite a lot, and often in very different timezones so scheduling a meeting (or letting other people book my time) can be complicated. It shouldn’t be, computers really should be able to help us with things like this.

If my travel plans are available, there is a way to find out when I’m on flights (and Outlook does a pretty good job of understanding the reservation emails and blocking out my calendar) so it knows where I’ll be… why not adjust my ‘work hours’ to local time and make that availability visible to people trying to schedule appointments to avoid the need for me to reply and try and reschedule (often multiple people).

Calendaring is such a fundamental part of everyones lives, it seems strange that despite lots of pretty UI changes and the ability to import holidays the capabilities haven’t really improved that much since the tools I was using in 1999 to todays systems.

Conference Calls – room for innovation

June 26, 2018

How often have you wanted to join a conference call, but been thwarted or frustrated by the complexity of actually dialing in. Even with dedicated apps like WebEx or Skype for Business it’s not easy, and all the vendors seem to exhibit a certain arrogance about the value of their service that precludes actually addressing usability. Read the rest of this entry »

A visit to the optician opened my eyes

May 30, 2017

For many years the annual trip to the optician, courtesy of my sub-optimal eyesight, was a routine chore that was always accompanied with a nagging sense of failure.

If you’ve ever had your eyes tested you probably know the feeling. Does option 1 make it clearer or darker, or option 2? Is A crisper or B? And no matter what you answer it always feels like, because you are conscious of your ocular faults, it feels like you’re wrong.

When it comes to designing systems – be it functional design, or the user experience – there’s always that same risk. The person answering the question feels like they are somehow “wrong” with their answers. And that makes them hesitant to elaborate.

At my latest eye exam – as it turns out for Lasik – I mentioned that awkward feeling to the optician and they told me something that I wish I’d heard on one of my first visits. “The answers are not right or wrong, they’re just parts of the diagnostic process”. Option1 or 2, A or B. It doesn’t matter. What matters is the differential data it provides the questioner to help refine their understanding of the problem and deliver a correct solution.

My takeaway from this realization is simple. Before asking someone what they need from a system it is important to help them understand that there are no “right” or “wrong” answers, but any responses (and the weight that they give those responses) simply helps provide data to inform the decision. In fact, as a good diagnostician the answers will simply help guide the discovery process rather than just delivery a binary result.

Of course, that still means that the questioner is going to have a subtle, nagging sensation that they’re not asking the right questions… but that’s probably a good thing as that will encourage them to keep refining their approach, and continue to iterate, as they learn more, both from individual interviews but also repeated experiences.

Oh, and the Lasik operation … amazing. Wish I’d stepped out of my comfort zone and done it many years ago.

Being a little more anonymous online

November 9, 2016

With increased State sponsored surveillance and changes in the political tenor even in formerly moderate countries more people are asking “how to I keep my communications secure?”.

Sadly for most people the complexities of being totally opaque are too onerous, add too much complexity, or are simply not worth the effort.

But there’s no need to give up totally and just roll over. There are still things you can do to keep some of your communications at least less likely to be exposed.

If you’re in a vulnerable group – which sadly in the US today potentially means people of color, (im)migrants, women and those who don’t fit into conventional gender roles – then maybe it’s time to start taking a bit more care about your digital footprints…

Read the rest of this entry »

Data Science (Machine Learning) 101

June 12, 2016

Date Science, or Machine Learning, is a scary topic. It’s hard to know where to get started. It’s hard to even find a good definition of what it does and what you have to do. And there’s always the risk of unleashing the singularity or Skynet by mistake.

As I’ve given a few ad hoc presentations on Machine Learning (and though focused on implementing it with Azure, the basics are applicable to other platforms) I thought I’d take my random notes and present them as a primer. You don’t need to be a Rocket Scientist to get started, but having a basic understanding of Linear Algebra will be helpful. As this isn’t focused purely on Azure Machine Learning (AML), and there are good tutorials on getting started there, this isn’t a step-by-step guide for AML Studio.

The first thing to understand is that there are two main types of machine learning model: Read the rest of this entry »

Stepping outside your comfort zone (I wrote a book!)

March 7, 2016

For many years I have been a tame nerd in a room full of talented, creative professionals. As a freelance developer working with ad agencies (Leo Burnett), and Web and TV productions (rushTV, Big Brother, Secret Life of Us and others) I was surrounded by people who could, seemingly, effortlessly produce elegant prose.

Working with some great speakers and technology-centric writers at both Microsoft and Amazon I was exposed to different creative skill-sets, but I still always thought of myself as “technical” and not doing that creative stuff. Yes, I’d probably argue there’s a strong mix of art in the science of developing, and more so as an Evangelist, but it’s still hard to make the mindset switch.

This New Year I didn’t want to do the clichéd New Years Resolution thing, but I did want to do something outside my comfort zone and for years I’d had the first line of a story in my head…

I had the first line, but I’d never done anything with it. Fear was a huge hurdle: I’d never written a book; I didn’t know where to start; how to create a story arc; how to write believable and likable characters; and the killer… how to not make it suck!

I persevered. I struggled. I gave up, and then refused to admit defeat. I hated everything I’d written. I refined and revised a phrase until it made no sense to me.

Then I let my daughter read it. I had after all written what I thought of as a Young Adult Science Fiction novella. Would she like it? Would she hate it? Would she even read as far as the second page…

I got back from her a carefully marked up manuscript. Typos, grammatical clumsiness, transpositions, suggestions for places needing more explanation to help the audience. She even spotted a place where my character while sleeping was supposed to be doing something. But… she didn’t hate it.

I made corrections. I tweaked some more. Then came the big moment. Did I have the courage to actually publish it and show my friends, colleagues, people I respected and wanted to respect me, what I had written? The fear and trepidation rolled back in. How would I cope with them, as well as total strangers, judging what I’d written, and by extension me?

Well… I’d set out to do something outside my comfort zone and, just like jumping off cliffs into the ocean when I was younger… it was time to make the leap.

So, I hit “publish” on Amazon and now… now, I wait to see how people react. Whatever the outcome I know I’ve achieved something new, something that has challenged and pushed me. Something that I hope has improved my skills as a writer, and given me the courage to attempt more things that are outside my comfort zone.

If you’re interested in what I’ve written, you can have a look here at Tuesday Tales: Falling. If you’re a lucky visitor on a random Tuesday it will be free (I’m going to mess around with pricing to see what works). Comments, and reviews, welcome.

And… if I can do it… so can you.