Skip to content

Instantly share code, notes, and snippets.

View Paraphraser's full-sized avatar

Phill Paraphraser

  • Cootamundra NSW Australia
View GitHub Profile
@Paraphraser
Paraphraser / 999058924152033470.md
Last active December 24, 2022 03:14
PiBuilder + Windows: Discord question

PiBuilder + Windows: Discord question

Question 1

I tried to build a new installation using PiBuilder. I am a Windows user and connect with a terminal emulator (Putty) to the Pi. So far I was not successful. I tried to follow the description. But Windows only mounts the boot partition. The rest of the SD card is not visible to the OS. So I struggle with the step of configuring PiBuilder and also the many steps just to connect to a Pi using SSH.

Answer

macOS is the same as Windows - it can only mount the boot partition. That's why I put all the files on the boot partition. It's the easiest way of getting everything onto the Pi.

@Paraphraser
Paraphraser / Checking your Raspberry Pi's view of its power supply.md
Created June 13, 2022 06:53
Checking your Raspberry Pi's view of its power supply (sometimes it's not the wall-wart)

Checking your Raspberry Pi's view of its power supply

Sometimes it seems like the first (and sometimes only) advice you get offered for almost any problem with a Raspberry Pi is "check your power supply". You think something like:

"hey, I'm using an official power supply sold as being matched with my Pi so how can there be any problem?"

You look up the specs then stick a controlled load across your supply and confirm that it can deliver the required number of Watts.

Yet your problems persist…

@Paraphraser
Paraphraser / IOTstack + InfluxDB 2 experiments.md
Last active December 24, 2022 00:47
IOTstack: InfluxDB 2 experiments

IOTstack: InfluxDB 2 experiments

Update #1:

  • Rewrite assuming user only has a single Raspberry Pi which is processing live data. Minimises the down time for InfluxDB 1.8.

This gist explains the steps I followed to:

@Paraphraser
Paraphraser / IOTstack-InfluxDB-tsi1.md
Last active February 2, 2023 03:32
On IOTstack, InfluxDB 1.8 & `INFLUXDB_DATA_INDEX_VERSION`

On IOTstack, InfluxDB 1.8 & INFLUXDB_DATA_INDEX_VERSION

Updated 2022-05-19

  • Additional observations since reverting to in-memory indexing.

the trigger question

On March 12 2022 I noticed a post on Discord by Ukkopahis saying:

@Paraphraser
Paraphraser / IOTstackOverrideFiles.md
Last active September 9, 2023 19:15
IOTstack and "override" files

IOTstack and "override" files

As a general principle, I'm not in favour of override files. I think they muddy the waters. I think you're much better off editing docker-compose.yml directly.

That said…

When you use IOTstack to manage Docker containers, you have access to two override mechanisms:

  1. A compose-override.yml file. This mechanism is peculiar to IOTstack and is implemented by the so-called "new" menu on the master branch.
  2. A docker-compose.override.yml file. This mechanism is part of docker-compose.
@Paraphraser
Paraphraser / TimeMachineRestoreFilesOwnedByRoot.md
Last active December 24, 2022 00:50
macOS Time Machine: restoring files owned by root

macOS Time Machine: restoring files owned by root

when you own the file …

On macOS, Time Machine pretty much just works. You delete or mutilate a file. Then you realise you want to get back to the older version so you:

  1. Use the Finder to open the folder containing the file you want to restore.
  2. Choose "Enter Time Machine" from the Time Machine menu.
  3. Step back in the timeline until you find the version you want to restore.
@Paraphraser
Paraphraser / Logging CPU Temperatures.md
Created August 22, 2021 14:05
IOTstack Tutorial: Logging CPU Temperatures

IOTstack Tutorial: Logging CPU Temperatures

introduction

This gist answers a Discord question. It explains my approach to collecting CPU temperatures by sending the data as an MQTT payload.

I like to think of this approach as working with the MING (Mosquitto, InfluxDB, Node-RED, Grafana) paradigm rather than fighting against it (eg using approaches like SSH calling out of the Node-RED container).

The approach is not tied to the Raspberry Pi that is running IOTstack. If you have several Raspberry Pis, they can all log their temperatures to the Raspberry Pi running IOTstack using exactly the same mechanism.

@Paraphraser
Paraphraser / IOTstack tutorial – adding a second drive.md
Last active March 23, 2023 11:32
IOTstack tutorial - adding a second drive

IOTstack tutorial – adding a second drive

Problem statement

This issue has come up a few times on Discord. The question can be summarised like this:

My existing IOTstack installation is running out of space on my primary drive. I have another drive. How do I move the "volumes" directory to the new drive?

This example is based on a Raspberry Pi 4 which is booting from a 500GB USB3 SSD. I will show you how to use a 32GB USB3 "thumb drive" as the secondary drive and move ~/IOTstack/volumes onto it.

@Paraphraser
Paraphraser / power_monitor_poc.md
Last active June 3, 2021 00:48
UPS monitor - back end - proof of concept

UPS monitor - back end - proof of concept

Assumptions

  • There exists a mechanism (unspecified) for acquiring status information from an Uninterruptible Power Supply;
  • That mechanism is available to Node-RED; and
  • There exists a Node-RED flow (unspecified) that is capable of interpreting the UPS status information and making decisions about when devices should power down and in what order.

Task Goal

@Paraphraser
Paraphraser / Docker+OctoPrint - When your 3D printer turns on and off.md
Last active April 16, 2024 06:28
IOTstack+OctoPrint: When your 3D printer turns on and off

octoprint-docker: when your 3D printer turns on and off

Task goals

  • Keep the OctoPrint Docker container service running even when your printer is switched off:

    • GCODE files can still be uploaded
    • Plugins can still be updated