A little bit of history

So I started my last blog post like that and when I opened this one I thought what the heck. Let's pretend it's a logically coherent theme :smiley:

I'm in a startup. I'm their first real technical hire. They've been running on three non-technical founders for about a year. Which is actually seriously impressive. If you're looking to join a startup as an early stage employee you should be cheered to see founders who can struggle on without technical expertise. It both proves you can help and shows they won't fold up at the first bump in the road.

Now this startup is in IoT for construction. That means a couple of different things that will hopefully become clearer as we move through the blog post. But for now the key bits are there's not much power and there's potentially a lot of devices.

So tell me what your topology is?

Right now it looks like this:

Tag -> Gateway -> Server

The Tags are battery powered, so we're in the realm of not making too much radio noise becuase that will chew up the batteries on the Tags. The Tags right now use the iBeacon protocol (Wikipedia article). Which is the Bluetooth Low Energy equivalent of walking around your house shouting "I'm here" periodiclally. It's brutally effective in many ways. Just don't expect it to be super secure. But certainly if you're proving out an idea about BLE devices it's a great starting place.

Our Gateways are Raspberry Pis right now, they mostly just siphon up the iBeacon packets and push them to the server. They're way overpowered for what they are doing, but they're super flexible.

A bump in the road

So the complicating factor is a number of Tags and Gateways are in China. And working with devices in China can be tricky. The main thing to think about is that you're unlikely to have a persistent connection to the rest of the world. Data is cheap however and people don't freak out about new technology.

The problem then becomes…

Managing these things. Now the Tags are pretty close to disposable. Tag dies, OK, grab another. Gateways are another matter. So:

  • I want to update the code running on the Gateways
  • I want to make sure the Gateways are alive
  • I want the Gateways to be configurable remotely
  • I need to ship stats off the gateways (for instance how much data are they sending and receiving?)

So where I'm going is IoT fleet mangagement.

So what am I looking at?

The list of candidates is longer than I'd like and at I need to do something sharpish so:

  • Shell scripts with some git and Python - manual, error prone and bound by my time :(
  • Chef and friends - great at shipping updates but feels super high effort and not so hot on the liveness of the gateways piece.
  • Balena.io - works off a neat little docker effort, expensive as though
  • Rayven.io - don't know much more than they have a website with trucks on
  • Azure IoT hub - comes free with some Azure credits we have