Skip to content

Instantly share code, notes, and snippets.

View gilankpam's full-sized avatar
🏸
Focusing

Gilang gilankpam

🏸
Focusing
View GitHub Profile
@gilankpam
gilankpam / motion_light_switch.yaml
Last active April 29, 2023 16:27
HA motion activated light with switch
blueprint:
name: Motion-activated Light Switch
description: Turn on a light when motion is detected.
domain: automation
source_url: https://gist.github.com/gilankpam/8835ad03329c16066e1046cb9ab4c698
author: Home Assistant
input:
motion_entity:
name: Motion Sensor
selector:
@gilankpam
gilankpam / convert.py
Created June 15, 2023 19:03
yolov8 rk3588
from rknn.api import RKNN
ONNX_MODEL = 'yolov8m.onnx'
RKNN_MODEL = 'yolov8m.rknn'
DATASET = './dataset.txt'
QUANTIZE_ON = True
if __name__ == '__main__':
# Create RKNN object

Xiaomi Smart devices only accept command from the same subnet. This is openwrt configuration I used to fix that.

iot is the smart devices subnet, including xiaomi devices

192.168.10.8 is my Home Assistant IP

192.168.88.232 is xiaomi device IP

uci add firewall nat # =cfg1793c8
@gilankpam
gilankpam / epever.yaml
Created December 22, 2023 06:31
ESPHome Epever
esphome:
name: solar-monitor
friendly_name: solar-monitor
platformio_options:
## larger stack size required with all registers enable_load_test
## reduce registers or wait for integration of 2.0.0 arduinoespressif32
## not yet working needs 2.0
build_flags:
- -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768
@gilankpam
gilankpam / gist:e53725680a87244aa2df039fcdec8ce8
Created December 21, 2025 16:26
Set usb otg on radxa zero 3 to host
dtc -I dtb -O dts -o current.dts /boot/dtb/rockchip/rk3566-radxa-zero3.dtb
Change dr_mode = "otg"; to dr_mode = "host";.
dtc -I dts -O dtb -o /boot/dtb/rockchip/rk3566-radxa-zero3.dtb current.dts
@gilankpam
gilankpam / README.md
Last active March 27, 2026 14:55
OpenIPC long range config

The changes on wlan_adapters.yaml is I increased the maximum power on bl-m8812eu2 card to 3100 on mcs 1 & 0