Skip to content

Instantly share code, notes, and snippets.

View jonmunson's full-sized avatar

Jon Munson jonmunson

View GitHub Profile
@jonmunson
jonmunson / awtrix-home-battery-charge-foxess.yaml
Created January 13, 2026 14:20
FoxESS home battery SoC (state of charge) pushed from Home Assistant to an Awtrix custom app over MQTT. The automation reads the battery’s SoC and infers charging/discharging/idle from FoxESS charge/discharge power, then publishes a matching icon plus a progress bar so the clock shows a live battery % at a glance.
alias: Awtrix Home Battery Charge (FoxESS)
description: Publishes FoxESS battery SoC to an AWTRIX 3 Custom App via MQTT
mode: single
trigger:
- alias: Matrix turned on
platform: state
entity_id: light.awtrix_1c7378_matrix
to: "on"
@jonmunson
jonmunson / awtrix-home-battery-charge-flow.yaml
Last active January 6, 2026 16:32
Displays the battery percentage of your home battery. The icon will vary based on the battery percentage and the battery operation mode (charge/discharge/standby). Icons need to be downloaded from Lametric or provided by yourself. You will need a HA entity for the battery charge and one for the battery mode. Adapt percentages and modes to your l…
alias: Awtrix Home Battery Charge
description: Publishes the current home battery charge to the Awtrix clock
triggers:
- alias: Matrix turned on
trigger: state
entity_id: light.awtrix_xxxxxx_matrix
to: "on"
- alias: Charge level/mode changes
trigger: state
entity_id:
@jonmunson
jonmunson / AWTRIX-Solar-Energy-Monitor.yaml
Last active December 31, 2025 15:18
This blueprint will show the current solar energy received.
---
blueprint:
name: AWTRIX Solar Energy Monitor
description: >
This blueprint will show the current solar energy received.
It uses a icons 54156 (solar-green), 50557 (solar-white-dyn), 50546 (solar-static) that you need to install.
domain: automation
input:
@jonmunson
jonmunson / octopus-free-electricty-session.yaml
Last active October 24, 2025 18:03
🐙 Free Electricity session blueprint
blueprint:
name: Octopus Energy Free Electricity Session Manager (Interactive)
description: >
Automatically manage devices during Octopus Energy free electricity sessions with optional confirmation prompts.
Charges batteries, controls heating based on temperature, and runs dehumidifiers when needed.
domain: automation
input:
calendar_entity:
name: Free Electricity Calendar
description: Your Octopus Energy free electricity session calendar
@jonmunson
jonmunson / install_lamp_vhosts_git.sh
Created August 22, 2024 13:35
LAMP stack with VHOST and GIT install script
#!/bin/bash
# Set the domain name as a variable
DOMAIN_NAME="example.com"
# Update the package index
echo "Updating package index..."
sudo apt update
# Install Apache

Keybase proof

I hereby claim:

  • I am jonmunson on github.
  • I am jonmunson (https://keybase.io/jonmunson) on keybase.
  • I have a public key ASCyXh8bPuIdNQf08yXQY7WH9bC4O-PwzV101feiryxXAgo

To claim this, I am signing this object:

@jonmunson
jonmunson / apache2.conf
Created April 16, 2017 18:15
Apache2 settings for optimum security - /etc/apache2/apache2.conf
<Directory /var/www/>
Options FollowSymLinks
AllowOverride None
Require all granted
Header always append X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
FileETag None
RewriteEngine On
RewriteCond %{THE_REQUEST} !HTTP/1\.1$
<?php wp_footer(); ?>
<?php if (!$user_ID) : ?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-9669661-12']);
_gaq.push(['_trackPageview']);
@jonmunson
jonmunson / prefetchbuilder.js
Created December 3, 2015 22:23 — forked from PaulKinlan/prefetchbuilder.js
Code to return link rel=dnsprefetch
(function() {
var requests = window.performance.getEntries();
var hosts = {};
var output = "";
for(var requestIdx = 0; requestIdx < requests.length; requestIdx++) {
var request = requests[requestIdx];
var origin = new URL(request.name).origin;
hosts[origin] = 1;
TRUNCATE dataflow_batch_export;
TRUNCATE dataflow_batch_import;
TRUNCATE log_customer;
TRUNCATE log_quote;
TRUNCATE log_summary;
TRUNCATE log_summary_type;
TRUNCATE log_url;
TRUNCATE log_url_info;
TRUNCATE log_visitor;
TRUNCATE log_visitor_info;