- Vcc (White cable)
- Signal from cutter hall effect sensor
- Signal from filament detection hall effect sensor
- GND
- NTC (15k?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip3 install pycryptodome | |
# Encryption for the "http://carmin-backend.appspot.com/rs" URL paths | |
import base64 | |
from Crypto.Cipher import AES | |
from Crypto.Util.Padding import pad, unpad | |
class CarminURLEncryptor: | |
def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2024-05-13T03:03:36.8710082</Date> | |
<Author>LEO-FW16\LeoDJ</Author> | |
<URI>\ModernStandbyWorkaround</URI> | |
</RegistrationInfo> | |
<Triggers> | |
<EventTrigger> | |
<Enabled>true</Enabled> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ESPHome Configuration for Tuya Smart Life RGBW Controller (AP-Future) by LeoDJ | |
# https://s.click.aliexpress.com/e/_De97s2j | |
# Implemented using ESPHome package feature, for semi-easy configuration of multiple devices | |
packages: | |
common: !include common/tuya-ap-future-rgbw.yaml | |
substitutions: | |
node_name: "rgbw-example-device" | |
node_friendly_name: "RGBW Example Device" | |
api_key: !secret generic_api_key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Control a Partner Tech SP-850 cash drawer | |
# Needs root | |
import portio | |
import time | |
# request permission to I/O port range | |
portio.ioperm(0x5a8, 4, 1) | |
# Has to be 32bit access, otherwise the EC won't respond |
This is more of a note to myself / a try to give the problem a bit more SEO visibility, so please excuse the probably weird writing style and structure.
tl;dr at the bottom
- .PL extension is for "PrinterLeaf" files
- They start with the magic bytes
D0 4F 50 53
(ÐOPS
) - Commonly contain header strings like:
For:
/Printed on:
/From book:
/Document:
/Last saved on:
Name:
/Ausgedruckt:
/Aus dem Buch:
/Dokument:
/Zuletzt gespeichert:
- They start with the magic bytes
- And for my test file they contained references to font files like:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volume_down: | |
alias: Volume Down | |
description: Volume Down with user defined step size | |
fields: | |
entity_id: | |
selector: | |
entity: | |
domain: media_player | |
step: | |
default: 0.05 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick way to print a hexdump of a buffer. Output will look like this: | |
// | |
// 0 1 2 3 4 5 6 7 8 9 A B C D E F | |
// 0000 54 68 69 73 20 69 73 20 61 20 74 65 73 74 20 68 This is a test h | |
// 0010 65 78 64 75 6D 70 21 20 46 6F 6F 2E 20 01 02 03 exdump! Foo. ... | |
// 0020 04 . | |
inline void printHexdumpAscii(uint16_t index, uint8_t byte) { | |
if (index % 16 == 8) { // some spacing for orientation | |
printf(" "); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert raw data to integer | |
function getVar(inputBytes, offset, varLen, isSigned = false) { | |
let outVal = 0; | |
for (let i = 0; i < varLen; i++) { | |
outVal |= inputBytes[offset + i] << i * 8; | |
} | |
if (isSigned) { // parse as signed value | |
if (inputBytes[offset + varLen - 1] & 0x80) { // sign bit is set | |
outVal = ~(outVal) + 1; // calculate two's complement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Convert XPV/XDV files to binary (CSR Blueflash / Bluecore firmware files) | |
# Quickly hacked together by LeoDJ | |
import sys | |
import os | |
def xpv2bin(input_file, output_file): | |
with open(input_file) as f_in, open(output_file, "wb") as f_out: |
NewerOlder