Some recent things I have learned about SEO

A screenshot from Google Console Search Insights congratulating me on achieving 900 clicks in 28 days, indicating that I am doing okay from SEO perspective

I’m signed up to Google Search Console (formerly known as Webmaster Tools) which gives web site owners an indication at how good they are at SEO, or search engine optimisation. And last weekend, Google emailed me to congratulate me on 900 click-throughs in 28 days. That means that about 60 people find something from this blog in a Google search, and click through to see it.

Of course, I mainly blog for myself. It’s a chronicle of things that I have done, or things I’ve found useful or want to share. But I also want people to be able to read it; as the saying goes, if a tree falls in the forest and no one is around to hear it, does it make a sound? So I feel it’s important to incorporate some degree of SEO.

As this is a WordPress blog, I use the Yoast SEO plugin (the free version). It works okay, and gives each post a traffic light symbol for SEO and readability. Readability is important to me; it discourages me from using overly long sentences, and avoiding passive voice. But the SEO suggestions are helpful too. For example, making sure that any images have relevant alt text, and that I include both internal and external links. Not every blog post needs to be optimised, but I try to optimise most of them.

Some blog posts have done better than others, and seeing as the whole idea behind this post is that I share what I’ve learned, here are some examples:

Comparing things

People will often search for ‘[thing 1] vs [thing 2]‘, which I found out when my blog post about the films Wonka and Wish did well back in January. It just so happened that I had seen both, and I could have reviewed them in separate posts. But putting them together meant that my little blog appeared on the first page of results for a while. Alas, apart from watching Butterfly Tale last month, I haven’t been to the cinema since.

I put this into practice when comparing Readly and Pressreader. My original plan was just to review Pressreader on its own, but having seen how well my Wonka and Wish post did, I tried comparing the two. That blog post is typically in the top 5 results for the search term ‘readly vs pressreader‘.

How-to guides

The most clicked-on link from Google is my guide to installing Home Assistant Supervised on a Raspberry Pi. About a third of all clicks to my blog are to that post alone. But other how-to guides score highly too, including Mounting a USB hard drive on startup on Ubuntu Core and How to join a preferred Thread network in Home Assistant. Generally, I’ve written these guides because I haven’t found a simple answer myself, and these are usually an amalgamation of advice taken from various forums or StackExhange threads.

Whilst having a dedicated SEO plugin probably helps, there are some things that you can do yourself that can help:

  • Ensure you have a machine readable site map, and point Google at it.
  • Make sure your site loads quickly; one of the reasons why I changed to GeneratePress as my theme is that it’s a lightweight theme.
  • Post regularly – Google likes sites which often post new content. I’ve found every other day to be manageable.

As I said before, the number one person that this blog is written for is me. But I also want it to be useful and for people to find it. I hope I get the balance right.

Home Assistant and Google Home broadcasts

Screenshot of Home Assistant showing a script to broadcast a message via Google Home when my washing machine finishes

We have six Google Home Mini devices around our home, and now I can get Home Assistant to automatically deliver broadcast messages. Here’s how I did it.

Broadcast messages

When you have more than one Google Home device, you can say ‘Okay Google, broadcast [message]’, and it will relay that message to all of the other Google Home devices in your home. It’s useful for announcing that dinner’s ready, for example. Our house is long, rather than square, and I’m hard of hearing, so we use this quite a lot.

What I wanted to achieve was automation of these broadcasts, so that a broadcast was triggered by an event. This is possible thanks to the Google Assistant SDK integration. It’s a bit of a faff to set up – I recommend following this guide or watching the video embedded below:

Call the service

Once it’s set up, you can test it by opening Home Assistant’s Developer Tools. Click the ‘Service’ tab, and choose the ‘Google Assistant SDK: Send text command’ service. In the command, type something like ‘broadcast "This is a test"‘ and click ‘Call Service’. If you’ve set everything up correctly, your Google Home devices should all say something like “Incoming broadcast; it says: This is a test”.

Create a script

As I write this, the latest version of Home Assistant (2024.4.x) doesn’t allow automations to call services directly. So, to be able to trigger the broadcast, we’ll first need to create a Script in Home Assistant. In my example, I have a script called ‘Washing machine finished broadcast’. The ‘mode’ is left at the default setting of ‘Single’, and then I’ve created an Action which is to Call a Service. As above, I have selected ‘Google Assistant SDK: Send text command’ as the service to call, and then entered ‘broadcast "The washing machine has finished"‘ as the command, which I have ticked. I’ve left the rest blank.

Whilst here, I’ve also added a time condition. As this will be triggered when the washing machine finishes, I don’t want it to run when we might be asleep. We have Google Home devices in each of the bedrooms, and we sometimes run the washing machine overnight.

Home Assistant runs script actions in order. So, if you also want to add a time condition, you’ll need to add this before the Google Assistant SDK service call, or re-order the actions. In this example, I have created a Test action, where the current time is between 8am and 8pm. Outside of those times, the script will fail and not process the next command, so the broadcast action won’t be executed.

Link it to an automation

Now that we have a script, we can integrate this with an automation. I’m using my existing automation that sends a phone notification when my washing machine finishes. In my case, this is triggered using Meross energy monitoring smart plugs (sponsored link).

So now, as well as sending a notification, it also triggers a broadcast (within the time constraints).

Other things you can do with Google Home

Once you have the Google Asssistant SDK integration installed in Home Assistant, you can use scripts to run any other command that you would say to Google Home. You could, for example, create a button on your Home Assistant dashboard, which triggers the text command ‘play Never Going To Give You Up by Rick Astley on Spotify‘ if you want to automatically rickroll the other occupants of your house. It can also control smart home devices which work with Google Assistant, but do not yet have a Home Assistant integration.