Skip to content

Instantly share code, notes, and snippets.

@simonsickle
simonsickle / bf-chirp-uv5r-chans.csv
Created October 20, 2022 06:25
BTECH UV5R Settings
Location Name Frequency Duplex Offset Tone rToneFreq cToneFreq DtcsCode DtcsPolarity Mode TStep Skip Comment URCALL RPT1CALL RPT2CALL DVCODE
0 FRS1PL 462.562500 0.000000 TSQL 67.0 67.0 023 NN NFM 5.00 S
1 FRS 1 462.562500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
2 FRS 2 462.587500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
3 FRS 3 462.612500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00
4 FRS 4 462.637500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
5 FRS 5 462.662500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
6 FRS 6 462.687500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
7 FRS 7 462.712500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
8 FRS 8 467.562500 0.000000 Tone 67.0 88.5 023 NN NFM 5.00 S
@simonsickle
simonsickle / fix-tesla-wc-vitals.py
Created September 23, 2022 05:42
Tesla WC Gen3 vitals tries to send a string longer than the allocated 512 bytes
#!/bin/env python3
import json
import re
good_json = '{"contactor_closed":false,"vehicle_connected":true,"session_s":25034,"grid_v":241.1,"grid_hz":59.804,"vehicle_current_a":0.0,"currentA_a":0.0,"currentB_a":0.0,"currentC_a":0.0,"currentN_a":0.0,"voltageA_v":2.1,"voltageB_v":2.1,"voltageC_v":2.1,"relay_coil_v":11.9,"pcba_temp_c":27.9,"handle_temp_c":24.8,"mcu_temp_c":31.5,"uptime_s":1437510,"input_thermopile_uv":-145,"prox_v":0.0,"pilot_high_v":8.7,"pilot_low_v":-11.7,"session_energy_wh":1492.500,"config_status":5,"evse_state":4,"current_alerts":[]}'
bad_json = '{"contactor_closed":true,"vehicle_connected":true,"session_s":25390,"grid_v":237.3,"grid_hz":59.799,"vehicle_current_a":48.5,"currentA_a":22.2,"currentB_a":26.2,"currentC_a":25.8,"currentN_a":22.7,"voltageA_v":243.2,"voltageB_v":243.5,"voltageC_v":119.9,"relay_coil_v":6.0,"pcba_temp_c":28.1,"handle_temp_c":25.0,"mcu_temp_c":32.2,"uptime_s":1437866,"input_thermopile_uv":-177,"prox_v":1.5,"pilot_high_v":-0.0,"pilot_low_v":-0.0,"session_energy_wh":154
@simonsickle
simonsickle / owlet-homeassistant-influxdb-grafana-dash.json
Last active August 2, 2022 07:11
A config (with queries) to show owlet data on a dashboard
{
"__inputs": [
{
"name": "DS_INFLUXDB",
"label": "InfluxDB",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
},
@simonsickle
simonsickle / mac.sh
Created September 26, 2020 00:55
Building Android Emulator Develop Branch
# Get the google repo tool - you can skip if you already have it
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo && chmod +x /usr/local/bin/repo
# Get the code, will take some time. Probably best to go get a coffee here or run on a server if you have poor internet
mkdir -p $HOME/emu-master-dev && cd $HOME/emu-master-dev
repo init -u https://android.googlesource.com/platform/manifest -b emu-master-dev
repo sync -j8
# Get XCode 10.1 - required
https://download.developer.apple.com/Developer_Tools/Xcode_10.1/Xcode_10.1.xip