Tag Archives: Automation

How to turn a Podcast RSS feed into a website

As I wrote previously, getting started with a Podcast can be very straight forward. Todd and I wanted to add some personality to our show’s online presence, so we decided we needed a website. A lot of the information that would normally go on the website is already available in the Podcast’s RSS feed, so I started thinking about a way of not duplicating this effort. The Keep In Touch show is a hobby, and given how busy (and lazy) I am at the moment, I needed a pragmatic solution.

TL;DR

KeepInTouch.fm runs on Jekyll and is updated every time we publish an episode using our fork of the Jekyll RSS importer. We upload the episode and its metadata to our Podcast host and then we point the importer at the Podcast RSS feed. If needed, we customise the blog post and then push it to GitHub. GitHub pages then automatically updates the website.

List of requirements

We wanted the website to provide some fairly basic functionality:
– general information about the show, and a the ability to subscribe to the Podcast
– a blog/website where each episode can have its own page
– each episode page would need to privide visitors with the ability to listen to the show, and to find shownotes, links, and other relevant information

As the administrators of the website, we would need:
– a modern website: responsive, fast, and secure
– an easy to maintain set up (i.e. no hardware / software maintenance)
– a simple updating mechanism
– a simple way of transforming the information we had already provided in the Podcast’s RSS feed

The solution

GitHub Pages was the first option we considered, and luckily it ticked all our boxes. We quickly set up an organisation and picked a simple, but quite configurable jekyll theme for the site.

The only friction I still had to deal with was the “transformation” of the Podcast RSS feed into blog posts on the site. Jekyll does come with an RSS importer, so I gave that a go. Most of the metadata was extracted nicely, but there was no way to play the show without changing the post manually to link to the mp3 file that was actually available in the RSS feed.

Open Source FTW

Luckily, the Jekyll project is open source, which meant I was able to fork the RSS importer, and turn the RSS audio enclosure into an HTML audio tag. All it took was 13 lines of code.

The result

Today, my workflow couldn’t be (?) simpler:
– Record and edit the show
– Upload the episode and it’s metadata (i.e. shownotes) to the podcast host
– Run a simple script to fetch the new episode (and turn it from a feed Item into a blog Post)
– Push the new post to GitHub


If you found this post useful, please consider subscribing to KeepInTouch on Apple Podcasts, Google Podcasts, or wherever else you listen to podcasts. If you like what you hear, please leave a review. Lastly, please send us your feebdack via email or twitter @KeepInTouchFM.

Homebridge, the secret sauce to making HomeKit awesome

As mentioned in the previous post, my HomeKit setup is made up of quite a few devices. Many of these are not HomeKit compatible out of the box; they are either too old, or the manufacturer chose not to add HomeKit support. Homebridge magically makes all these available in my ecosystem as if they came with 1st party HomeKit support.

Homebridge logo

Homebridge allows you to integrate with smart home devices that do not support the HomeKit protocol.

Installation

It may be scary for the non technical person out there, but it should be. Homebridge is surprisingly straightforward to set up. I did it on a (very old) Mac Mini and I found the documentation to be accurate and up to date. As it’s usually the case, developers strictly provide installation guides for their own work, rather than for all the dependencies. Luckily Homebridge only has one dependency (Node.js) so this steps should not take long for you to complete. (I recommend you follow the official instructions, but if you’re in a hurry, you can try the steps below)

Node.js

First check that you don’t already have node installed. Open a Terminal window and run the command below. You need to see a result that shows v4.3.2 or greater.

node --version

If you don’t have Node installed, proceed with the installation by downloading it from here. Follow the installation instructions and then run the command above one more time to make sure you’re ready to install Homebridge.

Homebridge

Installing Homebridge is relatively straightforward. Open the Terminal app and issue this command to install the node package:

$ sudo npm install -g --unsafe-perm homebridge

Still in Terminal, move to your home folder and try running homebridge. You’re very likely to see a message like the one below, followed by a QR code and a HomeKit code. Ignore these for now! 

$ homebridge
No plugins found. See the README for information on installing plugins.

Rather than adding the bridge to HomeKit, you should take the time to create your very own configuration:

$ nano ~/.homebridge/config.json

Depending on the devices / plugins that wish you to add, paste the following:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "989-98-989"
    },
    
    "description": "This is an example configuration file and you should make sure to replace this description and the pin info above with something else",

    "accessories": [
        {
            "accessory": "TV",
            "name": "Panasonic",
            "description": "Lounge TV",
            "ip": "192.168.1.100",
            "maxVolume": 13
        }, 
        {
            "accessory": "Onkyo",
            "name": "Receiver",
            "ip_address": "192.168.1.111",
            "model" : "TX-NR509",
            "poll_status_interval": "900",
            "default_input" : "sat",
            "default_volume": "35"
         }
    ],

    "platforms": [
        {
            "platform":"BelkinWeMo",
            "name":"WeMo Platform",
            "ignoredDevices":[  
            ]
        }
    ]
}

Feel free to replace the description above with whatever you like. Just make sure you keep the quotes and the file contains valid JSON. If in doubt, use a JSON validator website to check the config.

Important: change the pin number above with whatever number you wish that matches the pattern provided (3 digits, 2 digits, 3 digits).

The “name” you see above is quite useful: Siri will use that to perform actions on your device. For example, I can say “Hey Siri, turn off the Panasonic” and Siri will switch the TV off.

The accessories and platforms are the main types of plugins that you can add. Simple things are usually just an accessory. You’ll see that each homebridge-plugin has its own configuration snippet that you will end up adding to the config above.

In my case, to add the TV accessory above, I did the following things:

 $ npm install -g homebridge-panasonictv
  • I then added an accessory to my configuration file
{
       "accessory": "TV",
       "name": "TV",
       "description": "Livingroom tv",
       "ip": "192.168.178.20",
       "maxVolume": 15
}

If you’re not familiar with code or JSON, think of the “accessories” (or “platforms”) line as a parent for multiple accessories (platforms), that are separated between each other with a comma. Don’t forget to use the JSON validator website when you’re not sure you added your accessory or platform right. The square brackets indicate a collection or siblings (multiple accessories separated by commas). The curly brackets simple encapsulate an accessory. Pay attention to how the TV and Onkyo accessories are grouped together inside the “accessories” parent.

You can add as many individual accessories (platforms) as you wish but remember to install the corresponding plugins first.

To recap, I have installed node, homebridge, and some plugins. I then updated my config file with my own settings for the plugins I selected, so it’s time to finally start homebridge:

$ homebridge

If all the stars are aligned, you should now be looking at a QR code. Launch the Home app on your iOS device (and now even on your Mac), tap the + button and then select Add Accessory. Follow the instructions and pair the Home app with your Homebridge installation.

Homebridge screenshot from the Home iOS app

Congratulations, you now have a working HomeKit bridge that can breathe new life into old tech!

HomeKit, a mini series of posts describing my setup

I often find myself talking to friends about my HomeKit (home automation) set up, that I’ve been building up over the years. Quite often they are curios about aspects I now just take for granted.

For this reason I’m considering writing a mini series to cover how everything comes together.

I’m happy to take questions, so feel free to get in touch.

Next up: The main components in my HomeKit setup

Do you want to own your status updates?

After backing Manton Reece’s microblogging kickstarter I decided not to wait any longer and setup a MicroBlog section on my website where I would keep my short form updates. This post covers my goals and the approach I took to achieve these goals.

Goals

There are just a handful of things that I thought I’d need:

  • I own my content. I don’t mind posting to Twitter (or Medium) but the canonical location for my content is my own website
  • It’s easy. I can easily separate short form content (ie. statuses) and long form writing (ie. this post)
  • I still engage via Social Media. I can publish short form updates to my own website, and then the entries get cross-posted to Twitter
  • I  can post from my iPhone without needed to make edits from WordPress before publishing

Approach

I tried a few approaches (involving a range of apps such as IFTTT and various WordPress plugins) before I settled on the approach below.

It’s easy to own my content

My website is currently running on a self-hosted WordPress installation. There were two options here:

  1. I import all my Twitter posts under a special Category, or
  2. I post on my website first and then cross-post to Twitter

Option 2 feels more like “doing it right”, and, should anything go wrong in my setup, I never lose any posts I made from my own website.

What I decided to do was to:

  • create a new Category called MicroBlog
  • update the Menu to include this new category
  • replace the stock RSS widget with Category Specific RSS and use it to surface the MicroBlog RSS feed into the side bar
  • exclude the MicroBlog posts from the main page using the Ultimate Category Excluder plugin
  • make all posts in Category use the post format “status” so they looks consistent and timeline-like
  • remove all extra post decorations (ie. sharing) from the list of posts, but leave it on the post page itself
  • not use a post title, in order to mimic a status post more accurately

With these changes in place I ticked the first couple of boxes. What was left was to sort out cross posting to Twitter and publishing while on the go.

Sharing status updates to Twitter / Social Media

Posting to Twitter proved to be more difficult than I thought it would be. The obvious way, via Jetpack’s Publicize feature, seems to share only the link to the post when a title is not present. Therefore I had to look for other options, although I’d much prefer to just use Publicize.

The choice I settled on is an IFTTT rule: “when a new feed item is added to parfene.com/category/microblog/feed post a new tweet to @nicktmro”. The issue with this approach is that IFTTT doesn’t have a smart way of appending a URL to the post when it is over 140 characters, so I was “forced” to append a URL to the original post. It’s not very tidy but the counter argument is that it drives traffic (and search engines) back to the canonical location of the status update.

Posting while on the go

I carry an iPhone and a Pixel with me all the time. Posting updates to my website is a task I assigned to my iPhone.

I seek speed and simplicity when it comes to capturing my thoughts, which is why I use Drafts for almost every form of text capturing. This text sometimes ends up in iMessage, or in OmniFocus, or in an email, or in my Clipboard, or in WordPress… You get the idea.

I looked at the existing Drafts actions but I soon realised that I needed to be able to post exiting text and snippets, too. I needed an extension point. Enter Workflow. By delegating the communication with WordPress to Workflow I managed to increase the ways in which I drive content to my website.

Here’s how it all works:

  • I have a workflow that expects text input (or extracts it from the clipboard)
  • The workflow presets the WordPress category, post format, etc
  • This workflow is added as an action to Drafts

Now I’m good to go. When I choose to share my next status update all I do is go to my usual app (Drafts), write a snippet of text, and choose the Post to Parfene.com action.

Wrap up

I encourage you to try microblogging for yourself. My post is lengthy but you don’t have to do everything in one sitting. You don’t even need to fully automate everything, like I have.

This approach has made me feel more involved, engaged, and responsible with regards to the things I share with everyone. As somebody who oftentimes doesn’t count to five before he speaks, this should be a positive outcome…