Why are my radiators not hot?

I’m not proud about this one and feel rather stupid but I’m going to share it anyway – it may help someone avoid falling foul of the same stupidity that I did.

I’ve seen adverts (by British Gas I think) whereby the elderly lady is getting help to save energy over the phone and she follows the instruction and turns down her boiler. I internalised this and one summers day turned down my boiler. You can see where this is going can’t you?

So the following winter my radiators weren’t hot and I was scratching my head. I checked the hot water cylinder thermostat was working, the 3-way valve, the Nest control hub, the individual thermostatic radiator valves, I bled all the radiators, I balanced the system.

Then, Eureka! I realised that the dial on the front of the boiler wasn’t a simple “use more or less energy for the same result” dial. It is actually, like most other controls in a heating system, driven by temperatures. In this case it tells the boiler how hot to get the water flowing through it.

So, if it’s in a middling setting my radiators will only get to a middling temperature and they won’t heat the house effectively and, therefore, the heating will be on all of the time because it’s never warm enough. By dialing it up to a higher setting, what do you know, the radiators get warmer! The house gets warmer! Not only a bit warmer but it actually gets to a temperature whereby the house is warm enough and the heating turns off!

If I had the time I’m the sort of person who would like to do some experiments and understand what the optimal setting is. Too hot and, no doubt, there will be a point of diminishing returns. Too cold and, as I now know all too well, the house doesn’t warm up and the heating ends up being on all day.

Anyway – lesson learnt. Hope my sharing of my stupidity helps someone else!

How I got rid of Google

For the last couple of years I’ve been gradually removing myself from Google.

Why? Snowden.

Before Snowden I knew, in my heart, that I wasn’t happy with a big company hoovering up data about me (I’d quit Facebook for this very reason).  I’d previously convinced myself that Google was OK and that they would “Do no evil”.  I still believe that of them today, but what about tomorrow.  There’s a great quote which I first encountered due to a post that went viral on metafilter: “If you are not paying for it, you’re not the customer; you’re the product being sold.“.  Am I happy with Google having my data as the price for using their services?  No, I’m not.

Back on the topic of privacy, I’ve got nothing to hide – that doesn’t mean that my privacy doesn’t matter.  Spend 20 minutes to watch this ted talk on Why Privacy Matters.

So, motivation aside, what have I done?

Well let’s list what I used to use and what I now use:

  • Google Search – Starting with the easiest – I simply switched which search engine I use.  My first search engine is now DuckDuckGo (scroll down on their homepage to learn more about them).  It’s not as good as Google but it’s good enough and getting better all the time.  For the cases that it does let me down I mix and match between bing and google; I realise that’s against the whole point of this post, but I’m ok with it due to the next item in the list …
  • Google Chrome – I switched to Firefox, simple.  AND … I got some plugins.  They’re awesome! The following 3 plugins combine to get rid of all tracking by the likes of Google.
    • uBlock Origin blocks ads, trackers and malware sites.  It’s brilliant.  It blocks around 10% of my browsers requests and I don’t notice a thing.
    • Self-Destructing Cookes – Once you close a tab it’s cookies are deleted (and you can whitelist for sites that you want cookies for).
    • I don’t care about cookies – If you blow up all your cookies you start getting very annoying popups on sites saying “we use cookies, click to acknowledge”.  Well, this plugin stops that nonsense.
  •  Gmail – This is when things start getting more difficult.  To replace a service like gmail when you’ve been so invested in it for over a decade isn’t as simple as switching your browser.  The way I did it was to get my own domain name and run my own email server.  I’ve done this before so it didn’t daunt me but I knew it was going to be a lot of effort.

    • Server – On the server side I’m running a fairly standard Dovecot and Postfix setup.  I put in some extra effort so that accounts and aliases are configured in a mysql database.  Later on I also configured Solr for full text search of email – this was always the killer feature in gmail and I’m more than happy with my substitute.  All of the emails are indexed and searches on them (server-side) take place in milliseconds.  The data migration was a bit of a pain – I used Google Takeout to get all of my emails in one place, then added them to thunderbird and then copied them accross to my email server.  It took a while but it worked.
    • Web clientNextcloud (owncloud when this all started but that forked and I moved to Nextcloud).  This is a recurring theme on how I replaced google.  In a nutshell it is an open-source piece of software that let’s you host your own private cloud.  There is a comprehensive suite of plugins available, one of which gives you a web client for email.  It’s a nice UI and it does everything I want.
    • Mobile client – I run android and there’s an app called K-9 Mail that meets my needs perfectly.
  • Google Contacts – Nextcloud does this for me.  Synchronisation to my android device is done with an app called DAVdroid
  • Google Calendar – Nextcloud does this for me.  Synchronisation to my android device is also done with DAVdroid
  • Google Photos – Nextcloud does this for me.
  • Google Drive – Nextcloud does this for me.
  • Google MapsOpenStreetMap is perfectly capable for my needs
  • Google Keep – Nextcloud does this for me.  For tasks the synchronisation to my android device is also done with DAVdroid
  • Google+ – I stopped using it.  This took a bit of thinking about but in the end I realised that an online social network has never actually made my life any better.
  • Google Android – The problem with the android phone you buy in a shop is that it comes with “Google Play Services” already on there.  This gives google full access to everything on your phone – eek.  The good news is that underneath this software there is the Android Open Source Project (AOSP) which other developers have taken and made awesome without the Google octopus being wrapped around it.  Personally I’ve been running omnirom for the best part of 2 years and I love it.
  • Google Play Services – Running a different rom only solves the first part of the problem with Android.  This problem is deeper than it first appears though.  Some applications depend on you having Google Play Services installed.  Most of these I can live without but there were 2 that this posed a problem for me.  The app I use to control my thermostat at home apparently needs Google Play Services to do it.  So does the app I use to interface with my burglar alarm (I can understand this more as it uses Google Cloud Messaging to push notifications such as “you have an alarm”).  The solution (and this one took a while to get right) was microG.  This is an open-source reimplementation of Google Play Services.  It works perfectly for me 🙂
  • Google Instant Upload – Take a photo and have it uploaded – great idea … and, Nextcloud does this for me 🙂
  • Google Play Store – The place to get apps for an android device.  Nicely substituted by f-droid.  Even better, every app on there is open-source.  This makes me a very happy man.
  • Google NavigationOsmAnd is a nice app (open source ofcourse) that does navigation on my android.  Good enough for me.
  • Google Reader – I realise this has been gone for a long time but I’ve never found a replacement I’ve been happy with.  I have now, Nextcloud has a plugin that does what I want.

So to recap by turning things on it’s head, this is what I’m running and what it replaces:

  • Ubuntu server
    • Dovecot, postfix, solr – gmail server
    • Nextcloud – Server for contacts, calendar, photos, drive and keep.  Web client for gmail, contacts, calendar, photos, drive, keep
  • Omnirom android – Google android
    • Nextcloud client – instant upload, drive
    • DavDroid – contacts, calendar, tasks
    • K9 – gmail client
    • F-Droid – Google Play Store
    • microG – Google Play Services
    • OsmAnd – Google Navigation
  • NAS – backups.  I have nightly backups running for all of these services, they go across to my NAS which is, in turn, backed up to external drives.
  • My own domain – For a lot of this to work and to run it out of my own home I needed a few extra services (I don’t have a static IP address)
    • No-IP Plus Domain – so that when my IP changes the domain still resolves to me
    • Backup MX – if, for whatever reason, my email server was offline I didn’t want to miss any emails, this sorts that problem out.
    • Alternate-Port SMTP – some email servers will reject email that comes from specific IP address ranges (e.g. domestic).  It’s annoying and wrong but I can’t change it.  This service gets around the problem.
  • Encryption – https achieved thanks to Let’s Encrypt

So here I am, finally Google free.  It’s been a long journey that’s taken the best part of 2 years (yes, I could have been quicker but this was a free-time hobby thing and I don’t get a lot of time for that sort of thing).

It’s sort of a hollow victory now though … during this time our wonderful government in the UK passed a law (nicknamed the “Snooper’s Charter”) that says our ISPs have to store all internet activity for a year.  The cherry on the cake?  It doesn’t apply to our MPs!  Fortunately, for now at least, there’s a way around it.

 

Declutter update 01

As an update to my resolution to declutter here are things disposed of:

1/1 Six coasters – never used

2/1 A Guinness tray (checked on ebay – not worth anything)

3/1 (short of time) timer clock wall mount, corner baby proofer, gadget charger

4/1 previous years page-a-day calendars (previously saved for note paper)

5/1 space themed magnetic toy – recently broken but could have been mended

6/1 given the last 3 days weren’t too fruitfull I put in some extra effort: Disposable film camera, spare car key that was cut but never worked, lighter holder, label maker, 7 old wallets, a large bag of old socks, underwear, a t-shirt and a pair of old shoes

7/1 sorted out the “bits and bobs” storage and got rid of a large bag full of all sorts. Eclipse glasses, sky viewing card, £1 coin holder, key ring, poppy seeds etc etc

8/1 tea light holding lantern

9/1 Encyclopedia, Dictionary, Tesaurus

10/1 A dozen CDs with drivers and linux distributions etc

11/1 Went through my wallet and got rid of receipts, expired memberships etc

12/1 A large cup for pop from a theme park

13/1 41 books

14/1 25 DVDs

It’s been going quite well – I haven’t even looked in the garage/shed. This is the easy stuff though, it will get more difficult.

Has there been any benefit? Yes. All the books now fit on the bookshelf instead of being stacked. There is space for more DVDs rather than that space being taken up by junk we won’t watch. There is also a little less clutter in my head, especially after sorting out the bits and bobs. Knowing what I’ve got and where it is removes a tiny mental weight I didn’t know I had.

Lawn Care

So I’ve apparently hit a point in my life when lawn care gains relevance.  I didn’t see that coming.

It used to be a chore to cut the grass but, over recent years, it’s become less so.  I thoroughly enjoy spending time with my family, but sometimes it’s also nice to spend time alone … and it doesn’t happen very often any more.  I’ve heard of people talk of a “third place”; the first two are work and home, the magic “third place” is somewhere for oneself. Somewhere to be away from both work and home.  My third place is becoming my lawn.  One of the few activities that will guarantee time without being interrupted (much) is cutting the grass.  Something to do with high speed rotating blades and children with no sense of danger I suppose.

So I’ve found myself, dare I say, enjoying cutting the grass.  That in turn has led to a new pride in seeing little bits of extra effort actually showing improvements.  In 2016 I bought a motorised scarifier and, in Spring and Autumn, I’ve used it to remove moss and thatch from the lawn.  The result has been a much improved lawn.  I’ve also done a couple of “weed and feed” treatments which have also shown visible results.

This success has led me to do a bit of research and I’m going to take things a little bit more seriously.  I’m now the proud owner of a hollow tine aerator and a 16 litre backpack sprayer.  This coming spring I’m all ready to start “the (second) year of the lawn”.  There will be scarifying, aeration, chemical spraying and mowing.

I’m actually looking forward to it.

Sad really.

Happy New Year

A time to reflect and resolve to do things differently. This years list:

Stop shouting: I’m sometimes guilty of raising my voice at the kids when they aren’t behaving but it’s not exactly a role model I want to set. Do I really expect them to be quiet when I’m loud?!

Declutter: I have too much stuff. I’m going to try and get rid of at least one thing a day (bin, recycle, upcycle, sell, giveaway).

Socialise more: In 2016 I found it difficult to socialise because I was too tired … now the kids are a year older it should be easier due to improved sleeping (fingers crossed).

Blog more: I didn’t write much in 2016 but I did re-read previous posts for useful snippets. Seems to make sense to write more.

Lunchtime walk: Before moving South I used to have a walk every lunch time. It seems a good habit for 2 reasons; The only other exercise I get is playing with the kids or working in the garden; Taking a break to clear my mind and come back fresh.

Progress will be posted on my blog – because I’ll be doing more of that 😉

Working with mono-service on a raspberry pi

I was working with on a .net service that I wanted to run on my raspberry pi.  Initially this was fairly easy but then I wanted to run it on startup as a service.

After a bit of digging I found out about mono-service and mono-service2 (for .net 1 and .net 2 respectively)

Working with this is as simply as …

To start a service

To stop a service

Woah – ok stopping isn’t so straightforward …

Basically when the service starts it puts a lock file in the /tmp folder.  This is just a text file that contains the process id (pid) of the exe that is running.  By doing the cat, and passing that to kill, the service will stop.

Next up was to get it to run on start up.

I found a useful bash script to start, stop and restart the service … http://www.geekytidbits.com/start-stop-daemon-with-mono-service2/

Unfortunately this didn’t work immediately for me as my version of linux was built differently and didn’t have some of the parts this script depended on.

My finished script now looks like this:

This was put in \etc\init.d\bpi.sh and I did a chmod to make it match the others in that directory.

Note that there are a couple more parameters to our start command … -l to tell it where to put the lock file and -d to give it a start directory (my application writes logs and they would appear in funny places without this).

Finally the following command sets things up to start and stop in different runlevels:

sudo update-rc.d bpi.sh defaults

 

Creating tasks in Outlook from an external data source

I’ve had this script for many years but currently I don’t have a use for it so I’m getting rid of it but putting it here for future reference in case I need it again.

It’s got code to retrieve data from a database and convert it to a tab delimited string.  There’s more code which then parses this into tasks.  The upshot of this is that I’ve used it in the past to take data from the clipboard (having come from excel).

The code has been anonymised which will have introduced a bug or two but the gist of it is valid.

 

Determine the installed version of .net framework

Just making a quick reference for myself of the info found on msdn.

Take a look at the following registry keys

Frameworks 1 – 4
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP

Frameworks >= 4.5
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Release
where
378389 = .NET Framework 4.5
378675 = .NET Framework 4.5.1 installed with Windows 8.1
378758 = .NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2
379893 = .NET Framework 4.5.2

TFS: automating pending change set reminder emails

As an admin of a TFS server I wanted to be able to send an email to people reminding them of any pending changes they may have.
I knocked up a quick application and have now configured it to run once a week with a scheduled task.

The main logic to get pending change sets is (where _vcs is a VersionControlServer from the Microsoft.TeamFoundation.VersionControl.Client namespace):

The PendingChange class is a simple POCO:

After that it was a simple case of looping through the PendingChanges List<> building up emails and sending them.