Skip to content

Instantly share code, notes, and snippets.

View psyciknz's full-sized avatar

psyciknz

  • NZ
View GitHub Profile
@psyciknz
psyciknz / Kv-withfw.yaml
Created March 12, 2023 20:37
Humio Parser template
name: Kv-withfw
tests:
- '{"@timestamp":"2023-03-13T08:50:43.847508+13:00","message":" time=\"2023-03-12T19:50:43Z\"
level=info msg=\"Note that the first check will be performed in 23 hours, 59 minutes,
59 seconds\"","host":"melkor","HOST":"melkor","severity":"err","facility":"user","syslogtag":"watchtower/cf3b2dbd4c2f[1167751]:","name":"watchtower","pid":"1167751"}'
- '{"SOURCE":"s_network_udp","PROGRAM":"brilliant_02-1910","PRIORITY":"notice","MESSAGE":"ESP-MQT:
sensors/tasmota/stat/brilliant_02/POWER = OFF","LEGACY_MSGHDR":"brilliant_02-1910
","HOST_FROM":"tasmota-1910","HOST":"tasmota-1910","FACILITY":"user","@timestamp":"2022-12-17T15:40:52+13:00"}'
- '{"SOURCE":"s_network_udp","PROGRAM":"backup-openmediavault/72419837d8","PRIORITY":"info","MESSAGE":"","LEGACY_MSGHDR":"backup-openmediavault/72419837d8
","HOST_FROM":"drogo","HOST":"drogo","FACILITY":"user","@timestamp":"2022-12-09T11:15:56+13:00"}'
@psyciknz
psyciknz / video-call-updater.ps1
Last active January 24, 2024 23:51
Power Shell script for updating Openhab, or Home Assistant via rest api. Uses a settings.json config to detect teams in a call or not
$SettingsObject = Get-Content -Path settings.json | ConvertFrom-Json
Write-Output "Start up"
Write-Output $SettingsObject
function Update-OpenHAB {
param([string]$item, [bool]$state)
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
#$headers.Add("Authorization", "Bearer " + $SettingsObject.openhabtoken)
$headers.Add("Content-Type", "text/plain")
@psyciknz
psyciknz / gist:8019e920ea716baf72b76b15b4f8b2a4
Last active March 15, 2022 19:58
Heating blueprint for time of day
blueprint:
name: Heating Control Time Period
description: Control your heating with for a particular time period
domain: automation
input:
heating:
name: Climate Device
description: The climate device to use.
selector:
entity:
2018-11-15 00:33:32 - INFO :: MainThread : Starting Tautulli v2.1.25
2018-11-15 00:33:32 - INFO :: MainThread : Linux 4.14.71-v7+ (#1145 SMP Fri Sep 21 15:38:35 BST 2018)
2018-11-15 00:33:32 - INFO :: MainThread : Pacific/Auckland (UTC+1300)
2018-11-15 00:33:32 - INFO :: MainThread : Python 2.7.14 (default, Dec 14 2017, 16:23:38)
[GCC 6.4.0]
2018-11-15 00:33:32 - INFO :: MainThread : Program Dir: /app/plexpy
2018-11-15 00:33:32 - INFO :: MainThread : Config File: /config/config.ini
2018-11-15 00:33:32 - INFO :: MainThread : Database File: /config/tautulli.db
2018-11-15 00:33:32 - ERROR :: MainThread : Could not create backups dir '/opt/Tautulli/backups': [Errno 13] Permission denied: '/opt'
2018-11-15 00:33:32 - WARNING :: MainThread : Falling back to backups dir '/config/backups'