Skip to content

Instantly share code, notes, and snippets.

@sport4minus
sport4minus / brennenstuhl_control.py
Created February 21, 2023 19:37
python script to control a Brennenstuhl Premium-Web-Line V3
# Brennenstuhl Premium-Web-Line V3 is a socket strip with an embedded web server.
# It can be switched via a web interface or using http get requests. The latter is a bit under-documented,
# so here's what i found out:
# The built-in server accepts only authenticated http get requests (using digest auth).
# each command has its own url, like so: http://{IP-OF-THE-SOCKETSTRIP}/cgi/{commandname}?params
# full list can be found in a PDF called "Premium-Web-Line V3 CGI specification.pdf" which is included in the download package of the official software:
# download link -> https://www.brennenstuhl.com/index.php?module=explorer&index[explorer][action]=download&index[explorer][file]=firmware/premium-web-line-v3-software-3_3_6.zip
# here's an example on how to toggle one of the two relais (nr. 0)
# modified a general digest auth example from stackoverflow: https://stackoverflow.com/questions/23254013/http-digest-basic-auth-with-python-requests-module
@sport4minus
sport4minus / getmyips.sh
Created January 31, 2024 07:54
shell script to quickly list ip adresses of interfaces
for ifname in `ipconfig getiflist`; do echo $ifname: `ipconfig getifaddr $ifname`; done
@sport4minus
sport4minus / index.html
Created May 6, 2025 07:09
Use three.js in a p5js sketch - render into p5js graphics offscreen buffer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Three Five</title>
<link rel="stylesheet" type="text/css" href="style.css">
<!-- assume local copies of p5js and three -->