Skip to content

Instantly share code, notes, and snippets.

@samwiseg0
samwiseg0 / bambu-ssdp-discovery.py
Created January 26, 2025 22:12 — forked from Alex-Schaefer/bambu-ssdp-discovery.py
Python implementation to send a fake SSDP discovery message to Bambu Studio or Orca Slicer
# Derived from this: https://github.com/gashton/bambustudio_tools/blob/master/bambudiscovery.sh
# Python implementation without need for linux
# Send the IP address of your BambuLab printer to port 2021/udp, which BambuStudio is listens on.
# Ensure your PC has firewall pot 2021/udp open. This is required as the proper response would usually go to the ephemeral source port that the M-SEARCH ssdp:discover message.
# But we are are blindly sending a response directly to the BambuStudio listening service port (2021/udp).
# Temporary solution to BambuStudio not allowing you to manually specify the Printer IP.
# Usage:
@samwiseg0
samwiseg0 / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active September 21, 2023 14:20 — forked from sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@samwiseg0
samwiseg0 / ss_ps_fil_to_orca_fil.py
Last active January 18, 2025 21:57
Convert SuperSlicer/PrusaSlicer filament profiles to OrcaSlicer
# -*- coding: utf-8 -*-
import argparse
import configparser
import json
import os
def sanitize_value(value):
# Remove leading and trailing whitespaces, including newline characters
value = value.strip()
# Remove any extra quotes or escape characters
@samwiseg0
samwiseg0 / Configuration.h
Created February 10, 2021 02:50
Ender 5 Pro - v4.2.2 - Marlin 2.0.7.2 - BLTouch - bigtreetech Smart filament sensor
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
@samwiseg0
samwiseg0 / wait_kill_paused_notify.py
Last active September 30, 2018 18:38
Simplified kill paused stream script for Taultulli
'''
Please use https://github.com/blacktwin/JBOPS/tree/master/killstream
'''

Keybase proof

I hereby claim:

  • I am samwiseg00 on github.
  • I am samwiseg0 (https://keybase.io/samwiseg0) on keybase.
  • I have a public key whose fingerprint is 0129 AAA1 C4E2 B0CA 612E 5BB6 06B6 E924 8D4C 29E7

To claim this, I am signing this object: