Hardie Gras
  • Home
  • Tag
  • Author
  • Help

Hardie Gras

Run your Node application on a Raspberry Pi as a service

If you reboot your Raspberry Pi, and you want your Node application to be executed on startup, you can install it as a service and specify that it should always run when restarted. Create a .service file under /etc/systemd/system. For my outlet

  • Chris Hardie
Chris Hardie 16 Jul 2020 • 1 min read
raspberrypi

Putting it all together: Building a simple Home Automation IoT platform with IoT Hub and SignalR

In a previous post we discussed how we could connect an IoT device to an IoT Hub in Azure. In another previous post, we walked-through setting up a real-time communication solution with SignalR Service. This post is going to build on those to demonstrate

  • Chris Hardie
Chris Hardie 18 Feb 2020 • 8 min read
raspberrypi

Machine Learning on the Raspberry Pi with Tensorflow.js

Tensorflow is Google's open-source machine learning platform. It's pretty impressive, even for a machine learning layman like myself. It can be used for classifying and locating objects in an image, determining how toxic a message is, recognize sounds, predicting probabilities  of future events, and

  • Chris Hardie
Chris Hardie 17 Feb 2020 • 3 min read
azure

Real-time communication with SignalR Service and Node.js Azure Functions

In the course of building my IoT Home Automation platform, I needed something to facilitate real-time communication between my IoT devices and my clients (web pages, React Native web apps, etc...). I went with SignalR's PAAS offering in Azure - SignalR Service. I've played

  • Chris Hardie
Chris Hardie 11 Feb 2020 • 11 min read
raspberrypi

Control power using a TIP120 transistor and Node.js

Earlier posts have shown how to control power by using a relay or by controlling an RF outlet. However, there are use cases that can't be satisfied with those options. Some devices don't have a standard plug you can plug into an outlet. You

  • Chris Hardie
Chris Hardie 29 Jan 2020 • 3 min read
iot

Connecting your device to the Azure IoT Hub with Node.js

The first step to creating a home automation IoT platform is to figure out how to manage message ingress from your device into the platform. This post will detail how we can leverage Azure's IoT Hub for this. The IoT Hub ingests message at

  • Chris Hardie
Chris Hardie 6 Jan 2020 • 9 min read
iot

Control power with an IoT Power Relay

While controlling power to an appliance with an RF outlet is undeniably cool, there's a much simpler way to supply electricity. It involves a fairly inexpensive IoT Power Relay by Data Loggers. This is the fastest and simplest way to control power - no

  • Chris Hardie
Chris Hardie 31 Dec 2019 • 1 min read
Synology

Backup Ghost CMS instance to Google Drive

My Synology NAS is setup for RAID1 which writes all data to both my drives, ensuring if one drive fails the other will take over and keep serving. However, it's always a good idea to have an off-site backup in case something truly disastrous

  • Chris Hardie
Chris Hardie 30 Dec 2019 • 3 min read
raspberrypi

Control RF outlets with your Rasperry Pi and Node.js

This is a neat project that lets you deliver power to devices using Raspery Pi-controlled RF outlets. I've used these outlets to control the Xmas tree, playroom lights, a gerry-rigged sous-vide, etc... Tim Leland has a detailed blog post with instructions to set up

  • Chris Hardie
Chris Hardie 15 Dec 2019 • 2 min read
nodejs

Writing (and debugging) a Hello World app in Node on a Raspberry Pi

This post follows my post on Setting up a Raspberry Pi for development and will demonstrate how to create a simple Hello World app in Node and debug it using Chrome's DevTools. Configuring Chrome DevToolsYou will need to make Chrome on your laptop aware

  • Chris Hardie
Chris Hardie 1 Dec 2019 • 2 min read
raspberrypi

Setting up a Raspberry Pi for development

Install Raspbian OSFirst thing to do is burn an image of the latest Raspbian - Raspberry Pi's official operating system - onto an micro SD card. Don't skimp on the card, you want something that is reliable and fast. I got a pack of

  • Chris Hardie
Chris Hardie 30 Nov 2019 • 7 min read
Typescript

Deriving a union type from a string array in Typescript

I've run into a few occasions where I require the same data at both compile-time and run-time. Usually this occurs when I'm writing some sort of React Higher-Order Component: const myData = ["foo", "bar", "baz"] interface Props { myData: "

  • Chris Hardie
Chris Hardie 29 Nov 2019 • 1 min read
Typescript

Create a type-safe function guard in Typescript

It is not uncommon to write guards in Javascript to prevent invocation of a function that could possibly be undefined or null: if (someFunction) { someFunction(); } As a minor convenience, I usually write a function that will enact that guard for me: function guardInvoke(func,

  • Chris Hardie
Chris Hardie 25 Nov 2019 • 3 min read
Synology

Secure and serve your internal resources with Synology's DiskStation Reverse Proxy and Let's Encrypt

A reverse proxy is a proxy that provides access to internal resources to external clients transparently. I have a couple resources on my home network that I would like to be made available to the outside world: this blog I just setupthe feed from

  • Chris Hardie
Chris Hardie 23 Nov 2019 • 3 min read
Docker

Setting up Ghost CMS on your Synology NAS

Note that much of this setup is a modified version of what is described in Dmitry Fisenko's blog postStanding up Ghost CMS on my Synology NAS required a few dependencies MariaDB 10 phpMyAdmin Docker UPDATE: Turns out the docker image always uses SQLite for

  • Chris Hardie
Chris Hardie 23 Nov 2019 • 2 min read
Hardie Gras
  • Home
  • Tag
  • Author
  • Help
Hardie Gras © 2025
Latest Posts Facebook Twitter Ghost