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 / 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 / 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 / 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 / 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 / ComposeProfiles.md
Created October 18, 2022 05:00
Understanding compose profiles

IOTstack: Understanding compose profiles

You are probably familiar with running a command like:

$ docker-compose up -d

You probably expect that command to bring up a container for every service definition mentioned in your docker-compose.yml. That's its default behaviour.

@Paraphraser
Paraphraser / InfluxDB-data-merging.md
Created November 29, 2022 05:36
IOTstack tutorial: InfluxDB data merging

IOTstack tutorial: InfluxDB data merging

Scenario

A question on Discord described a situation where a new (empty) database had been created. That database contained data acquired since the rebuild but had no historical data prior to the rebuild. However, the person did have a "portable" backup of the older data and wanted to know if it was possible to merge the backup with the live data?

The answer is "yes". Merging measurements will solve this particular problem.

My test environment

@Paraphraser
Paraphraser / IOTstack tutorial - local reversion.md
Created December 12, 2022 23:42
IOTstack tutorial : local image reversion

IOTstack tutorial : local image reversion

One of the main advantages of running services in Docker containers is the relative ease of reverting to the last-known-good container.

One of the biggest problems with reverting to the last-known-good container arises if you don't already know the tag of the image you want to revert to. Sometimes it can be a bit tricky to figure it out. You usually need to go to the container's "tags" page on DockerHub, sort through the update history for your architecture, pick the appropriate tag, edit your compose file to specify that tag, and then, in the words of the old Knight in the third Indiana Jones movie, hope that you have "chosen wisely".

Your chances of choosing wisely are inversely proportional to the amount of panic you're feeling after you realise a key container isn't working and reverting is your best strategy. Panic is the enemy of clear thinking and reasoning.

There is, however, another way. The method described here means you retain the last-known-

@Paraphraser
Paraphraser / IOTstack-NodeRED-pigpiod.md
Last active February 15, 2023 04:13
IOTstack + Node-RED + pigpiod

IOTstack + Node-RED + pigpiod

Problem Statement

The following problem was reported on the IOTstack Discord channel:

Today I rebuild my IOTstack from scratch using the Pibuild process and after restoring my nodered flows I noticed that my serials and GPIO are not connecting anymore.

I don't use node-red-node-pi-gpiod myself but I have been able to reproduce the problem.

@Paraphraser
Paraphraser / Compiling GoSungrow.md
Last active May 2, 2024 04:02
Compiling GoSungrow

Updating GoSungrow

This gist is intended to help you deal with the following error messages:

  • Error: appkey is incorrect 'er_invalid_appkey
  • Error: unknown error 'Request is not encrypted'

This gist has four parts. The instructions you should follow depend on what you want to do:

| Part | Explains how to |

@Paraphraser
Paraphraser / ZeroTier-macOS-menu-bar.md
Created June 16, 2023 06:12
ZeroTier GUI controls in the macOS (Ventura) menu bar

On ZeroTier, macOS and the menu bar

Over at the ZeroTier forum is a thread:

The thread covers two distinct problems:

  1. The ZeroTier One.pkg package downloaded from ZeroTier.com won't install on macOS Ventura.
  2. The package installs but the associated app won't start and the menu bar item is not present.