Using TTN Mapper to show LoRa coverage

heatmapblog.PNG

I’ve been playing with TTN Mapper. It’s great. There’s an app you can get for your phone (Android or IoS). You configure it with the details of your Things Network application and then you can wander round with a portable LoRa device and help to build a map of coverage.

You don’t have to actually connect your LoRa device to your phone, you just have to enable the mapper program on your phone to connect to your application and then it will detect LoRa packets from the device in that application and use the gateway metadata to help build the coverage map.

I’ve configured one of my Pax counter devices so that I can use it for mapping. Note that you need to be careful to put the sensor name in exactly as it is configured in the application. My iphone keyboard “helpfully” converted one of the characters in the device name to upper case and broke the mapping.

Some of the strings you have to enter are quite long. I opened up the Things Network site on my phone and then copied them out of the browser into the setup page of the application.

You can use a wildcard for the device name but this might get confusing if the mapper starts thinking that messages from distant sensors are actually with you and your iphone. But this would be a good way to work if you make a network with a single LoRa device that you are going to use just for mapping.

I’m going to try and get into the habit of taking the phone and a LoRa device with me whenever I go for a walk.

Server Discussions at c4di

c4diserver.PNG

We had a quiet, but useful, hardware meetup today at c4di. Although most of the talk was of servers and software.

We’re in the process of migrating our services onto a shiny new Azure platform (if virtual machines can ever be regarded as shiny). As of today we’ve got the bulk of the work done. This means that you can go to our map and see something useful. We made some changes to the configuration live at the meeting which was great fun. I also insisted that we turn off the server and then turn it back on again, so that we could make sure that there are no manually started services that we need that would cause things to break if we ever had a reset. I’m pleased to be able to report that the server passed with flying colours.

Next we have to move our web sites and a couple of other services and then we’ll back in business. Huge thanks to everyone, particularly Starbeamrainbowlabs and Brian, for making the move.

Starbeamrainbowlabs has written some neat blog posts on the migration process that you can read here.

Any Solar Power experts out there?

solar power.PNG

I went to a meeting yesterday with some folks who are interested installing some of our air quality sensors. However, we have a major problem with this because at the moment our devices are all mains powered. This is mainly because the particle sensor is quite a power hungry beast. It needs to be fed with around 120 milliamps. This is not a huge amount, but it is enough to make long term battery powered deployment a bit of a no-no.

It looks like there are some devices out there, I’ve ordered some of the one above, based on the MCP73871 chip. If anyone has ever used this kind of device and got a happy ending I’d love to hear from you.

Icelandic Parking Tips

icelandic1.PNG

As part of the public service remit of this blog, I bring you my handy “How to buy parking tickets in Iceland” and “How to contest a parking fine in Iceland when you have failed to buy your ticket correctly”.

If you park up in Iceland you have to buy a ticket. Don’t work on the fact that nobody else has a ticket in their car window, it’s all done with car registration plates. Pay for your parking at one of the handy machines above. The most important button on this keyboard, at least at the start, is the one next to the Icelandic flag at the bottom right. You can use this to select the English language version of the machine.

Once you’ve got the language sorted, enter your car registration number, the number of hours you want and then your contactless credit card and it all works out.

Except that sometimes it doesn’t.

icelandic2.PNG

This is the funky little Kia Picanto that we hired from Lagoon Car Rental (they are awesome by the way). When I entered the registration I included the 21 in the middle of the plate.

This is a stupid thing to do. The registration is happily accepted by the machine, but it is not valid. The proper registration is just “JPL42”.

So of course we got a parking ticket. Wah. Fortunately there’s a website that you can use to lodge an appeal. Double fortunately I’d asked the parking machine for a printed receipt which we could use to give our appeal a bit of extra heft.

icelandic3.PNG

So the moral of this story is to not put the year digits into your registration when paying for parking. And to get the receipt to use if you are as daft as me….



Always take some toys to meetings

32442531627_66d1015d90_k.jpg

Today I had a meeting about Connected Humber CIC. We are trying to spread the word about what we are doing. I took some toys along, including the prototype Air Quality sensor and my Air Quality Top Hat.

This turned out to be a real win. Everyone was very impressed (or very polite). I reckon you should always have some toys to show off when you are trying to impress. This doesn’t mean you should push them into everyone’s face as soon as you start, but that if the conversation turns to “What have you made then?”, it is really nice to be able to pull something out of your bag.

Making classy web sites for free using Hugo

A while back I read a great post from David Parker about using the Hugo program to produce static web sites that you can host on GitHub. I’ve had a go with this, using the amazing meghna template. You can find the result here.

It’s been a great learning experience. Things I’ve learned:

  • The Hugo program will serve out a test version of your web site pages which you can view on your local machine. Each time you update a local file, the test web site updates automatically. This is a great way to preview your site, but beware of browser caching which can cause changes not to propagate. I lost a lot of time wondering why some changes hadn’t worked when they had.

  • if you want to map your Hugo site to a domain the source repository must be unique for a particular GitHub user or organisation and have the “.github.io” string on the end of its name. You can host web sites from other repositories in your GitHub account, but these will always have urls which are on the GitHub site.

  • David’s howto does a cunning GitHub worktree thing to allow both the web site source and the served pages to be on two different branches of the repository. He presents a batch file that will update the web site on the Master branch of the repository (the one containing the site) but if you want to push changes in the source files to the source repository you will have to do this by hand. I got myself into a bit of a tizzy using the GitHub desktop client to manipulate the site files. I’d advise you to do everything from the command line.

  • A GitHub repository that is mapped to a domain name must contain a CNAME file which gives the name of the domain being used. If you use David’s vanilla batch file to update your site you’ll find that the CNAME file is not replicated. You can fix this by adding the CNAME file to your static folder on your site repository or by changing the batch file to create a new CNAME file each time after it has wiped the old site prior to making the new one.

  • If you are mapping a domain name to your site and you want to use HTTPS (and you should) the address that you put in the config.tohtml file must be the domain name, not the GitHub address

  • If you add the

    RelativeURLs=true

    CanonifyURLs=true

    lines to your config.tohtml file these will break some of the megha features, notably the scrolling background images

  • You may have to modify some of the html files in meghna to remove references to a local php server used for mailing that is not available on a GitHub site

If you want to make a classy web site on the cheap (actually free) then I strongly recommend that you take a look at Hugo and the lovely templates that there are available for it.

Playing with Linux for Free using Azure

Last week I built Linux PC and started it going on Azure. I kind of did it by mistake, in that I had half an hour between meetings and I thought I’d just do something to pass the time. There was intent there though, in that we are moving the Connected Humber air quality data visualisation platform (that sounds posh) over to Azure.

Getting started is very easy and free. Just follow the instructions in the site here. These are the things I learned when I had a go:

  • you’ll need two PuTTY programs. PuTTYgen to generate an SSH key and PuTTY to connect to the server (if you’re connecting from Windows like I was). When you download the program files there are lots of slimy links to things that aren’t what you want, be careful about this.

  • make sure that you open up port 22 on the virtual machine, otherwise you won’t be able to connect to it using SSH at all (although there is a Linux prompt available on the Azure Portal too)

  • you can reset passwords on your Linux installation via the Azure Portal. This is great if you, ahem, forget to write them down when building the machine

  • a virtual machine starts off in “developer” mode, which means that it shuts down at 7:00 pm each evening. You can turn this off - look for Auto-Shutdown in the settings

  • if you want a static ip address (which you really will want if you want to point a DNS address to it) then you need to set this explicitly. Click the ip address in the virtual machine properties to drill through to the properties for the address and select static

The “machine” is now running and folks who know Linux much better than me are now busily installing the software on it.

Zed book review

ZED.PNG

Zed by Joanna Kavenna s not a happy tale in the same way that 1984 is not a happy tale. However, it is a very relevant one in the same way that 1984 is very relevant.

Zed is set in the near enough to be scary future and tells of the travails of Beetle, an all encompassing tech company that is in no way similar in reach and vision to companies like Facebook and Google. Not at all.

Beetle is everywhere, and is using its everywhereness to provide everyone with a handy “lifechain” which is able to predict what you might do before you do it. The story explores what happens when pesky humans start behaving in ways which the lifechain doesn’t predict and how Beetle is forced to come up with the idea of “Zed”, an imaginary quantity that defines this unfortunate characteristic. Mitigating Zed becomes a company priority with bad results for just about everyone.

It’s a lovely description of how people, companies and governments can justify, rationalise and institutionalise evil without anyone being consciously malicious. You’re never quite sure where the evil is coming from. Bad things seem to happen to good people as an emergent behaviour of the system, rather than having been mandated by any particular person.

If you have any interest in the future you should read this book. It won’t leave you with a warm feeling that things are all going to be OK with our benevolent corporate overlords, but it will give you a lot to think about.

Men at Work Board Game

menatwork.PNG

Men at Work is a balancing board game. Players take it in turns to place girders, supports and workers on the building site. Place the highest piece on the site and you earn an award from Rita the site boss. Get three awards and you win the game. Make things fall down and you lose one of your three safety certificates. Lose all three and you leave the game. The pieces are beautifully made and presented, and the whole thing is nerve-wracking fun.

With most games you’re waiting for your turn so that you can do something. In Men at Work you get at least as much excitement watching other people take their turns trying to place items on precarious beams without everything falling down. Very enjoyable.

Air Quality Hardware Meetup

We had a splendid hardware meetup today. A whole bunch of new people turned up, including Dave White, Hull City Council Air Quality Officer. We wanted to discuss sensor design, data visualisation and a bunch of other things. So we did. It was great. Lots of plans made which I really look forward to seeing lead somewhere.

At the time I promised to put up a bunch of links to things that folks might find interesting. I think these are the ones, please feel free to let me know if there is anything missing.

  • You can find out about Connected Humber here.

  • You can join in the conversation about Connected Humber, Air Quality or anything else you fancy chatting about here.

  • You can read my amazing blog here. Oh, you are doing. Thanks for that.

Enter the Humber Healthcare Challenge

Click the logo to enter

Click the logo to enter

The Humber Tech Challenge is in October. You should enter. You should enter because:

  • you learn stuff

  • you meet people

  • you make stories to tell

  • you do good

  • you have fun

Everybody who took part last year got something out of the event. Even the judges had a good time. This year the challenge kicks off with a Visioning day on the 5th September. If you can’t make that we’ll have a Visioning Video out straight afterwards that sets up the challenge. Then, on the 1st and 2nd of October we’ll open up the Spa Hall Bridlington and turn you loose. There’s free food (and biscuits).

You can sign up here. I already have.

Cheap project boxes

What you can get for seven pounds

What you can get for seven pounds

Making boxes to put projects in is hard work. You can 3D print them but that takes ages. You can laser cut them (but you need a laser cutter). And making things waterproof is really hard too.

Turns out that terminal boxes make great project boxes. They arrive waterproof and the holes in their sides have nifty little rubber plugs in them which you can cut to fit whatever you really want connect to. It turns out that the buttons that I bought last week can be made to fit in the sides with just a modicum of surgery. We’ve also used these holes to provide inlets for air quality sensors.

If you’re lucky you might find that you can shine neopixels through the rubber plugs to get a nice lighting effect - like I do for the two button game. I don’t think this will work with the boxes above though, their plugs seem quite opaque.

Terminal boxes are available in lots of sizes and really good prices. I got the ones above from Screwfix.