May 2020 i’ve bought a Youless LS120, to monitor my electricity and gas, today i found out there is a android app .. Duh 🙂


May 2020 i’ve bought a Youless LS120, to monitor my electricity and gas, today i found out there is a android app .. Duh 🙂


Doing my work from home via Jitsi (Jabra headset) and Listening to music on my speakers. Sometimes i want to switch output. For example spotify on my headset.
Using below code, i can easily switch between output sinks.
#!/bin/bash
if [ -z "$1" ]; then
echo "DEVICE"
pactl list sinks | egrep "^Sink|Description" | sed 'N;s/\n/,/' |sed -e 's/\t/ /g' | cut -f2,5- -d" "
echo "APPLICATIONS"
pactl list sink-inputs | egrep -ie "^Sink|application.name" | grep -v "\-application-name" | sed 'N;s/\n/,/' | sed -e 's/\t/ /g' | sed -e 's/ / /g' | cut -f3,6- -d" "
echo "Usage: $0 APPID DEVICEID" >&2
exit 1
fi
pactl move-sink-input $1 $2
It shows output devices, and applications which are using audio sinks.
Just match them up.
(Todo : add photos/designs )
Amiga:
| Action Replay II | Owned since … 80s 90s? Modded this one, as part of my modular amiga system where i wanted to remake every part onto 10×15 euro prints. So i could swap things out for other boards. |
| Memory expansion | 512k .. missing in action Go a new one in … ? |
| Boot selector | Swaps df0 and df1 DIY version was a wirewrap ic socket with a cross switch, now i have a Gotek buffered switching module with can be actvated with a keystroke. (Gotek post) |
| Keyboard mod | Hidden key (in the space of the stands, which triggered a extra key stroke) |
| Kickstart selector | A print you can insert in the ROM socket of your amiga. Had only 1.2 and 1.3. Now there are many .. like diagnostic roms. I made a altered 1.2 version .. which was unusable .. i f*cked it up |
| SID mod | Added a sid parallel on the 8020 CIA chip |
| Gotek driver emulator | I made a arduino version to read disks. (Other post) But this is a disk image drive emulator. See Gotek post |
| Boot sector warn | Piezo beeper which warned me when a boot sector was being written (virus alert) |
| Sound filter fix | Amiga audio filter enhancer, using capacitors and resistors |
C64:
| Final Cartridge III | |
| Led mod | Memory activation leds |
| KCS Power Cartridge | Sepp’s old cartridge? |
| Rom selector | DIY rom selector |
| Data Manager 2 | Can’t find anything on this one on other sites !?!?! https://www.henriaanstoot.nl/2022/07/17/mystery-cartridge-c64/ |
Atari:
Vic-20:
| Reset mod | DIY reset mod |
| ROM selector | DIY ROM selector |
| Many cartridges | Sold in 2022, kept only some useful once’s |
PC:
| PC speaker mod | Speaker to audio jack |
| Seek time monitor | When a seek took too long, LEDs would light up, time to defrag! |
| Covox mod | A pre sound card parallel to audio resistor bridge. Only a few demo’s and games supported this mod. |
| VGA to scart | Display hack |
Monitor:
| Monitor mod | DIY horizontal flip using relays |
| Color mod | Greyscale / RGB switcher |
Generic:
| Joystick recorder | recorded movements when playing a game, so it could replay parts. |
How to get more categories in Kodi, like for Standup and Documentaries
A fancy keyboard….. At last a clickety keyboard. A Razer Blackwidow V3 mechanical keyboard. I’m not a gamer, but i like the clickety sounds. RGB leds are always nice to play with.
One of the nice things about razer is the Linux support!
Some nice links:
https://github.com/openrazer/openrazer
Even several python scripts can be found, but no MQTT.
So made a fast ‘n simple hack to control my keyboard with mqtt/nodered.
When someone is at the frontdoor, my keyboard changes from white to red.
Below a node-red example
My python code:
import paho.mqtt.client as mqttClient
import time
import os
import subprocess
import json
def on_connect(client, userdata, flags, rc):
if rc == 0:
print("Connected to broker")
global Connected
Connected =True
else:
print("Connection failed")
def on_message(client, userdata, message):
subprocess.Popen(["razer-cli", "-c", message.payload])
Connected = False
broker_address = "your.mqtt.brokerip.here"
port = 1883
#user = "user"
#password = "password"
client = mqttClient.Client("mqttrazer")
#client.username_pw_set(user, password=password)
client.on_connect = on_connect
client.on_message = on_message
client.connect(broker_address, port=port)
client.loop_start()
while Connected != True:
time.sleep(0.1)
client.subscribe('razer/in')
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
print ("exiting")
client.disconnect()
client.loop_stop()
Testing my 10gbps fiber
If your mobile doesn’t have a filter, you should be able to see fiber connections using camera.
One of the first attempts to do some augmented reality.
Tried to display note buttons realtime on a instrument.
I’m using a image on a screen due to the lighting, i was unable to test my real instrument with the light i had when testing.

Needed a way to record stuff from phone and VR set, found scrcpy.
A really usefull tool, you can control you phone, and what i was looking for .. screen record.
Used this to show via Jitsi screen share, how to do stuff on your phone.
scrcpy –record file.mkv
https://github.com/Genymobile/scrcpy#copy-paste
| Switch fullscreen mode | MOD+f |
| Rotate display left | MOD+← (left) |
| Rotate display right | MOD+→ (right) |
| Resize window to 1:1 (pixel-perfect) | MOD+g |
| Resize window to remove black borders | MOD+w | Double-left-click¹ |
Click on HOME | MOD+h | Middle-click |
Click on BACK | MOD+b | Right-click² |
Click on APP_SWITCH | MOD+s | 4th-click³ |
Click on MENU (unlock screen)⁴ | MOD+m |
Click on VOLUME_UP | MOD+↑ (up) |
Click on VOLUME_DOWN | MOD+↓ (down) |
Click on POWER | MOD+p |
| Power on | Right-click² |
| Turn device screen off (keep mirroring) | MOD+o |
| Turn device screen on | MOD+Shift+o |
| Rotate device screen | MOD+r |
| Expand notification panel | MOD+n | 5th-click³ |
| Expand settings panel | MOD+n+n | Double-5th-click³ |
| Collapse panels | MOD+Shift+n |
| Copy to clipboard⁵ | MOD+c |
| Cut to clipboard⁵ | MOD+x |
| Synchronize clipboards and paste⁵ | MOD+v |
| Inject computer clipboard text | MOD+Shift+v |
| Enable/disable FPS counter (on stdout) | MOD+i |
| Pinch-to-zoom | Ctrl+click-and-move |
| Drag & drop APK file | Install APK from computer |
| Drag & drop non-APK file | Push file to device |

I made a little script to make a 360 spherical panorama photo, using a remote controlled IP cam,
Looking at the API CGI, i only needed to control the movement of the camera and getting a snapshot.
After getting all those pictures, i only needed to stitch them using Hugin.
When viewing the image with VR Glasses, i could look around my room, without image distortion, like below flattend example.
The ipcam generates a token, which you have to use in your curl commands.
TOKEN PART
token=$( curl -s -d '[{"cmd":"Login","action":0,"param":{"rs": "abcd", "User":{"userName":"admin","password":"SECRETPASSWORD"}}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=Login&token=null" -H 'Content-Type: application/json' | grep name | cut -f4 -d\" )
GETTING A IMAGE FROM IPCAM
wget "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=123asd&user=admin&password=SECRETPASSWORD" -O output.jpg
CONTROLLING MOVEMENT
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Left","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
COMPLETE SCRIPT
#!/bin/bash
token=$( curl -s -d '[{"cmd":"Login","action":0,"param":{"rs": "abcd", "User":{"userName":"admin","password":"SECRETPASSWORD"}}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=Login&token=null" -H 'Content-Type: application/json' | grep name | cut -f4 -d\" )
echo $token
if [ $2 == "max" ]; then
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"'$1'","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
exit 0
fi
for x in $(seq -w 1 25) ; do
for y in $(seq -w 1 12) ; do
wget "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=123asd&user=admin&password=SECRETPASSWORD" -O ${x}${y}.jpg
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Right","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
sleep 0.5
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Stop","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
sleep 5
done
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Left","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
sleep 30
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Stop","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
sleep 1
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Up","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
sleep 0.5
curl -X POST -d '[{"cmd":"PtzCtrl","action":0,"param":{"rs": "abcd", "channel":0,"op":"Stop","speed":1,"id":1}}]' "http://camera.ip.number.here/cgi-bin/api.cgi?cmd=PtzCtrl&token=$token"
sleep 5
done
