Skip to content

Instantly share code, notes, and snippets.

@fbradyirl
fbradyirl / sigen_modbus_card.yaml
Last active September 17, 2024 09:01
Recreate Sigenergy UI (using modbus sensors) as Home Assistant Card
type: custom:button-card
show_state: true
tap_action: none
custom_fields:
home_image:
card:
type: picture
image: local/Sigenergy/home_has_solar_has_car.png
card_mod:
style: |
@fbradyirl
fbradyirl / hassio_idkravitz_default_strategy.py
Created May 17, 2021 16:20
hassio_idkravitz_default_strategy
import random
import sys
import time
import os
import json
from datetime import datetime, timezone
from binance_trade_bot.auto_trader import AutoTrader
from binance_trade_bot.models import Trade
@fbradyirl
fbradyirl / heating.yaml
Last active June 7, 2024 17:44 — forked from r3mcos3/heating.yaml
Home Assistant Blueprint For Heating
blueprint:
name: Heating Control
description: Control your heating with options for group home, if temp is below
a specific value, set temp, and heating between specific times.
domain: automation
input:
heating:
name: Climate Device
description: The climate device to use.
selector:
@fbradyirl
fbradyirl / PendingView.swift
Created July 23, 2020 12:39
SwiftUI Wrapper for a view which is pending real data. Uses new .redacted(reason: .placeholder) in SwiftUI for iOS 14, macOS 11
//
// PendingView.swift
// Dream Stream
//
// Created by Finbarr Brady on 23/07/2020.
//
import SwiftUI
struct PendingView<Content: View>: View {

Before

sudo apt-get update
sudo apt-get upgrade

Install Docker

Basic

Tested on 17.10 Artful

@fbradyirl
fbradyirl / install_go_sms_enhancements.sh
Last active December 23, 2016 13:18
These are the commands to run to get the latest sms enhancements by jhend on rooter. Only run on Golden Orb release.
opkg update
opkg install ca-certificates
wget --no-check-certificate -O /usr/lib/sms/delsms.sh https://raw.githubusercontent.com/ROOterDairyman/ROOter/sms_enhancements/ext-sms/files/usr/lib/sms/delsms.sh
wget --no-check-certificate -O /usr/lib/sms/processsms https://raw.githubusercontent.com/ROOterDairyman/ROOter/sms_enhancements/ext-sms/files/usr/lib/sms/processsms
wget --no-check-certificate -O /usr/lib/sms/sendsms.lua https://raw.githubusercontent.com/ROOterDairyman/ROOter/sms_enhancements/ext-sms/files/usr/lib/sms/sendsms.lua
wget --no-check-certificate -O /usr/lib/sms/smsread.lua https://raw.githubusercontent.com/ROOterDairyman/ROOter/sms_enhancements/ext-sms/files/usr/lib/sms/smsread.lua
wget --no-check-certificate -O /usr/lib/sms/pack7bit.lua https://raw.githubusercontent.com/ROOterDairyman/ROOter/sms_enhancements/ext-sms/files/usr/lib/sms/pack7bit.lua
wget --no-check-certificate -O /usr/lib/sms/smsout.lua https://raw.githubusercontent.com/ROOterDairyman/ROOter/sms_enhancements/ext-sms/files/usr/lib/sm
@fbradyirl
fbradyirl / hkc.py
Created June 2, 2016 14:11
Parse Alarm Events from HKC panel and push notify
# Script to parse serial output from HKC alarm panel board.
# When an event is parsed, notify via PushBullet.
#
# Converted from perl here http://www.boards.ie/vbulletin/attachment.php?attachmentid=3558$
# See post #21 in this thread http://www.boards.ie/b/thread/2057414902/2?
#
# Requires:
# pip install pyserial
# pip install pushbullet.py
@fbradyirl
fbradyirl / forwardsms.sh
Last active May 13, 2016 09:05
Modified version of kario's script from http://whrl.pl/ReAdkH
#######################
#EMAIL SMS IN ROOTER #
#######################
#
#name this file to /usr/lib/sms/forwardsms.sh
#insert the following lines between "uci commit modem" and "fi" of the loop in file /usr/lib/sms/processsms
#if [ -e /usr/lib/sms/forwardsms.sh ]; then
# from https://nyman.re/post/reading-and-sending-sms-with-gcom-and-huawei/
# send using this command:
# gcom -d /dev/ttyUSB0 -v -e -s sendsms.comgt
# Ensure you fill in your phone number below or it wont send!
opengt
# set the terminal settings
set com 115200n81
# echo commands
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=10
# From https://forum.openwrt.org/viewtopic.php?id=63104
# With Kernel 4.2 or newer, this hack shouldnt be needed. See https://lists.freedesktop.org/archives/modemmanager-devel/2016-January/002489.html
boot() {