How to upload a file to Google Drive using Node-RED

For a home automation project I needed to upload files to Google Drive v3. I use Node-RED together with Home assistant for adding “intelligence” to my home automation. My HP printer has a feature to scan documents to email. I wanted to use this feature to scan documents and automatically upload them as PDF to Google Drive. Within Node-RED the http request node is the obvious choice to accomplish this, but I found it challenging to get it uploading multipart-encoded payloads.

In this post I will show you how to use the Node-RED http request node to upload a file to Google Drive using the v3 API, using a multipart-encoded payload.

Read full post

Public P2000 messages website hosted via a free-tier Azure App Service plan

I’m collecting Dutch P2000 messages sent out by Dutch emergency services to “page” them. These public FLEX-protocol based messages are broadcasted all over the Netherlands and you can receive them via a cheap DVB-T-receiver. Sometimes, when I hear a siren in my neighbourhood (or wherever in the Netherlands I am), I’m curious as to what is happening. Accessing my smartphone, connecting via VPN en accessing my Elasticsearch cluster via Kibana does mostly satisfy my curiosity, but it’s not a convenient and fast process. Then why not use one of the many P2000 websites that are out there already? I simply don’t like them enough. Also, I love to play around with frontend-stacks (so many choices!), being mostly a backend/infrastructure kind of guy. So, that got me on the look for a cheap (or preferably free-tier) container-based hosting solution that can serve P2000 messages to other curious people like me.

Read full post

Exposing the UniFi Network Controller via a Traefik (v2) reverse proxy

This is about my WiFi network set-up with Ubiquiti Access Points (AP’s) in a home situation, but without having (or wanting) physical hardware for running the Unifi Network Controller software on premise (required for set-up and management purposes). The software is therefore running as a container on a Virtual Machine in the Microsoft Azure cloud and AP’s are adopted by it via the ‘Layer 3 Adoption for Remote Unifi Controllers’ method. Because running the Unifi Network Controller web UI with a proper (valid and auto-renewing) LetsEncrypt web certificate and working websocket connections wasn’t trivial after all, that’s what I’m sharing in this article.

Read full post