Running Home Assistant on Windows in Docker

I wanted to move HA to my home server, I can run Hyper-V images as needed but most service I run these days are in Docker, so looked up how to do this for Home Assistant.

Introduction

This was originally taken from [Guide] Hass.IO on Windows 10 WSL2 (No more VMs!) and updated as needed for how I run it on Windows.

Basically this is HASS.IO running on Docker in Windows 10 WSL2

Continue Reading »

PowerShell Cron Script

I was looking for a way to schedule jobs and yes windows has a task scheduler built in, however I wanted a bit more flexibility and less complexity.

On the unix platform you can use cron. It is a scheduler that uses a simple format to define the time when the process should start and the process command.

I was going to look at using it when I thought about the parsing that would be needed, I dod not want a system that much that I would write a cron parser. So pulling up search I thought to see if I could find someone who has done this. And what do you know, I found a PowerShell script that would test a cron string and return the time of execution. Bingo!

Continue Reading »

Service Fabric skeleton service

Taken from https://andrewchaa.netlify.app/posts/2020-05-27/service-fabric-skeleton-service/ to conserve and update as needed as could not find it when I went looking for it.

On Service fabric, you can either create ASP.NET Core API service or worker process. I’m going to create a worker service today

Visual Studio Template Skeleton

Shorten the default lengthy service name

You deploy it on to the cluster and notice that by default, the name of the service is pretty long.

Continue Reading »

Changing the commit author

So, you made some commits and then realise you used the wrong author and email address. No problem, use the following command to update them all and then you can push with consistent happiness.

This assumes you are doing this in PowerShell, if in bash you may need to escape the quotes differently.

The GIT commit id is the one before the commits with the wrong author. For the Author use the format name <email@address.com>

Continue Reading »

Getting a PI to update when on a network

Now we have a RV I wanted the pi to copy media files over when it is on the network. I have a share for our DVR where the media files are placed (HD Homerun + Emby) and wanted to copy certain TV shows over automatically when the RV is home and I put it on the network.

Now I can go down the BASH scripting route but I do not know that space very well. However I do know the PowerShell space well so installing it made sense. Following the instructions Installing PowerShell on Linux I made a cheat sheet so it is faster if I have to rebuild t a later time.

Continue Reading »

Taking Automation on the Road

So we pulled the leaver on buying a RV. However we want to be able to watch our shows on the road, simple idea however internet access is not everywhere we want to go. To to get the DVR recordings from our media centre I setup a Pi running jellyfin and then wrote a simple powershell script which runs on the Pi and when it is on and at home will pick up our main media centre ont he network and copy and shows with a file called .rvcopy in the root. That way we will always have the latest shows we recorded!

Continue Reading »

Make the Calendar in Microsoft Teams use the same keyboard shortcut as Outlook

I use keyboard shortcuts a lot and in outlook I am used to the Ctrl+1/2/3/4 to go between mail, calendar, contacts, etc. In teams I found myself using Ctrl + 2 to go to the calendar which actually brings you to the Chat tab. I know I could use Ctrl + 4 but you know muscle memory…

Then I found out you can reorder all the tabs on the left, so not I have Chat at the top just like my mail Ctrl + 1 followed by Calendar which means it is Ctrl + 2 which is now very similar to Outlook!

Continue Reading »

Getting Night Light to work with a docking station in Windows 10

This comes from How to enable Night Light feature on DisplayLink devices in Windows 10.

I have a Targus docking station and luckily it used DisplayLink, the key does not exist with the Targus drivers installed so…

  1. Go to https://www.displaylink.com/downloads/windows and download the DisplayLink drivers.
  2. Install them.
  3. Start RegEdit
  4. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\DisplayLink\Core
  5. Create new String value with name EnableGammaRamp and set the data to be: true
  6. Unplug and plug your DisplayLink device
  7. Enable Night light in Windows

All your monitors should now be at the same gamma settings.

Continue Reading »

Work at home and being a team

Now that we are dealing with COVID-19, a lot of companies are getting their employees to work remotely. For some this will be great and for other who crave social interaction not so great. For me the key thing is making sure that my team feels like a team still.

Keeping the routine going is pretty important. For yourself and your team. There are lots of great posts about this so I will just list the key points.

Continue Reading »

Auto Update Git Aliases

Because I am lazy I wrote a script so I can update all my machines from the one location which is the gist below. This works in powershell core. Again this is mostly for me but feel free to use as needed.

Update your $profile to have th following environment variable set. This will allows the wid and pid aliases to work correctly.

$env:GIT_PERSONAL_EMAIL = "personal@personal.com"
$env:GIT_PERSONAL_USERNAME = "myname"
$env:GIT_WORK_EMAIL = "work@work.com"
$env:GIT_WORK_USERNAME = "myworknameoralias"

Script to update aliases. Add to your profile or a function in your profile that you can call when you want.

Continue Reading »