Skip to content

Instantly share code, notes, and snippets.

🐙
Working full time on OctoPrint

Gina Häußge foosel

🐙
Working full time on OctoPrint
View GitHub Profile
@foosel
foosel / m33_storm.py
Last active Jul 13, 2020
Requests long names for files on printer's SD card via M33. OctoPrint 1.4.2+. No maintenance, no support.
View m33_storm.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import octoprint.plugin
import octoprint.events
import octoprint.util.comm
class M33StormPlugin(octoprint.plugin.EventHandlerPlugin):
def __init__(self):
self._active = False
View bot-commands-on-the-octoprint-discord.md

Bot Commands on the OctoPrint Discord Server

  • ?role: Get an overview of the available roles (teams, ranks) you can join. Only allowed in #bot-commands
  • ?role <role>: Join joinable role. Only allows in #bot-commands
  • ?ranks: Alias for ?role
  • ?rank <rank>: Alias for ?role <role>
  • ?tags: List registered tags (short hand links and messages)
  • ?tag <tag>: Request content of tag tag
  • ?whois <user>: Get information about user. Only allowed in #bot-commands
  • ?membercount: Get the server membercount. Only allowed in #bot-commands
@foosel
foosel / Dockerfile
Last active May 12, 2019
Simple Dockerfile & composition to run a speedtest2mqtt setup using speedtest-rs from https://github.com/nelsonjchen/speedtest-rs
View Dockerfile
FROM rust:1.31
WORKDIR /usr/src
RUN git clone https://github.com/nelsonjchen/speedtest-rs
WORKDIR ./speedtest-rs
RUN cargo install --path .
ADD entrypoint.sh /opt/speedtest2mqtt.sh
RUN apt-get update && \
@foosel
foosel / Dockerfile
Created May 12, 2019
Simple Dockerfile & composition to run a speedtest2mqtt setup using speedtest-go from https://github.com/showwin/speedtest-go
View Dockerfile
FROM alpine:3.7
ADD entrypoint.sh /opt/speedtest2mqtt.sh
COPY speedtest-go /usr/bin/speedtest-go
RUN apk update && \
apk add ca-certificates mosquitto-clients && \
rm -rf /var/cache/apk/* && \
chmod 777 /opt/speedtest2mqtt.sh
@foosel
foosel / rewrite_wait_to_busy.py
Last active Jul 25, 2020
OctoPrint plugin that rewrites received wait responses to echo:busy processing for broken firmware misunderstanding when wait should be used. Place in ~/.octoprint/plugins
View rewrite_wait_to_busy.py
# coding=utf-8
import logging
def rewrite_wait_to_busy(comm_instance, line, *args, **kwargs):
if line == "wait" or line.startswith("wait"):
return "echo:busy processing"
else:
return line
@foosel
foosel / strip_m110_parameter.py
Created Jan 11, 2018
OctoPrint plugin that strips any parameters from M110 commands to work around firmware quirks. Manually place in ~/.octoprint/plugins
View strip_m110_parameter.py
# coding=utf-8
def strip_M110_parameter(comm_instance, phase, cmd, cmd_type, gcode, subcode=None, *args, **kwargs):
if gcode != "M110":
return
return "M110" # make sure we always just send M110, no N parameters or anything else
__plugin_name__ = "Strip M110 Parameters"
__plugin_description__ = "Strips any parameters from M110 commands to work around firmware quirks"
__plugin_author__ = "Gina Häußge"
@foosel
foosel / liberapay_per_month.js
Last active Dec 14, 2017
Small user script to be used with something like TamperMonkey that will add a tooltip to the "x receives y per week from z patrons" that provides the amount per month. Currently only works with the english locale of liberapay.
View liberapay_per_month.js
// ==UserScript==
// @name Liberapay donations per month
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hovering over the "user receives ... per week from ... patrons" will now show the received amount per month. Currently only works for the english version since it matches the header line via the contained text - couldn't find better attributes for that.
// @author Gina Häußge <osd@foosel.net>
// @match https://liberapay.com/*
// @grant none
// ==/UserScript==
@foosel
foosel / README.md
Created Mar 7, 2017
OctoPrint settings for BQ Hephestos 2
View README.md

OctoPrint settings for BQ Hephestos 2

Printer Profile

Print volume:

  • width: 210
  • depth: 297
  • height: 220
@foosel
foosel / README.md
Last active Jun 25, 2020
Patron Export Helper
View serial.log
2014-10-23 16:58:02,141 - SERIAL - DEBUG - Enabling serial logging
2014-10-23 16:58:09,247 - SERIAL - DEBUG - Changing monitoring state from 'Operational' to 'Closed'
2014-10-23 16:58:13,303 - SERIAL - DEBUG - Connection closed, closing down monitor
2014-10-23 16:58:16,878 - SERIAL - DEBUG - Changing monitoring state from 'Offline' to 'Opening serial port'
2014-10-23 16:58:16,883 - SERIAL - DEBUG - Connecting to: /dev/ttyAMA0
2014-10-23 16:58:16,922 - SERIAL - DEBUG - Connected to: Serial<id=0x1ad8fb0, open=True>(port='/dev/ttyAMA0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=20.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2014-10-23 16:58:16,926 - SERIAL - DEBUG - Changing monitoring state from 'Opening serial port' to 'Connecting'
2014-10-23 16:58:36,974 - SERIAL - DEBUG - Send: M105
2014-10-23 16:58:37,000 - SERIAL - DEBUG - Recv: ok T:21.5 /0.0 B:21.1 /0.0 @:0%
2014-10-23 16:58:37,005 - SERIAL - DEBUG - Changing monitoring state from 'Connecting' to 'Operational'
You can’t perform that action at this time.