Skip to content

Instantly share code, notes, and snippets.

View jannegpriv's full-sized avatar
🏠
Working from home

Jan Gustafsson jannegpriv

🏠
Working from home
  • Stockholm
View GitHub Profile
@jannegpriv
jannegpriv / sd_card_wifi_ssh_access_raspberry.md
Last active October 17, 2020 15:51
WiFi and SSH access to Raspberry via SD card

Adding WiFi and SSH access to Raspberry via SD card

  1. Insert the SD card into a USB card reader, and plug it into your Mac
  2. Navigate to /boot partition using you OS file explorer (On MAC /Volumes/boot)
  3. Create a file on /boot named wpa_supplicant.conf
  4. Add the following content to the file:
country=SE # Your 2-digit country code
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Boot Raspberry Pi 4 from USB device

  1. Use Raspberry PI Imager to flash latest Raspberry Pi OS Lite (32-bit) on a SD card
  2. Add ssh support and WiFi (if not using wired), follow this gist for instructions
  3. Plug the SD card in your Pi 4 and power it up and ssh to it
  4. Update your OS and firmware by issuing:
sudo apt update
sudo apt full-upgrade
@jannegpriv
jannegpriv / jmx_agent_openhab_mission_control.md
Last active November 21, 2020 21:07
Configure JMX agent on openHAB to be able to run misison control

Configure JMX agent on openHAB to be able to run misison control

  1. Add the following lines to /etc/default/openhab2: (NOTE: Xmx/Xms is also set to 1024m in this example)
#########################
## JAVA OPTIONS
## Additional options for the JAVA_OPTS environment variable.
## These will be appended to the execution of the openHAB Java runtime in front of all other options.
## 
@jannegpriv
jannegpriv / mosquitto_bridging_tls.md
Last active November 27, 2020 22:54
Configure Mosquitto bridging with TLS

Configure Mosquitto bridging with TLS

The use-case for me is to connect my openHAB installation at our summer house with my production openHAB installation. The summer house openHAB instance will then just act as a slave to the production system and is connected using the MQTT binding and the MQTT Event Bus (Now replaced by the openHAB remote binding).

To be able to connect a remote Mosquitto instance to a central Mosquitto instance you need to configure the remote Mosquitto as a bridge and the central Mosquitto will then be the broker.

Broker side

@jannegpriv
jannegpriv / k3s_traefik_dashboard_activation.md
Last active December 8, 2021 20:30
k3s traefik dashboard activation

Installation steps for K3s traefik dashboard

The steps below requires that you have followed the installation steps for installing K3s on RPIs.

NOTE: The following file can be found in the following repository.

Installation steps for K3s traefik dashboard. On master node, create a folder called k3s-traefik:

Open Helm file:

@jannegpriv
jannegpriv / traefik_letsencrypt_basic_auth.md
Last active September 23, 2022 14:03
K3s and Traefik with Let's encrypt and basic authentication

K3s and Traefik with Let's encrypt and basic authentication

The steps below requires that you have followed the installation steps for installing K3s on RPIs.

Prerequisites

Ensure that you have a DNS hostname that can be resolved on Inet:

$ dig +short oh.domain.se