I’m trialing a 4G home broadband router at the minute to see if it can give me decent upload as apposed to the 1mbps I currently get so I thought I’d look into automatically running speedtests. Here’s how and it turned out to be quite simple. Caveat, this runs on Linux.
If you don’t have pip or python installed run this: “sudo apt install python-pip”
This will install pip and the prerequisites, one of which is Python itself. Next up, in your home directory, run “speedtest-cli –csv-header >> speedtest.csv”. This will create an empty CSV with only the headers in it.
Next up, and finally, run “crontab -e” and enter “*/10 * * * * /usr/local/bin/speedtest-cli –csv >> ~/speedtest.csv”. Thanks to this thread for giving me the answer as to why it wasn’t working to start with.
That’s it! Every 10 minutes a speedtest will be run and the results appended to the csv file. Load it up in a spreadsheet program and job done.
It isn’t a long term solution as that csv will get unweildy after a while but this is a two week trial so not an issue. I’ve an aging Raspberry Pi B hooked up to the router and will check the results in a day or so to see what the connection is like without anything else on it.
As long time readers of the blog may remember I tried to build a 3d printer many years ago without any success. The problem was that at the time I didn’t really have a need for one, didn’t know what was involved or what parts I actually needed. I also bought printed parts from one person on eBay, the metal bits from another seller, the electronics from another group again and so on.
Needless to say this did not make for an enjoyable experience.
Every time I got into building it I hit the point where I realised there was a part I didn’t know I needed and I’d put it aside for a few months. Rinse and repeat. It got to the point where the printer I started to build was obsolete so I’d have had to start again anyhow, so I donated what parts I had to the local RepRap usersgroup and they used it to build a printer for a local school. I was happy with that.
Fast forward to now, or at least a few weeks ago, and I had need of a few random parts. A case for a Pi, bits for the Roomba rebuild, bits for the Mini, the list is ever increasing this time around! To that end I bought a Hictop Prusa i3 from Amazon which included everything which meant the whole project was instantly more streamlined! One weekend of hacking, unhacking and rehacking later and I have a working printer!
I’ve printed out a few things now from Thingiverse but I’ve also started designing someone from scratch, more details on that soon, but this is proving a wonderful experience!
For whatever reason, back in early December, the ceiling lights at work have started giving me headaches which occasionally escalate into migraines, this is not ideal. We have a very helpful facilities team at work but I though I’d just find a workaround myself, as I like wearing hats this seemed an easy one to fix.
Behold, Keegan’s Hat of Migraine Prevention!
I poked a small hole inside the headband at the back to allow a headphone cable to pass through and clipped my trusty Bluetooth receiver to it which I used in a previous hack. I now have something that blocks out light and lets me control what I hear. This helps no end and people are used to me being a bit odd so no-one has batted an eyelid.
That being my summer hat and weather taking a turn for the worse I’ve adapted my old Fedora so that when I’m out in town I have music too. When things are busy having music to listen too to dull the noise of the crowd really does help. The odd thing is I now need to remember to charge my hat…
A simple and daft pair of hacks that have actually helped a great deal.
December, a wonderfully triumphant mess!
The Bad Bits
I had a weird bug that left me knackered, we had project end which was busy and I was generally pushing myself too hard.
The Good Bits
Despite having a bug that left me knackered through application of drugs, coffee and rum I ignored it long enough to get shit done. The entire team at work pulled off a blinder, everything clicked and we delivered an awesome demonstrator! We aren’t allowed to show it off yet as we need to add a few bits for data attribution but we have produced something beautiful! We had the Christmas party the same day and that was loads of fun too, then my friend Christy’s party a few days after that. I’ll admit the post-con blues hit hard afterwards but I’ve had a bloody good sleep over Christmas!
I’ve also done a load of hacking this month; bits on the Mini before the above hit hard, more on the server which I rebuilt only to revert it and even hacked my hat to prevent migraines at work. I’ve pictures and such so will write these up soon now that the dust is settling.
The Coming Year
Hopefully my role at work will change slightly soon which will be awesome, more details once/if it happens, but the things I’m looking forward to are the deadlines… I’ve signed up for a track day in Hugo for the end of April and the London to Brighton Run in May! I’ve also the Nerf shooting gallery to make for the beer fest for May Day weekend and hopefully will be attending World Maker Faire in August.
This year has been a bit of a revelation for me, with the anxiety and depression diagnosis and finally getting treatment I feel I’m finally on the right track, this year I think it’s time to get up to speed.
Following up from my post on my Simple Rules I thought I’d start doing month end posts as a recap and log on how I’m doing. Mostly for myself to read back on to see how far I’ve come but hopefully help other people too. It’ll also be a great place to list the odds and sods I’ve done but not written a standalone article about.
Regarding tinkering, I’ve hacked my home server to act as a TV server and now installed a PCIe tuner to hopefully get Freeview HD hooked up to Kodi. I’ve also done work on Hugo to get started with the EFI upgrade, after dropping the coolant I’ve removed the starter motor, distributor, the radiator and next up is installing the crank sensor and fuel tank.
Regarding The Rules I’m not going to lie, this month hasn’t been great though they are proving their worth because of that. I’ve had a perfect storm of end of project stress, which despite the best of planning always happens, and a bout of some kind of cold bug. I literally worked through the cold but it really wasn’t a good idea, it needed doing though, the result was that I was utterly wiped out mentally and physically. I broke and ordered takeaway as I didn’t have the energy to cook. Hell, I didn’t even have the energy to go to the pub at the weekend it was worst so that says something! The flat got a bit messy but not too bad, cluttered more than actually untidy.
One thing I’m glad didn’t stop was tinkering. I didn’t have the energy for big projects but messed around with Linux from the comfort of my sofa under a comfy purple fleece blanket. Considering that in the past my tinkering has really suffered at times like that I take it as a sign things really have change for the better.
Though I have had a blip I take it as such, a blip. The great thing about the rules though is that once the dust starts to settle, as it already has, I have a ready made template for getting back no track and tonight I already have.
Oh, I’ve also signed myself and Hugo up for a track day just after my birthday so there’s a big fat deadline right there!
I realised recently that, like most people, I am watching more and more content on demand and that it’s actually a pain to do with Windows 10 and a HTPC. There are apps for Netflix and various UK providers but there isn’t one for Amazon Video or Sky Go. Controlling them typically requires a keyboard and mouse and use of various browsers too. Also, for whatever reason the user experience just isn’t as good either.
I’ve been using Kodi on a Windows machine with Mediaportal’s TV server and it does work, Kodi also works in a lot of places though including the Amazon Fire TV… I bought one last week and I’ve been damn impressed with it, I thought today I’d try setting up Kodi for live TV and it turned out to be a lot easier than last time. Installing to the Fire was a breeze, I simply installed it to my phone and used Apps2Fire to install it to the Fire TV over the network after enabling remote debugging in the Fire’s Developer menu. Amazon have got much kudos from me for making sideloading so easy!
A few years back I tried to use tvheadend on my Linux server, I’ve had a HDHomeRun for years too so connecting a tuner isn’t an issue as it’s network based, but either the software has got tighter or I’ve learned more as it was a breeze today.
I installed tvheadend to my server using this guide and the HomeRun tuners were automatically detected. I had to change the tuner type to DVB-T as it defaults to cable, under Networks I added my local transmitter then under services clicked “map all” and that was that. It started to scan for the EPG in the background and found it pretty quick too.
A few changes I’ve made are to point my recorded TV and timeshift folders to larger drives, and I enabled timeshifting as it isn’t by default. This setting is under Configuration –> Recording.
After that I enabled the TV headend DVR plugin in Kodi and pointed it towards my server and job done! I’ve a Blackmagic DVB-T2 card to install at some point which will give me a few extra tuners and access to HD channels. It means running a coax cable though and I can’t be arsed with that at the minute.
One content provider I mentioned above was Sky Go, there is allegedly a way of getting it working on the Fire but I’ve not managed it yet. For now I’ll just plug my laptop into my AV receiver and have done with it. I don’t use it often anyhow.
I can now access TV from any device connected to the network so plenty of scope to expand in the future, my upload rate is shocking though so unfortunately I likely wont be able to watch TV remotely. All in all a fun bit of learning and it frees up the motherboard from my HTPC too. I’ve a few ideas for a winter project for that but for now it’s on the shelf waiting to be used again.
As part of installing the EFI kit for Hugo I need to install a crank sensor wheel, to make this a bit easier I though I’d remove the radiator. The car has been stood for a long while anyhow so replacing the coolant and oil is a must before he’s back on the road. I tried to remove the bottom hose but having never done this before I had a bugger of a time getting a screw driver into the jubilee clip holding it on.
I thought that removing the top hose may make things easier as I may be able to move the radiator a bit and get easier access to the bottom hose, part of the kit includes a new thermostat housing too so thought I’d remove that at the same time. After removing the hose I discovered a weird gunk in it which was a bit of a worry! That’s when I noticed that the thermostat housing was only held on with one of three bolts! Unsurprisingly there is more surface rust on the side that lacked bolts, it looks like coolant slowly evaporated or leaked and left behind the weird gunk.
I removed the thermostat, also covered in gunk, and thankfully there was only coolant underneath. Looks a bit rusty inside but it’s an old engine so not too worried about it. I’m a complete noob with stuff like this though so maybe I should be? Future Keegan will figure it out, that guys awesome with stuff like that.
I decided to have a cup of tea and do some research, at which point I realised I’d lost a couple of hours and didn’t get anything else done…
Wow, the last post for Project Hugo was two years ago! A lot of work has happened in the interim but not much actual progress. In part my anxiety diagnosis earlier this year, as discussed in my previous post, plays a part as I’ve been getting my head sorted before tackling the head gaskets but mostly it’s because I’ve been hitting my head against the wall with the sodding engine!
The master-plan for Project Hugo is to take a Mini and modernise the hell out of it without ruining what makes it a Mini. So far I’ve had a few tweaks to the engine, the suspension has been replaced with more modern kit designed by the original designer, the wiring loom has been completely replaced and an electronic ignition fitted.
Sounds Promising But…
Here’s the thing, I’ve always said I’m better with electronics and computers than engines so I’ll leave the latter to those in the know. The problem with that approach is how will I ever learn if I don’t try? To break the cycle I thought I’d have a go at tweaking the fuel mix as the exhaust and spark plugs were sooty as hell. Very quickly I learned how not to tune a carb…
While troubleshooting this issue I discovered that though my Mini is supposed to have a ballast ignition I had a coil that was for a non-ballast car. It turns out that the when I ran out of fuel on the original drive home and my mate had to replace the coil this was likely the same issue! I decided to order a new coil and electronic ignition to make sure I had a kit that matched and cracked on, this was about a year and a half ago. I swapped them out without issue but despite my best efforts I have never got the sod to fire though I’ve learned a hell of a lot about how the engine works by understanding why it isn’t.
A New Plan
I went to EMF earlier this year and it was an unbelievable experience! I could waffle for hours about how awesome it was, and I’ve been known to do so, but one of the last talks I saw got me thinking. Engines are a bit of a dark art but the dark arts I know are computers and electronics…
Classic car, check. Modernising the crap out of it, check. Back to the Future reference, check. Guess what happens next?
I’ve had a look into it and Specialist Components have been building kits for the Mini for a while now that give electronic fuel injection and apparently it makes the car a lot more reliable, smoother to drive, more power and better efficiency too. Oh, also an auto-choke and a CAN bus interface for my digital dashboard!
From the rest of what I’ve learned in the work I’ve done so far I’m confident of getting this fitted and working and it’ll give me a big bit of knowledge to keep Hugo running for years to come too. I’m trying not to think about the twin cam upgrade ST do either but pretty sure that may be added to the list for big upgrades in the future along with the five speed gear box. Expensive but pretty much the ultimate upgrades I can do while keeping the original engine block.
So far this week I’ve done a load of work in the garage to get it tidy enough to work in and I’m going to start work on this in earnest later this week. Alongside the engine mods I need to fit an MPI fuel tank as mine doesn’t have a fuel pump, to support that a pair of new fuel lines and wiring for the fuel pump. Times like this I realise how much I’ve learned that I’m happy to tackle this rather than running scared! Pride before a fall and all that but fingers crossed.
This post is the first non-technical one I’ve done in a while and will discuss my mental health issues, the problems therein and how I’m mitigating them. I talk about things like this on Facebook, Twitter and even all-staff emails at work and I thought I’d finally pen something here. This will also cover some of my favourite life hacks I’ve collected over the years, mostly via Lifehacker, which have helped me a great deal.
First off, I’m not a mental health professional and if you think you need help, please please please seek it. This post will cover some of my issues, how I’ve dealt with them and maybe give some tips on helping you deal too but this isn’t a substitute for getting professional help.
Anyone who knows me will know I’ve had problems with sleep for a long time, since I was 11 or so. I chalked this up to puberty kicking in and then that just being how life is. I’ve also had issues with crowds, confidence, imposter syndrome, stress and who knows what else and I always assumed they were lots of different things that weren’t related in any way. I would get angry at the drop of a hat for the most inane of things, I would feel physically overwhelmed when in noisy rooms and generally feel constantly on edge. These weren’t related though, clearly it was just that I’d had a bad week, bad nights sleep, I’d eaten something that hadn’t agreed with me and so on, always able to rationalise it away and though I was trying to deal with each of them it was in isolation.
One day last year I cam across a video from ProjectUROK in which Wil Wheaton talked about his struggles with anxiety and depression. Now a lot of people thought his character in Star Trek TNG was irritating but I was young when I watched it so he was the character I associated with, a geeky kid with lofty goals trying to find his feet, so him talking about these issues I thought I’d give it a watch.
The Early Days
What I learned about my condition was that my fight or flight response was almost permanently active, this explains why I couldn’t sleep, either hid from problems or got angry at them and more besides and the medication mitigates that until the therapy kicks in. I didn’t quite have the epiphany that Wil Wheaton mentioned but after a few weeks I woke up one morning feeling odd. I couldn’t quite place it, but something had changed and I couldn’t for the life of me figure out what. After a few hours of pondering it occurred to me that the ache in my chest that I’d had for years had gone. I’d always chalked it up to a symptom of asthma but apparently not!
At the same time as this was happening my work health care added mental health cover so rather than tying up NHS resources I thought I’d take advantage of our health plan. Over the six months or so of sessions we talked about all sorts of things but mostly it taught me coping mechanisms on how to get out of the vicious mental loops I find it so easy to get in to.
Over time, things improved a great deal but I was still finding it really hard to maintain momentum and even get up on time still.
I’ve spoken about The Chain on here in the past and last time it didn’t really work for me, no idea what it was but something knocked me off my stride and I gave up on it. I came across this article that says that before building up to big changes make little ones so I thought I’d combine the two. I set myself the first of my little rules;
Have breakfast and watch some TV before work.
The key thing with this one was the TV bit as it forced me to get up early enough to be able to spare 22 minutes to watch an episode of 3rd Rock From the Sun, I figured starting a day with comedy was a good call. It worked in the week and I was getting up more regularly for work and not really feeling like I was sleeping better. After a month or so I thought I’d have another look at this one rule and break it down a little;
- Get up and shower straight away
- Make breakfast
- Watch something or read the blogs I follow
I also combined this with the chain to track how well I was doing and thought I’d add some evening rules too to allow me to get more done in the evening rather than just slump on the sofa.
- Tidy for 25 minutes
- Cook a meal and prep lunch for work the next day
- Make or learn something for 25 minutes
The biggest change was getting up and showering straight away, I’m waking up a lot earlier now and actually have a sleep pattern. When I mentioned this on Facebook a friend shared a link to info on something called sleep inertia and it seems that the shower really speeds up recovery from sleep. If you are wondering why 25 minutes then see my earlier post on the Pomodoro timer I made. It’s also a mental hack as “It’s only 25 minutes, not even half an hour” seems easier to swallow.
After 21 days of this regime my blackboard looks as follows;
I missed one evening of making meals early on and figured today I’d earned a lie in. My flat is much tidier, I’m sleeping much better, I’m now known at work for being optimistic rather than cynical and I’m generally happier. I still have bad days but the list helps, my therapist once told me “you don’t have to feel like doing something to do something” and it’s all too true.
The days where I don’t feel like tidying or tinkering I do so anyway and when I wake up the next morning or get home from work to a tidy flat it really helps break the cycle.
The Next Steps
I figured that if it takes 21 days to make or break a habit then reviewing the rules every 21 days would make sense too so today I’ve taken stock and tweaked them as follows;
- Wake up and shower
- Have breakfast
- Chill out
Evening/Afternoon on weekends
- Tidy for 25 minutes
- Cook something healthy
- Make/Learn/Do something for 25 minutes
- Update my Bullet Journal
Not much of a change but that’s the point I guess, using this as a base for bigger changes was always the plan so making another small change makes sense and hopefully will help get my weight back down and keep it down. I’ve been using Bullet Journal on and off for years too and it really does help keep track of random tasks so making me update it more often can only be a good thing. I’m also planning on taking notes of things I’d achieved each day too as a reminder I’m still getting shit done.
Oh, and last month I got to say thank you to Wil Wheaton in person. They say never meet your heroes but I thanked him for sharing his story and told him it was the reason I got help. He turned to me and said “You’re very welcome. Depression lies” and gave me a reassuring smile. It was brief but glad I had the chance and he really does seem a gent.
A massive thank you to all my friends, family and colleagues who’ve supported me through all this and put up with me on the bad days before I knew what was going on. The epiphany that was the video got me started but you all kept me going.
So, that’s the story so far and I expect I’ll post updates to my rules as and when they happen. Until then I hope you all stay well or get the help you need. Oh, and I know I ended up with seven rules but I’m a Computer Scientist so off-by-one errors are kinda my domain…
The next post should cover the multi-room audio system I’m building so normal service should resume shortly!
In my previous post I talked about some issues I hit when I upgraded from Ubuntu 14.04 to 16.04, it wasn’t all plain sailing and in this one I’ll cover the issues I’ve had with getting Greyhole back up and running.
At the end of the last post I had my “missing” disks mounted and I mentioned I was moving data around. Thankfully the two disks that were mounting fine we’re two of my largest, 4TB and 2TB worth, the two that weren’t mounting are 2TB and 3TB, after deleting a load of old files and reducing the redundancy level on the non-critical shares it looked like I’d have just enough space to make things easier.
One at a time I ran the command to remove a disk from the pool and waited for Greyhole to finish balancing;
You can see what the Greyhole service is doing by running “greyhole –L”, one it tells you it is sleeping you can crack on with the second disk.
This completed and I was able to see my files from a remote machine via Samba, huzzah! The problem was the install wasn’t tidy any more, I couldn’t control Greyhole using the service command and the landing zones were on a disk I was intending to reformat. I tried unsuccessfully to fix it but decided to follow the steps to reinstall it in the end. From the perspective of the documentation this would be the same as migrating to a new machine.
First off I ran “sudo apt remove greyhole –purge” which removes the service with extreme prejudice and I then followed the standard steps to install as per this page. I restarted Samba and Greyhole after running the fsck command and lo and behold I got most my shares back online! Two were showing up fine, full of files, one was showing up but empty. This was my backups share which was a little worrying but I’d already backed it up to another machine so wouldn’t be a big issue to rebuild it.
It turns out that when I was configuring the smb.conf and greyhole.conf files I called the backup share “Backups” rather than “Backup” and this meant that Greyhole couldn’t find the files to make them accessible again. I fixed this typo, ran fsck again and they are now showing up.
Regarding the other two drives, it looks like I’d initialised them as zfs_members at some point and with Ubuntu 16.04 and they can’t be mounted in the same way. It’s a vaguely educated guess so happy to be corrected! To get rid of them I used the wipefs tool which strips the drive bare of partition signatures. BE VERY CAREFUL WITH THIS!
I ran “wipefs –all /dev/sdc” and “wipefs –all /dev/sdd” which seemed to do the trick. After that I followed this guide to format my drives using parted. I’ve no idea why but blkid still doesn’t show the UUID for the partitions I’d created but I took note of them from the output of the mkfs.ext4 command. I put them into fstab along with creating a folder to mount against with the other two drives and ran “sudo mount /dev/sdc1” and the same for sdd1, they then showed up!
Finally I added the two drives to the Greyhole storage pool by following this guide and ran “greyhole –balance”.
A massive faff but a great learning experience!