Skip to content

Instantly share code, notes, and snippets.

View tubalainen's full-sized avatar

tubalainen

View GitHub Profile
@tubalainen
tubalainen / wsjtx_to_cloudlog.py
Created June 13, 2022 10:57
WSJT-X to Cloudlog wrapper
#!/bin/env python3
"""
WSJT-X to Cloudlog QSO uploader.
This script reads QSO events from the WSJT UDP server and uploads the ADIF records to Cloudlog.
No non-standard library packages are required to run this.
usage: wsjt_cloudlog.py [-h] [--wsjt-port WSJT_PORT] [--wsjt-host WSJT_HOST] [--verbose] url api_key station_id
positional arguments:
@tubalainen
tubalainen / octoprint_script
Created February 1, 2022 13:09
Script for octoprint
status_3d_printer:
alias: Status 3D-skrivaren
sequence:
- data:
entity_id: media_player.gh_hub_kontor
volume_level: '0.6'
service: media_player.volume_set
- delay: 00:00:02
- service: tts.google_translate_say
data_template:
@tubalainen
tubalainen / postnord_kommer_idag.yaml
Last active February 2, 2022 12:46
Postnord API - kommer posten idag?
## Detta är en "packagefil" för Home Assistant för att kunna skapa en rutin i Google Home för att ställa frågan
## "Hey Google, Kommer posten idag"?
## Editera "media_player" nedan så att det passar dina behov
## Editera också postnummret för din ort (står XXXXX nu)
##
## För att skapa en rutin kopplat till ett script i Home Assistant krävs att din HA är ihopkopplad med Google. Kör en "Hej Google, synca mina enheter"
## I Googlehome appen lägger du till en ny rutin
## - Välj "Utlösarfras", typ "Kommer posten idag?"
## - Välj åtgärd - "Justera ljussättning"
## - Tryck "Spara"
@tubalainen
tubalainen / displaylabb.yaml
Last active July 9, 2023 16:39
ESPHome with display SSD1306 OLED display
esphome:
name: displaylabb
platform: ESP8266
board: d1_mini
wifi:
ssid: 'meh'
password: 'bbeeeh'
ap:
ssid: "DisplabbFallback Hotspot"
@tubalainen
tubalainen / gist:19103e725c1d7331bc16eae130a6757d
Created June 10, 2021 12:49
ESPHome - SSD1306 display example
esphome:
name: display_hall
platform: ESP8266
board: nodemcuv2
wifi:
manual_ip:
static_ip: 192.168.XX.XX
gateway: 192.168.XX.1
subnet: 255.255.255.0
@tubalainen
tubalainen / gist:f88e78d0e97aebe67c35fd63b9fc7f79
Last active April 26, 2024 12:32
ESP8266 GPS Tracker user Tasmota GPS and Home Assistant
# GPS tracker for Home Assistant using Tasmota
## The GPS module
Get your self an ESP8266 and a GPS module, for GPS module I do recommend the NEO-6M module: https://www.aliexpress.com/item/1005002579586721.html
## The Tasmota firmware
The Tasmota firmware is based on the "basic" setup with the enabled options '#define USE_GPS' and '#define USE_FLOG' set
It you want to download a pre-compiled version, it is available here: https://www.pucebaboon.com/TASMOTA/
Download and flash Tasmota-GPS.bin, configure the GPS RX/TX pins (I use D1 and D2), wifi, mqtt and device name
@tubalainen
tubalainen / gist:117f5c528b6a46159a5491d39de75bbe
Created May 5, 2021 12:33
Google Home "Where is Helga" routine script/package
sensor:
- platform: template
sensors:
helga_laddar_last_changed:
friendly_name: 'Helga Laddar Last Changed'
value_template: >
{%- set time = (as_timestamp(now()) - as_timestamp(states.binary_sensor.helga_laddar.last_changed)) | int %}
{%- set minutes = ((time % 3600) // 60) %}
{%- set minutes = '{} minuter '.format(minutes) if minutes > 0 else '' %}
{%- set hours = ((time % 86400) // 3600) %}
@tubalainen
tubalainen / gist:7d66ba22e6e26fd8d7ba08df889cc897
Created April 24, 2021 11:55
TTGO - ESPHOME example code
esphome:
name: ttgotcam01
platform: ESP32
board: esp-wrover-kit
wifi:
manual_ip:
static_ip: 192.168.xx.xx
gateway: 192.168.xx.1
subnet: 255.255.255.0
@tubalainen
tubalainen / package_blue_iris.yaml
Last active June 11, 2021 05:53
Instructions/readme.MD
**Frigate - Home Assistant - Blue Iris NVR automation example**
The basics:
Blue Iris is a normal "dumb" NVR software that records several camera RTSP streams and present it to an API and a number of user interfaces. There isnt any great local AI features built in, it normally triggers motion based on "motion detection" (that would be considered somewhat advanced). There´s a lot of false positives causing the NVR event recording to be somehwat useless. Yes, I know, there are several ways to tweak and fix this to lessen the false positives.
There are quite a community around the Blue Iris software and there are other stabs at making local AI such as the "aitool" with Deepstack.
I got inspired by the video from "The Hookup" on youtube explaining the setup with the "aitool" and Deepstack. I tried it and it works - ish.
Link to the hookups video with all Blue Iris configuration: https://www.youtube.com/watch?v=fwoonl5JKgo
### ESPHome koden för mina fyra reläer. Baserat på en Wimos D1 Mini (ESP8266)
esphome:
name: bevattningskontroller_01
platform: ESP8266
board: d1_mini
wifi:
ssid: 'ssid'
password: 'hemligt'
ap: