web analytics

EPG and recording time trouble in TVHeadend

I’ve moved from having a full XBMC Kodi install on my Raspberry Pi to just Raspbian with tvheadend as all I want is to capture content for consumption elsewhere e.g. RTÉ Pulse shows.

Recently, I had the bright idea of moving to Jessie and in the process discovered that all no longer played well and I wasn’t recording the actual shows I wanted. Two things were happening: the EPG which is pulled from EIT OTA was +1 hour out – most discussions on this issue being observed on TVH centre around there being an issue with the provider. So I went down the rabbit hole of trying to get DVB scanner tools to work to inspect the Saorview EIT data – a successful endeavour. It was then by chance that I saw TVH when debug mode was enabled was logging events with a -1 hour difference.

This is where how time is handled on Linux gets confusing. I looked at the timezone per user (so setting via .profile) and at system level which I naively assumed was /etc/timezone. I wasted lots of times between these two until I discovered /etc/localtime and then this information: https://wiki.debian.org/TimeZoneChanges. dpkg-reconfigure tzdata is your friend.


Custom Gitlab to Slack notifications with Zapier

We’re back to using Slack for product development communication again, so I’ve been keen to tie in the documentation updates I do via Dexy & Asciidoctor to Slack. What I wanted was to notify the channels setup per product of a new version of the specification along with the URL to the documentation site.

Gitlab has Slack integration ‘out of the box’ as described here. Here’s what that looks like:

GitLab [10:30 PM]
James Gallagher pushed to branch master of etckeeper/gitlab (Compare changes)
629601425: saving uncommitted changes in /etc prior to apt run – James Gallagher
ea40dff39: committing changes in /etc after apt run

Package changes:
-adduser 3.113ubuntu2 Show more…

This works great where the audience for the notification is interested in code/configuration changes but doesn’t fit with the use case I described above. So that meant looking instead at a specific Gitlab use case: Web Hooks for tag push events. As I mentioned in the Dexy & Asciidoctor post I tag new versions of specifications – hence tying the notification to ‘tag push events’.

The rest of this post describes the high level approach I took and the [awful] code I used.
Continue Reading