Skip to content

Instantly share code, notes, and snippets.

View blakadder's full-sized avatar

blakadder blakadder

View GitHub Profile
blueprint:
name: HASP Toggle Object
description: Link a HASP toggle object with an on/off entity
domain: automation
input:
target_entity:
name: Entity controlled by the button
description: Select an entity to bind with a pxbx toggle object.
selector:
@blakadder
blakadder / gist:c6a17e5b5cc7c8cd45b396af86c69b3e
Last active January 25, 2021 20:31
hasp-lvgl create page0 from jaffa sunrise
blueprint:
name: HASP Create Default Page
description: Create Jaffa Sunrise HASP pages
domain: automation
input:
plate:
name: HASP Plate Entity
description: Select an existing HASP plate
selector:
entity:
name: '%topic% Heater'
power_command_topic: "cmnd/%topic%/power1"
mode_state_topic: "tele/%topic%/STATE"
mode_state_template: "{%set m=value_json.POWER1%}{%if m=='OFF'%}off{%elif m=='ON'%}heat{%else%}Unknown{%endif%}"
modes:
- heat
- off
fan_mode_command_topic: "cmnd/%topic%/event"
fan_mode_state_topic: "%topic%/mode"
fan_modes:
{
"node_descriptor": "NodeDescriptor(byte1=2, byte2=0, mac_capability_flags=0, manufacturer_code=0, maximum_buffer_size=0, maximum_incoming_transfer_size=0, server_mask=0, maximum_outgoing_transfer_size=0, descriptor_capability_field=0, *allocate_address=False, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
"endpoints": {
"1": {
"profile_id": 49353,
"device_type": "0x0001",
"in_clusters": [
"0x0002",
"0x0003",
"0x0005"
{
"type":"urn:miot-spec-v2:device:heater:0000A01A:zhimi-na1:1",
"description":"Heater",
"services":[
{
"iid":1,
"type":"urn:miot-spec-v2:service:device-information:00007801:zhimi-na1:1",
"description":"Device Information",
"properties":[
{
@blakadder
blakadder / dumpsys_activity_starter
Created September 22, 2021 19:41
Android TV 11 dumpsys Kodi playing
ACTIVITY MANAGER STARTER (dumpsys activity starter)
mLastHomeActivityStartResult=2
mLastHomeActivityStartRecord:
packageName=com.google.android.tvlauncher processName=com.google.android.tvlauncher
launchedFromUid=0 launchedFromPackage=null launchedFromFeature=null userId=0
app=ProcessRecord{9b80ae5 1772:com.google.android.tvlauncher/u0a27}
Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10800100 cmp=com.google.android.tvlauncher/.MainActivity }
rootOfTask=true task=Task{801a13e #466 visible=false type=home mode=fullscreen translucent=true A=10027:.TvLauncher U=0 StackId=1 sz=1}
taskAffinity=10027:.TvLauncher
mActivityComponent=com.google.android.tvlauncher/.MainActivity
@blakadder
blakadder / k3d_k1_exploit.html
Created June 5, 2023 21:29
Creality K1 exploit method A (thanks to https://www.youtube.com/c/SorkinDmitry)
<html>
<head>
<title>K1 exploit for K3D Chat</title>
<script>
const patchedShadowStr = "root:$5$/iMbCgHty3$rM7UZICj9tmUe13BcAOUgVvpa.sSMV4k/t2Yes64ZZ9:::::::\ndaemon:*:::::::\nbin:*:::::::\nsys:*:::::::\nsync:*:::::::\nmail:*:::::::\nwww-data:*:::::::\noperator:*:::::::\nnobody:*:::::::\ndbus:*:::::::\n"
const patchedShadowBlob = new Blob([patchedShadowStr], { type: "text/plain" })
function sendPayload(payload,needAlert = true) {
var ip = document.getElementsByName("ip")[0].value