Last Chance at the Little Bookshop

The Little Bookshop in Leeds is one of my favourite places on the planet. Really. It’s just a lovely place with a great selection of kids books and a splendid cafe. We went there today for lunch and it was great.

There was a definite “end of term” feel about the whole affair, as if we were doing something for the last time for a while. I really hope that the nasty things that are coming down the tracks don’t put lovely places like this out of business. I wish them (and all places in the same position) the very best of luck.

The Raspberry Pi serial port is almost useful...

If you’ve ever played with a Raspberry Pi you’ll be familiar with the annoying way you have to configure the device before you can use it.

You might have no intention of using your shiny new Pi Zero W with a keyboard, screen and mouse but to get it set up you have to connect them all.

I thought I’d found the answer to my problems in the form of these serial connectors. You can connect them to the serial port pins on your Pi, plug the other end into your PC, fire up a terminal program (I use PuTTY) and then use the command line interface to set everything up.

A while back this would have been an excellent idea. Unfortunately modern versions of the Pi operating system are a bit more security conscious than the older ones, and disable the serial port command line by default.

So if you want to use this cable you have to use a mouse, keyboard and screen to turn it on and enable the serial console…… Oh well. It will still be useful for “on the fly” modifications.

Evohome Day 2

Today I completed the installation of the Evohome system. The system comes with two remote controlled relays, one for hot water and the other for heating. There’s also a remote temperature transmitter which you attach to your hot water tank. Once I’d done the wiring I had to take the controller unit around to each device and “bind” them together. This was slightly hampered by the fact that the controller has horrible battery life. The good news is that once I’d got the system installed I could then use an iPhone app to mange everything.

It’s been quite a pain free experience. These are my takeaways so far:

  • everything works and looks to be well made (in the UK, which is amazing)

  • the documentation is OK, but it glosses over some bits more than it should. However, once you get into the swing of how it works its fine

  • the controller is very “last generation” with its resistive touch screen and Nmih batteries. However, the user interface itself is fine and seems to have been designed to make it easy to control your heating system, which is nice

  • the radiator valves are a bit noisy when a little DC motor opens and closes them, but I think we’ll get used to this

I’ve not tried any of the fancy remote controlled features, but at this point I’m well pleased with how well everything works.

Evohome Heating Controller Fun

I’ve been meaning to do this for literally years. A while back I got all enthusiastic about replacing the radiator valves in the house with computer controlled ones, found out how much it would cost and then backed off a bit.

Earlier this week, armed with my “You’re not going to the MVP summit” bonus (in the form of a hotel room refund) I ordered a bunch of bits from these very helpful people and today a box arrived.

I’m using the Honeywell Evohome system. It’s been around for ages and has got consistently good reviews over the years. I like the idea of using something proven. The geek in me is intrigued by the If This Then That (IFTTT) integration. The Apple lover in me is rather upset about the lack of HomeKit integration but he’ll get over it.

Today I went round the house swapping the old mechanical control valves with the Evohome ones. The valves come with a couple of adaptors and these fit all but one of my radiators. At this point I’ve got a bunch of very clever but unconnected valves. Tomorrow I’ll install the remote controlled relays that will control the heating and then link everything together.

James Bond Python

There’s always a moment in a spy film when someone says “I’ll just hack into their network and reconfigure it….” Today I did this for real. I suppose I was hacking my own network, but it still felt a bit like James Bond.

I was fixing one of our sensors on our Connected Humber network. These all use MQTT to send readings back to the server which then displays them on a map. The problem was that when I set up the sensor I’d set the publish topic incorrectly, so the readings were being sent to the wrong place. I needed to change that topic remotely.

Fortunately my sensor code can accept configuration commands, so this should have been an easy fix. Just send the appropriate message. The snag was that once the sensor has sent a reading it then goes into a deep sleep to save power. So it is hardly ever around to hear any messages. However, I’d built a delay into the software so that it stays running for a couple of seconds after it has sent a reading.

All I had to do was wait until I saw a message and then quickly send the configuration command. This seemed like a bit of a waste of time, and at my age there is no guarantee that I’d have the required ninja reactions that would allow me to send the message in time. So I wrote a bit of Python instead.

The program turned out to be simple enough. It just waits for an incoming message and then sends one straight out as soon as it sees it. The command that I sent was “Don’t go to sleep after each transmission”. Then I was able to configure the MQTT correctly, check a few other settings and finally put the device to sleep when I’d done it. And I really did feel a bit like a hacker in a spy movie while I was doing this.

I think I’ll build this out into a proper command transfer program. LoRa powered sensors work in exactly the same way, in that a LoRa device only listens for incoming messages after it has said something.

Fixing Una

Whenever I start to think of my 3D printer as an appliance it promptly breaks. Actually, this time it was my fault in that I started a new print without removing a completed one. The resulting crash was quite noisy, as the rubber belts did what they are designed to do, and slipped.

The printer itself seems undamaged, which is a relief, but I figured it was time to show Una some care and attention. After all, she is nearly eight years old. And I have got a replacement set of belts and a new print nozzle to fit. So I took everything to pieces…..

One of the principles of 3D printing is that any given job on a 3D printer will take a day. Even if you think it will take a couple of hours. This one was no exception, but by the end of the day I had the belts replaced and print head back in position.

Next I just have to level the bed and adjust the distance of the head so that it prints properly.

Robot Tracking and Python at the Hardware Meetup

Another good hardware meetup. Brian was showing off a properly working robot tracking solution, which means that Hull Pixelbot Robot Rugby is getting closer…

StarbeamRainbowlabs was showing off a Raspberry Pi cluster in the making. Love the colours.

Karen had brought along some devices that she wanted to play with, including the one above. But what does it do?

Finally, Ben and myself did a bit of Micro Python. Each time we have a Hardware Meetup I’m producing a little briefing document about the subject. You can find these documents here.

Silver Cloud Inn Folks are Wonderful Folks

Yesterday I found out that the MVP Summit was cancelled. Wah. And I had pre-paid for my room at the Sliver Cloud Inn on a non-refundable tariff. Double wah.

I emailed the hotel cancelling my booking (no sense in leaving the room empty) and noting that I wasn’t expecting any refunds. Today they emailed back saying that because the cancellation is due to the CoronaVirus they are refunding everybody. Which is awesome. It must be costing them a pretty penny to do this, what with them having lots of bookings cancelled, but they are doing it anyway.

I’ve always loved this little hotel. And now I love it a lot more.

Update: Sorry about spelling Silver Cloud as Silver Could, but then again I think this may be kind of poetic tribute.

MVP Summit 2020 Cancelled

One of the best things about being a Microsoft MVP is the way you can meet up with other Microsoft MVPs, along with Microsoft staff, at the MVP Summit. I missed out last year, so for this year I made sure that I booked my flights and sorted out my hotel nice and early to ensure that I got to go.

And the summit has just been cancelled. Wah.

I agree with the decision. It’s a lovely occasion, but not something that should put your health (of that of anyone else) at risk. I’m sad that I’m not going to meet up with lots of great people but I’m sure that, given the talent of MVPs for invention, there will be a bunch of virtual events and synchronised pub-crawls going on over the week of the event. And with a bit of luck we might even get some T-shirts sent through.

Here’s to Summit 2021.

The evil of HEIF

Picture the scene. You’ve just bought yourself an expensive Windows 10 powered computer. You’ve got it going and find the experience smooth and hassle free. You’ve put the wonderful OneDrive application on your iPhone and you decide to view some of the pictures you took with your iPhone on you shiny new computer.

And they look horrible. Finally, after a bit of searching on the internet you discover that to fix this you have to go into the Settings page for the Photos app and follow a link to install the “HEIF media extensions”.

Then you find out that the extension costs 79 pence. Just so you can view pictures that you took with your phone. At this point you’d probably be getting a bit cross with Microsoft who seem to be rather desperate for your money. I suppose it is a tiny amount of money, but that is really the point. I wonder how much Microsoft makes from this, and whether it is worth the damage to customer goodwill.

Oh well, I’ve just had to do this for my newly imaged PC. I must have installed a free solution last time. The strange thing is that I don’t remember doing it for any of my Surface devices….

Mid-life computer upgrade

Four years ago I got myself a “proper” desktop PC. With help from number one son I specified a beefy processor, speedy motherboard, oodles (for the time) of RAM and a fast SSD.

Over the last few months it’s been slowing down though. The first thing that happened was that I noticed I was running out of memory. Mainly due to the penchant of some browsers (I’m looking a you here Chrome) for finding out how much memory you have and then trying to use all of it. The second thing that happened was that I ran out of space on my main disk so Windows 10, without asking, moved my swap drive onto a hard disk that I was using to store files. These two things together meant that I would get lots of hard disk rattlage when moving between applications and if I decided to run Chrome and Lightroom together the resulting ram turf war brought the machine to its knees.

So today I shut the machine down, popped the lid off and dropped in a couple of slabs of memory and a new internal SSD. The SSD uses a new connection - M2. I’d bought an expansion card that I could use to link my new drive to the bus in my motherboard, only to discover when I actually opened the box that my motherboard already has interfaces for this kind of drive. Oh well, the card can go back to Amazon.

Once the chips were down (as it were) I unplugged all the other disk drives, fired up the system and did a brand-new Windows 10 install. That went a treat. I had a working system before my cup of tea had cooled down. Once I’d got Windows working I then plugged in the other disk drives and put the case back together.

This is kind of cunning, in that my original system disk is still running so I can boot from there at a pinch if I really need something from the old installation. It is also kind of not cunning, in that I’ll have to install all my applications and files onto the new disk drive. I’ve started doing that now, with most stuff being on Onedrive it shouldn’t take too long.

First impressions are that the machine is much more sprightly.

DDD North was awesome

The DDD event today was wonderful. So good that I forgot to take pictures. The only pictures that I did take were of links to more interesting content. The picture above is from a session by Pete Gallagher about .NET Core 3 on Raspberry Pi.

…and this is from the session that followed, all about Blazor (which looks wonderful).

Then I went to sessions about VR, C# for the lazy and Kubernetes on the Raspberry Pi. I don’t have pictures for them because I rather stupidly sat too far back…..

Everyone that went (and the place was packed) had a great time. Thanks to all the organisers, a perfect day. There’s another DDD event later this year in Nottingham, you can find out more here.

Using the DS3231 Real Time Clock from MicroPython

If you ever have a need to connect a DS3231 Real Time Clock device to an ESP32 running MicroPython then I have just the blog post for you.

All you have to do is download the driver from here:

https://github.com/adafruit/Adafruit-uRTC

I then used Thonny to copy the driver file onto my MicroPython device and then I could use it in my program.

Don’t use the one from upip (which is usually a neat way to install libraries onto your MicroPython devices) because it is at version 1.0 which contains some statements that don’t compile. Once you’ve got this running you can now create MicroPython powered devices that can keep track of time.

Note that if you are using one of the DOIT ESP32 boards (these are very cheap and easy to get hold of) you will need to use pins 22 and 21 for the I2C interface:

i2c = I2C(-1, scl=Pin(22), sda=Pin(21))

Recycling for fun and HP's profit

I had to do it at some point. So today I replaced all the toner cartridges in my printer. It’s been moaning for a while abut low toner and today I noticed that the print quality was getting patchy. I can’t complain too much, because the low capacity free cartridges did last quite a long time.

I thought I’d try and recycle them. This turned out to be quite easy. HP has a site where you can go to print out a postage label. Then you just bundle the cartridge boxes up, stick on the label and drop the package off a the Post Office. This is good news for the planet, and even better news for HP who can put fifty pence worth of toner in them and then sell them again for sixty quid. It would be nice is there was a formal scheme where you got discount on replacement cartridges if you’ve sent back the old ones, but I’ve not seen anything like that just yet.

Children's University at c4di

Future technologists

“They’re a lovely bunch” said Tina as we went up to the board room in c4di. She was right. A patient bunch too. Because the connection to my robot broke as soon as I tried to use it. So there I was, with a wonderful audience and nothing to show them. Wah.

This was a good time to show grace under pressure. After deploying some really terrible jokes I managed to get things working. Turns out that my Bluetooth driver had deployed some serial ports that were interfering with the robot. This was not something that happened last night when I was testing the presentation but today it did. So after killing the offending connections we were off.

One day I’ll practice…

Actually, it turned out that this was a good time to make the point that working with computers, like a lot of other things, ends up being all about persistence. I told the audience about my guitar, which is presently hung on the wall (see left). I can’t really play it because I’ve never really bothered to practice. It turned out to be a bit harder than I expected (and a tiny bit painful on the fingers) so I gave up and found other things to do (like mess around with computers).

When you work with computers you have to learn how they see the world. And you have to get good at dealing with tiny details. This can be hard work. Having said that, we did get to the point were we had made a cowardly robot, so I’m counting the event as a success.

begin
forever
  move 10
  d = @distance
  if d < 100:
    red
    turn 180
    move 100
    continue
  if d < 200:
    yellow
    continue
  green
end

This is the “cowardly code” that I was demonstrating. The robot creeps forwards in 10mm steps. If it sees something too close it sets its pixel to red, turns 180 degrees around and runs away.

Thanks to the Children’s University for Inviting me and the audience for being so wonderful.