Plex, Fritz!Box 6490 Cable ja Kaisanetin kaapeli-TV

Fritz!Boxin modeemi sisältää neljä kaapeli-tv virintä, jotka on mahdollista saada näkymään Plex-ohjelman kautta.

Tämä vaatii hieman säätöä, koska Plex tukee oletuksena vain muutamaa kaapeli-TV operaattoria, joihin Kaisanet ei lukeudu.

C:\Program Files (x86)\Plex\Plex Media Server\Resources\Tuner\Shared\scanners\dvbc\transponders

Yllä olevaan kansiopolkuun (Windows) pitää luoda uusi .ini tiedosto, itse tein 6666.ini-nimisen tiedoston.

Tiedoston sisältö on seuraava

2=DVB-C Finland (Kaisanet)

Tiedoston tallennuksen jälkeen kaapelimodeemi lisätään Plexin Live TV & DVR-valikon kautta seuraavalla tavalla:

Kanavien skannaus-vaiheessa operaattorien listalta valitaan Kaisanet, jonka jälkeen skannaus löytää Kaisanetin välittämät kanavat.

Installing Fail2ban on Octoprint without basic http authentication

I don’t have http auth set for my Octoprint, and all guides I found required it for Fail2ban to work. I started looking around the Octoprint log files and found that the recent addition of Force Login plugin creates logs of failed logins to .octoprint/logs/octoprint.log file.

Installing and Setting up Fail2ban on Octoprint

Install fail2ban.

sudo apt-get install fail2ban

Create new jail file for octoprint in the jail.d folder.

sudo nano /etc/fail2ban/jail.d/octoprint.conf

Below is the jail.d config I have used for my setup. Bantime is 86400 seconds, meaning 24 hours. I’m only banning from http and https because I haven’t forwarded any other ports to my raspberry pi.

enabled = true
filter = octoprint
logpath = /home/pi/.octoprint/logs/octoprint.log
port = http,https
maxretry = 3
findtime = 10800
bantime = 86400
banaction = iptables-allports

Create new filter file for octoprint in the filter.d folder.

sudo nano /etc/fail2ban/filter.d/octoprint.conf

Below is the regex I have used for my setup.

# Fail2Ban filter for Octoprint login failures
before = common.conf
_daemon = app
failregex = - tornado.access - WARNING - 401 POST /api/login \(<HOST>\) .+$
ignoreregex =

The regex was made based on failed login in octoprint.log file, which looks like

2020-01-13 16:39:25,526 - tornado.access - WARNING - 401 POST /api/login (::ffff:XX.XXX.XX.XX) 17.58ms

Building an Ikea Lack enclosure for Creality Ender 3

I started with printing the parts from Threedee_Bus_Driver’s Thingiverse submission with Hobbyking’s red PLA.

Most of the finished parts.

I had already assembled one of the lack tables, so this time I just put correct corner pieces to right corners when attaching the legs to the table.

After that it was time to test fit the tables top of each other and mark the corners so I know where to screw the leg holders.

I drilled the holes bigger with a 3.5mm drill bit so the screws would fit better and they wouldn’t break the plastic. After this I just screwed the four corner pieces in place and did another test fitting to see if everything lines up. At this stage I also measured how large plexi glass windows I would need and ordered them.

Next I flipped the top table and installed Ikea Ledberg 24V led lights. I soldered wires between the leds, and ended up with a little too long wires but that doesn’t bother me personally. I just need to attach those wires to the table so it looks clean.

I used the original spool holder from the Ender 3, attached it with two screws to the printed spool holder base. Base has a lock that is attached with two screws to the table.

First test with the printer at the right place. I noticed that the Z rod hits the bottom of the upper table, so I need to print more parts that go between the leg and table.

Drilled a 10mm hole for the filament tube to go through the lack table. There is a short piece of bowden tube guiding the filament trough the printed part.

Since the Z rod hit the bottom of the the 2nd table, I needed to print more pieces to raise the table by 2cm.

I had to alter the original door parts to fit my round magnets, which I already had laying around. I also flipped the door side part so the magnet is between plexi glass and the plastic. My magnets are N52, so I felt they were too strong to have them sit side by side. I also used double sided tape to mount these to plexi glass and table.

It took a few days for the plexi glass to arrive, I ordered them cut to size from So it was just screwing the correct pieces to correct legs. I might have used short screws, but it seems to be fine.

Time to install the handle for the removable plexi glass, which is on the left side of the enclosure. Double sided tape, like mentioned before.

The front door panel was a bit too tall, my mistake on measuring it. So I have to cut very small pieces from the two corners to make it fit to the swings, then attach the handle and then it’s done.

Final result without the front door.

Discord + mIRCStats = StatsBot

I have migrated from IRC to various Discords these days and started to wonder if I still have any use for the mIRCStats license I bought years ago. Turns out, I do. I found a nifty little Discord bot on GitHub called StatBot, by MJHeijster. It saves Discord logs to a format that can be parsed by mIRCStats. You can do individual channels, or whole server if you want to. Or you can keep the bot at a rank that doesn’t have access to all channels, if you want to keep some discussions private.

I run the bot on a Windows Server 2012 R2, just so it isn’t tied up to my own uptime. Obviously you can just run it on a normal Windows PC as well. I have set scheduled tasks to run mIRCStats every hour and then move the necessary files over with pscp to my Ubuntu server. The results can be found on It works fantastically!

Koti-Kajaani RSS-syöte

Paikallislehtemme Koti-Kajaani tarjoaa ilmaisen digilehden luettavaksi kaksi kertaa viikossa, mutta heillä ei ole valmista RSS-syötettä saatavilla, joten tein sitten itse oman versioni. Skriptit hakevat curlilla json-tiedot, josta sitten haetaan kaikki tarvittavat tiedot tietokantaan, ja PHP-skripti luo itse RSS-syötteen.

Syöte löytyy täältä: Koti-Kajaani RSS

Change Audio Output with Powershell in Windows 10

I have always wanted to change audio outputs in Windows 10 with a single key from my keyboard. I have a Steelseries Apex raw keyboard, which has a ton of macro keys, but there wasn’t a simple way to do it before. Not until I saw cdhunt’s WindowsAudioDevice-Powershell-Cmdlet. With this, I can simply create a one-line Powershell file for my Realtek Digital Output:

Set-AudioDevice -Index 3

Same goes for my Samsung TV and Acer monitor, which has inbuilt speakers. After this, I thought I was good to go, once I had set the script to one of my keyboard’s macro keys, but unfortunately Steelseries Engine 3 doesn’t support .ps1 files as executable macros. So, I had to turn to PS2EXE-GUI to turn my .ps1 files to .exe files. After this, I just had to point the macro key actions to right files and I was done.

Hopefully this helps someone else, who wants to do the same.

Uusia sarjakuvien RSS-syötteitä

Näitä sarjakuvien syötteitä on alkanut tulemaan useampikin, niin laitetaan ne kaikki yhdelle sivulle listaksi.


Aamulehti Pilapiirros ( RSS
Fingerpori värillisenä ( RSS

Helsingin Sanomat
Fingerpori ( RSS
Fok_It ( RSS
Jarla ( RSS
Viivi ja Wagner ( RSS

Iltalehti Ville Ranta Pilapiirros ( RSS

Kamala Luonto ( RSS

Koti-Kajaani RSS

Julkaisu lopetettu
Karlsson ( RSS
Jari (
Jäätävä Spede ( RSS