mattizz'z weblog

Een rustpunt in barre tijden

DMI-TCAT provides robust and reproducible data capture and analysis, and interlinks with existing analytical software. Analytical features are based on two main ideas:
captured datasets can be refined in different ways (search queries, exclusions, date range, etc.) and the resulting selections of tweets can be analyzed in various ways, mainly by outputting files in standard formats (CSV for tabular files and GEXF for network files)

https://wiki.digitalmethods.net/Dmi/ToolDmiTcat

Screenshots hier:
https://github.com/digitalmethodsinitiative/dmi-tcat/wiki

Resetting the TCAT Web login passwords
The TCAT Web logins are securely stored in an Apache htpasswd basic authentication file. To reset a password to a new value:
sudo htpasswd /etc/apache2/tcat.htpasswd admin
Substitute “admin” for the login username (the default logins are named “admin” and “tcat”).

Werkt niet met Ubuntu versies > 14.04

Bleek in webmin na een nieuwe installatie Mysql server niet toegankelijk omdat het wachtwoord onbekend was.
Het commando hieronder loste dit probleem op:

sudo dpkg-reconfigure mysql-server-5…. (afhankelijk van de versie, TAB laat na de 5. de juiste versie zien)

Geldig SSL Certificaat installeren in Synology DSM 6.0

Let op: www.startssl.com certificaten zijn tijdelijk ingetrokken door Mozilla Firefox en Chrome

Memories

2 comments

screenshot_839.jpg

GEORGE MICHAEL “Going To A Town”

[Originally by Rufus Wainwright]

I’m going to a town that has already been burned down
I’m going to a place that is already been disgraced
I’m gonna see some folks who have already been let down
I’m so tired of America

I’m gonna make it up for all of the Sunday Times
I’m gonna make it up for all of the nursery rhymes
They never really seem to want to tell the truth
I’m so tired of you America

Making my own way home
Ain’t gonna be alone
I got a life to lead America
I got a life to lead

Tell me do you really think you go to hell for having loved?
Tell me and not for thinking every thing that you’ve done is good
(I really need to know)
After soaking the body of Jesus Christ in blood
I’m so tired of America
(I really need to know)

I may just never see you again or might as well
You took advantage of a world that loved you well
I’m going to a town that has already been burned down
I’m so tired of you America

Making my own way home
Ain’t gonna be alone
I got a life to lead America
I got a life to lead
I got a soul to feed
I got a dream to heed
And that’s all I need

Making my own way home
Ain’t gonna be alone
I’m going to a town that has already been burned down

Na lang testen een werkende installatie van Airtime, een Open Source programma om een radio station te starten (https://www.sourcefabric.org/en/airtime)

Volg deze instructies waarbij het script airtime-full-install in het pad airtime-airtime-2.5.1-ga/install_full/ubuntu/airtime-full-install moet worden vervangen zoals verderop is aangegeven.

1. Download and install Raspbian Jessie with PIXEL
(https://www.raspberrypi.org/downloads/raspbian)

2. Install Airtime
The “easy” installer appears to only work on x86 chipsets, and the 2.5.2 installer is completely broken. So we installed using the 2.5.1 source…

Update your system first:
sudo apt-get update
sudo apt-get upgrade
(might be wise to reboot at this point to load kernel updates, etc)

Download and extract the source:
wget https://github.com/sourcefabric/Airtime/archive/airtime-2.5.1-ga.tar.gz
tar -xvzf airtime-2.5.1-ga.tar.gz

3. Belangrijk: Vervang de inhoud van airtime-full-install in airtime-airtime-2.5.1-ga/install_full/ubuntu/airtime-full-install door:

airtime-full-install.txt

4. Then run
sudo ~/airtime-airtime-2.5.1-ga/install_full/debian/airtime-full-install
Install icecast, etc.

Als alles goed is gegaan is dit de uitkomst:
*** Verifying your system environment, running airtime-check-system ***
AIRTIME_STATUS_URL = http://localhost:80/api/status/format/json/api_key/%%api_key%%
AIRTIME_SERVER_RESPONDING = OK
KERNEL_VERSION = 4.4.34-v7+
MACHINE_ARCHITECTURE = armv7l
TOTAL_MEMORY_MBYTES = 947728
TOTAL_SWAP_MBYTES = 102396
AIRTIME_VERSION = 2.5.1
OS = Raspbian GNU/Linux 8.0 (jessie) armv7l
CPU = ARMv7 Processor rev 4 (v7l)
WEB_SERVER = Apache/2.4.10 (Raspbian)
PLAYOUT_ENGINE_PROCESS_ID = 19027
PLAYOUT_ENGINE_RUNNING_SECONDS = 11
PLAYOUT_ENGINE_MEM_PERC = 1.5%
PLAYOUT_ENGINE_CPU_PERC = 0.0%
LIQUIDSOAP_PROCESS_ID = 18981
LIQUIDSOAP_RUNNING_SECONDS = 12
LIQUIDSOAP_MEM_PERC = 2.1%
LIQUIDSOAP_CPU_PERC = 1.9%
MEDIA_MONITOR_PROCESS_ID = 18849
MEDIA_MONITOR_RUNNING_SECONDS = 15
MEDIA_MONITOR_MEM_PERC = 1.4%
MEDIA_MONITOR_CPU_PERC = 0.0%
— Your installation of Airtime looks OK!

Mocht de installatie fouten (FAILED) bevatten run de airtime installatie opnieuw:
cd airtime-airtime-2.5.1-ga/install_minimal
sudo ./airtime-install

If all is good you should now have a running version of Airtime and be able to browse to the Pi’s address and log in with admin (standard password admin)

5. Change the recording source
By default airtime uses ecasound to record from the default soundcard. This means that we can’t record streams from other sources. A simple fix is to edit
/usr/lib/airtime/pypo/bin/recorder.py (around line 91) with :

# command = “ecasound -f:%s,%s,%s -i alsa -o %s,%s000 -t:%s” % \
# (ss, c, sr, filepath, br, length)
command = “/usr/bin/sox -t ogg http://localhost:8000/airtime.ogg -C6 %s trim 0 %s” % \
(filepath, length)

6. You will need to recompile the python script:
cd /usr/lib/airtime/pypo/bin/
sudo rm recorder.pyc
sudo python
import recorder.py
Ctrl-d to quit (there may be some messages about missing files. Ignore)

7. Reboot and then install sox
sudo apt-get install sox
sudo apt-get install libsox-fmt-all

Hierna blijken zowel Icecast op http://192.168.178….:8000 als Airtime op http://192.168.178…. te werken. Van de instructies hieronder alleen nog oggfwd sudo apt-get install oggfwd uitgevoerd.

8. (niet uitgevoerd) So now if you set a show to record from line in it will actually record anything that is coming in on the master source. If you do want to record from a sound card as well you can set up something like this:

/etc/init/icecastsource.conf:
description “Pipe soundcard input to icecast”

start on runlevel [2345]
stop on runlevel [!2345]

respawn

exec /usr/bin/sox -q -r 44100 -t alsa plughw:0,0 -t ogg -C6 – | /usr/bin/oggfwd -p -n “Studio” localhost 8000 hackme /master
post-stop exec sleep 10

(you will need to install oggfwd sudo apt-get install oggfwd)

9. (Niet uitgevoerd) Apply some updates
If you come across any bugs or issues you may want to check on code updates since 2.5.1. We had an issue when setting shows up to rebroadcast that was fixed downstream
Replaced
/usr/share/airtime/application/forms/AddShowWhen.php
With the version from Git
https://github.com/sourcefabric/airtime/blob/2cdad4932afd095322fe72fd7ac340495452782c/airtime_mvc/application/forms/AddShowWhen.php

Een bug is het verwijderen van een show, dit is alleen mogelijk door het volgende commando uit te voeren:
sudo -u postgres psql airtime -c “delete from cc_show”

Stel de Airtime stream in zoals hieronder is weergegeven:

screenshot_811.jpg
Let op, bij ‘Additional Options’ moet het wachtwoord van de icecast2 server worden ingevoerd (username oningevuld laten)

Share your Raspberry Pi’s files and folders across a network

You can share your Raspberry Pi’s files and folders across a network using a piece of software called Samba, a Linux implementation of the Server Message Block protocol. You’ll need to install this software:
$ sudo apt-get install samba samba-common-bin

Samba contains the SMB protocol, support for the Windows naming service (WINS), and support for joining Windows workgroups. A workgroup is a group of computers on a local network that can access eachother’s folders. Samba-common-bin contains a tool that you’ll need to register users with Samba. Once these packages have finished installing, you need to edit the Samba configuration file:
$ sudo leafpad /etc/samba/smb.conf &

Find the entries for workgroup and wins support, and set them up as follows:
workgroup = your_workgroup_name
wins support = yes

The name of the workgroup can be anything you want, as long as it only contains alphabetical characters, and it matches the name of the workgroup that you want to join.

You also need to add the following section of code to smb.conf:

[pihome]
comment= Pi Home
path=/home/pi
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=no

Scroll down smb.conf until you see a section called Share Definitions, and add this code there. The path should point to the drive or folder that you want to share. I’ve set ‘only guest’ and ‘public’ to ‘no’ so that Samba prompts for a password when I visit the folder that I’ve shared. This means that when I’m using a Windows PC, I can login to the shared folders on my Pi, and I’ll have the same read/write permissions that user pi has.

Now type this command in a terminal, and enter pi’s password twice:
$ smbpasswd -a pi

If you have a PC or laptop connected to your workgroup, you should be able to see your Raspberry Pi in Windows Explorer under Network.

This is how to get access to your favorite podcasts on Kodi:

You don’t need any plugin to listen to podcasts, but the method of doing so isn’t entirely obvious and the official documentation isn’t exactly helpful. I spent two weeks playing around with plugins that didn’t really help before stumbling upon this method, so I feel like I should share it.

Simply put, there are no good plugins, as of this writing, for managing your podcasts in Kodi, but there is a way to listen to and watch podcasts by default. Your media center will be way better if you do this.

Adding Your Podcast Using The GUI

So what’s the trick? Basically, it’s adding the RSS feed as a media source. I know, it’s not intuitive. The media source menu seems like a place to add folders with media files and nothing else, but that’s simply not the case.

Head to the “File” menu of the music or video section of Kodi, depending on what sort of podcast you are adding. Then click “Add Source.” Instead of adding a folder on your computer, type the RSS feed yourself, beginning with “rss://” instead of “http://”.

screenshot_795.jpg

Lijkt ingewikkeld maar is het niet. Een eerst (oude) Raspberry Pi Model B volstaat om muziek vanaf de Synology NAS bekabeld (aan de router) of draadloos te streamen naar een Synology app zoals hier verzameld: http://www.subsonic.org/pages/apps.jsp
1. Download Raspbian https://www.raspberrypi.org/downloads/raspbian/ en zet het image zoals hier uitgelegd op een SD-kaartje.
2. Plaats het kaartje in de Raspberry en verbind het met een HDMI kabel en een draadloze muis met HDMI aan een monitor of tv om Raspbian te starten. Hieronder staat een youtube video die uitlegt hoe je bij de opstart SSH aanzet. Dit moet gebeuren om later SSH toegang te hebben.

De standaard SSH login is username: pi het wachtwoord: raspberry.
3. Stel met bv. de app Fing vast wel IP-adres de Raspberry in het netwerk heeft
4. Log in met SSH (sudo ssh pi@[ip-adres]
5. Lees hier de stappen die moeten worden genomen om eerst java en vervolgens Subsonic te installeren.
6. Nu Subsonic installeren. Blijkt dat de versie 4.9 werkt, nieuwere versies niet, deze laten zich niet installeren. Een downloadlink staat hier.
Downloaden met wget http://downloads.sourceforge.net/project/subsonic/subsonic/4.9/subsonic-4.9.deb
Installeren van het subsonic-4.9.deb bestand met sudo dpkg -i subsonic-4.9deb. Herstarten kan door sudo service subsonic restart.
7. Start Subsonic in de browser op door te gaan naar het IP-adres van de Raspberry op poort 4040 http://[IP-adres}:4040 en doorloop de wizzard. Een goede app voor Android client is “Subsonic for Android”
Let op: Kies bij de Settings in Subsonic server bij “Manage user access, Configure which folders each user is allowed to access” bij de admin gebruiker voor een vinkje bij “Allow access to these media folders – Music”.
8. Om de Subsonic server bv. met een app of SubAir (OSX) te bereiken moet er via portforwarding toegang tot de Raspberry op poort 4040 worden verleend.
9. Om de muziek vanaf de Synology NAS via Subsonic op de Raspberry te streamen moet er dmv het commando “sshfs” een tunnel worden opgezet tussen de Synology Music map en een map op de Raspberry.
Maak daarvoor op de Raspberry in de map “media” de map “music” aan en geef deze met “sudo chmod 777” alle rechten. Voer hierna het commando “sudo sshfs -o uid=1000 -o gid=1000 -o allow_other admin@[IP-adres NAS]:/music /media/music” op command line uit.
Als alles goed is gegaan zie je nu in de map “media/music” de (gemapte) muziekbestanden van de NAS staan:
screenshot_796.jpg

Zet in de Synology server het pad waarop de muziek staat en dat gescand moet worden op “/media/music” en scan de inhoud:

screenshot_797.jpg

10. In de verschillende Subsonic apps is de muziek te streamen door bij het serveradres het IP-adres van de “buitenkant” van het netwerk te kiezen (en poort 4040), dus het IP-adres dat getoond wordt bij een website als http://www.watismijnipadres.nl
De serverinstellingen in Subsonic voor Android zien eruit zoals hieronder weergegeven:

Screenshot_20161215.jpg

Het blijkt dat het na een succesvolle installatie van Subsonic 4.9, het mogelijk is een installatie van de nieuwste Subsonic 6.0 over deze installatie heen te zetten. Het nieuwste Subsonic deb bestand kan worden gedownload vanaf de websie van www.subsonic.org.

Dit leek te werken. Stream openen en pas dan P2P Stream geautomatiseerd installeren. Plexus versie 0.1.4

### Installation ###

For this to work, you need the Plexus Addon already installed in Kodi. The Plexus Kodi addon was discontinued by the developer but it still works. You can find it easily on the web.

Then open a virtual terminal, for example via SSH, and run the following commands (you can copy/paste to terminal):

cd ~/.kodi/userdata/addon_data/program.plexus
sudo rm -r acestream
wget https://dl.bintray.com/pipplware/dists/unstable/armv7/misc/acestream_rpi_3.1.5.tar.gz
tar xfv acestream_rpi_3.1.5.tar.gz

Done. Then you can play acestreams again.

PS: If you are running an OS as root, like OpenELEC, you may need to remove the “sudo” on the second line.