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

[SATTYPE]
1=6666
2=DVB-C Finland (Kaisanet)
3=FI
 
[DVB]
0=32
1=210000,V,6875,,QAM128
2=218000,V,6875,,QAM128
3=226000,V,6875,,QAM128
4=234000,V,6875,,QAM128
5=242000,V,6875,,QAM256
6=250000,V,6875,,QAM256
7=258000,V,6875,,QAM256
8=266000,V,6875,,QAM256
9=274000,V,6875,,QAM256
10=282000,V,6875,,QAM256
11=290000,V,6875,,QAM256
12=298000,V,6875,,QAM256
13=306000,V,6875,,QAM256
14=314000,V,6875,,QAM256
15=322000,V,6875,,QAM256
16=330000,V,6875,,QAM256
17=338000,V,6875,,QAM256
18=346000,V,6875,,QAM256
19=354000,V,6875,,QAM256
20=362000,V,6875,,QAM256
21=370000,V,6875,,QAM256
22=378000,V,6875,,QAM256
23=386000,V,6875,,QAM256
24=394000,V,6875,,QAM256
25=402000,V,6875,,QAM256
26=410000,V,6875,,QAM256
27=418000,V,6875,,QAM256
28=426000,V,6875,,QAM256
29=434000,V,6875,,QAM256
30=442000,V,6875,,QAM256
31=450000,V,6875,,QAM256
32=458000,V,6875,,QAM256

Tiedoston tallennuksen jälkeen kaapelimodeemi lisätään Plexin Live TV & DVR-valikon kautta seuraavalla tavalla: https://support.plex.tv/articles/community-supported-tuners/

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.

[octoprint]
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
[INCLUDES]
before = common.conf
[Definition]
_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 pleksi.fi. 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 https://darkball.net/stats/zybez.html. 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
Aamulehti Pilapiirros (aamulehti.fi) RSS

Fingerpori.org
Fingerpori värillisenä (Fingerpori.org) RSS

Helsingin Sanomat
Fingerpori (HS.fi) RSS
Fok_It (HS.fi) RSS
Jarla (HS.fi) RSS
Viivi ja Wagner (HS.fi) RSS

Iltalehti
Iltalehti Ville Ranta Pilapiirros (iltalehti.fi) RSS

Keskisuomalainen
Kamala Luonto (ksml.fi) RSS

Sanomalehdet:
Koti-Kajaani RSS

Julkaisu lopetettu
Karlsson (HS.fi) RSS
Jari (Kaleva.fi)RSS
Jäätävä Spede (HS.fi) RSS