Subsonic Mattizz muziekstation

      Geen reacties op Subsonic Mattizz muziekstation

Subsonic is een serverapplicatie die zich vooral richt op muziek. Om met Subsonic aan de slag te gaan, is een speciale server of nas aan te raden. Je kunt daarvoor ook Windows als server gebruiken of het eerst op Windows installeren om te testen.

Subsonic heeft veel muziekspecifieke functies. Zo werkt het met veel mediaspelers, zoals Winamp, iTunes, VLC en Windows Media Player. Met de handige ingebouwde transcoding engine kun je lossy en lossless formaten tijdens het luisteren omzetten naar mp3’tjes. Ondersteunt je afspeelapparaat geen flac-bestanden, dan kun je er in ieder geval in mp3-formaat naar luisteren. Voor een aantal functies van Subsonic heb je de Premium-variant nodig.
Zie voor verdere uitleg in installatiehandleiding dit artikel op computertotaal.nl

De interface van Subsonic ziet er uit zoals hieronder, de getoonde server draait op mattizz.nl en is gratis en voor niets te bezoeken en de muziek en Podcasts te beluisteren via deze link:
http://subsonic.mattizz.nl, waarbij je automatisch als gast inlogt via deze optie:
http://subsonic.mattizz.nl:4040/login.view?user=gast&password=gast


Reclamevrij internet: PI-hole

      Geen reacties op Reclamevrij internet: PI-hole

Als je je DNS internetverkeer vanaf je router doorstuurt naar PI-hole dan worden alle reclame banners en ongewenst internetverkeer geblokkeerd

Het is één van de grootste irritaties op internet: advertenties. Je kunt natuurlijk voor elk apparaat een ad-blocker in je browser installeren, maar als je ook je smartphone, slimme televisie en spelcomputer tegen reclames wilt beschermen, dan is een centrale ad-blocker veel handiger.
Er zijn dure commerciële oplossingen beschikbaar, maar met een Raspberry Pi van een paar tientjes en Pi-hole bereik je exact hetzelfde.

Kijk op de volgende pagina’s voor meer informatie:

Als je een Raspberry PI hebt (mag een oudere zijn) dan kun je op het micro SD kaartje, nadat je deze geflashed hebt met Raspberry PI OS, eenvoudig de PI-hole software installeren met het terminal commando:

curl -sSL https://install.pi-hole.net | bash

Hierna is het PI-hole dashboard terug te vinden op het (vaste) IP-adres van je Raspberry PI die je aan je bekabeld aan je router hebt gekoppeld: [IP-adres]/admin

Het resultaat ziet eruit zoals hieronder

Hieronder een voorbeeld van het onderdrukken van de reclame op de speedtest pagina https://www.speedtest.net

Op dit Ziggo forum zijn nog tips voor het geval er nog problemen zijn.
Zo is daar te lezen dat na het uitzetten van DHCP in de Connect Box, deze moet worden herstart zoals hieronder wordt uitgelegd:

Dan zijn er nog twee vervolgstappen nodig:
Ten eerste zijn die Ziggo-modem-routers wat nukkig: Uitschakelen van de DHCP-server en deze instelling opslaan is niet voldoende; je moet daarna ook nog eens de Ziggo-modem-router opnieuw opstarten.
Daarna alle clients die met DHCP werken opnieuw opstarten (om te forceren dat deze meteen de nieuwe verbindingsgegevens gaan gebruiken).


App

Voor Android is er ook een app, zie hier voor meer informatie. Hieronder een screenshot van deze app.

Firefox, Chrome, Edge en Safari Extensies

PI-hole blokkeert ook websites waar je misschien toch naar wil kijken. Als voorbeeld hieronder een zoekvraag in Google naar “KPN glasvezelnet”.
Het eerste resultaat genaamd “KPN Glasvezel – Altijd een perfecte verbinding – KPN.com” lijkt te wijzen naar https://shop.kpn.com/internet-tv/internet-tv (links onderin de browser te zien als je er met de muis over de link gaat). In werkelijkheid ga je naar de link hieronder:

https://clickserve.dartsearch.net/link/click?lid=43700052625612121&ds_s_kwgid=58700005778316200&ds_a_cid=10189206&ds_a_caid=9724790520&ds_a_agid=99502120277&ds_a_fiid=&ds_a_lid=kwd-11176675539&&ds_e_adid=461258580142&ds_e_matchtype=search&ds_e_device=c&ds_e_network=g&&ds_url_v=2&ds_dest_url=https://shop.kpn.com/internet-tv/internet-tv/?pagina=glasvezel&pccheck&gclsrc=aw.ds&&campaignid=ps:s=go:t=ResidentialAdwords:c=1.+kpn+%7C+sbrd+%7C+Glasvezel+%7C+Regulier+%7C+Nieuwe+klant:d=KPN+glasvezel+-+(exact):co=kpn%20glasvezel:f1=kpn+glasvezel:f2=e&gclid=CjwKCAjwlID8BRAFEiwAnUoK1WzJPbHPHyODaVV0rb7UlcFOAY67UtYaaRNDlEXr8OX3WYqRW0nulBoCY-8QAvD_BwE

En deze link wordt geblokkeerd door PI-hole omdat dit als reclame wordt gezien en dat is het ook, als je je nog afvraagt hoe het komt dat je als je ergens op zoekt je al resultaten krijgt die aansluiten op waar je eerder naar gekeken hebt (hoe weten ze dat toch ?) dan komt dat oa. door dit soort trucs.

Maar als je toch naar deze pagina wil dan kun je voor Firefox, Chrome, Edge (allen gratis) en Safari (betaald) de Switch for PI-hole in je browser installeren zodat je er een klein icoon bijkrijgt waarmee je PI-hole tijdelijk kunt uitzetten of een website vertrouwd (whitelist) maken:
Voor Firefox
Voor Chrome
Voor Edge
Voor Safari
De instellingen van de plugin zien eruit zoals hieronder:


Installeer Netdata met kickstart-static64.sh

      Geen reacties op Installeer Netdata met kickstart-static64.sh

Netdata is een Open Source server monitoring tool. Hier is er meer informatie over te vinden: https://www.netdata.cloud
Netdata is simpel met 1 commando te installeren zoals hieronder is uitgelegd (zie https://learn.netdata.cloud/docs/agent/packaging/installer/methods/kickstart-64)

Installatie:

This page covers detailed instructions on using and configuring the installation script named kickstart-static64.sh.
This method uses a pre-compiled static binary to install Netdata on any Intel/AMD 64bit Linux system and on any Linux distribution, even those with a broken or unsupported package manager.
To install Netdata from a static binary package, including all dependencies required to connect to Netdata Cloud, and get automatic nightly updates, run the following as your normal user:

bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)

This script installs Netdata at /opt/netdata
Opmerking:
Standaard is de Netdata pagina zonder inlog te bezoeken op [IP-adres of domeinnaam]:19999
Om dit te voorkomen voer de volgende commando’s uit:

# sudo vim /etc/netdata/netdata.conf

Pas in netdata.conf de volgende regels aan zodat de Netdata pagina enkel te bezoeken is vanaf bijvoorbeeld het thuis IP-adres. Er kunnen meer IP-adressen toegevoegd worden waar vandaan de monitoring pagina vaker bezocht wordt, zolang dat natuurlijk geen publiek IP-adres is waar meerderen gebruik van maken:

allow connections from = 216.***.***.***
allow dashboard from = 216.***.***.***
allow badges from = 216.***.***.***
allow streaming from = 216.***.***.***
allow netdata.conf from = 216.***.***.***
allow management from = 216.***.***.***

Netdata ziet er zo uit:

Om Netdata op een Synology te installeren kijk hieronder:
https://learn.netdata.cloud/docs/agent/packaging/installer/methods/synology
Een 2e optie is Netdata op een Synology als Docker container te installeren, Zoek daarvoor in Docker onder “register” naar “Netdata” en installeer de container zoals hieronder:

De website met de handmatige instellingen: https://hub.docker.com/r/netdata/netdata
Het resultaat op het interne Synology IP-adres ziet eruit zoals hieronder:


Eenvoudig script om webpagina’s in WordPress te tonen

Hieronder een voorbeeld van een eenvoudig iframe scriptje om een externe webpagina in een WordPress pagina te tonen. Het (html) scriptje hieronder ziet er als volgt uit:

<iframe width=”600″ height=”1200″ style=”border:0;” src=”https://www.geenstijl.nl” frameborder=”0″ allowfullscreen=”allowfullscreen”>


Subsonic server verbinden met Sonos

      Geen reacties op Subsonic server verbinden met Sonos

Om de subsonic muziek service te koppelen aan de Sonos om via de Sonos app de Subsonis muziek af te spelen, doe het volgende:
Open http://SONOS_IP:1400/customsd.htm in a browser.
Enter the following values in the web form:
SID – Any legal value except 242
Service Name – Any name, for instance “Subsonic Remote”
Endpoint URL – http://SUBSONIC_IP:4040/ws/Sonos?ip=SUBSONIC_IP
Secure Endpoint URL – http://SUBSONIC_IP:4040/ws/Sonos?ip=SUBSONIC_IP
Polling Interval – 1200
Authentication – Session ID
Strings Table – Version: 6, URI: http://SUBSONIC_IP:4040/sonos/strings.xml
Presentation Map – Version: 3, URI: http://SUBSONIC_IP:4040/sonos/presentationMap.xml
Container Type – Music Service
Capabilities – Search, Favorites, User Content Playlists, Extended Metadata

Resultaat ziet er in de Sonos app uit zoals hieronder is weergegeven, muziek kan rechtstreeks over de Sonos worden afgespeeld:


Docker / Portainer GUI op Ubuntu 18.04

      Geen reacties op Docker / Portainer GUI op Ubuntu 18.04

Tekst is afkomstig van de websites:
https://clouding.io/hc/en-us/articles/360010398219-Install-Portainer-on-Ubuntu-18-04 en
https://linuxhint.com/install_portainer_docker_ui_ubuntu
First, it is recommended to update your system to the latest stable version. You can do it by running the following command:
sudo apt-get update -y
sudo apt-get upgrade -y


Install Docker

Next, you will need to install Docker CE on your server. By default, the latest version of Docker is not available in the Ubuntu 18.04 server default repository. So, you will need to add the repository for that:
First, download and add Docker CE GPG key with the following command:

sudo wget https://download.docker.com/linux/ubuntu/gpg
sudo apt-key add gpg


Next, add the Docker CE repository to APT with the following command:

sudo vim /etc/apt/sources.list.d/docker.list

Add the following line:

deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable

Save and close the file, when you are finished. Then, update the repository with the following command:

apt-get update -y

Once the repository is updated, install Docker CE with the following command:

sudo apt-get install docker-ce -y

After installing Docker CE, check the Docker service with the following command:

sudo systemctl status docker

You should see the following output:

docker.service – Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-05-30 12:15:47 UTC; 25min ago
Docs: https://docs.docker.com
Main PID: 820 (dockerd)
Tasks: 16
CGroup: /system.slice/docker.service
├─ 820 /usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock
└─2344 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 9000
 -container-ip 172.17.0.2 -container-port 9000
 
May 30 12:23:15 ubuntu1804 dockerd[820]: time=”2019-05-30T12:23:15.217067700Z”
level=info msg=”Ignoring extra error returned from registry: una

Install Portainer

Docker is now installed and running, it’s time to install Portainer. First, download the Portainer image from Docker Hub with the following command:

sudo docker pull portainer/portainer

Once the Portainer image downloaded, you should see the following output:

Using default tag: latest
latest: Pulling from portainer/portainer
d1e017099d17: Pull complete
0b1e707a06d2: Pull complete
Digest: sha256:d6cc2c20c0af38d8d557ab994c419c799a10fe825e4aa57fea2e2e507a13747d
Status: Downloaded newer image for portainer/portainer:latest

Once the download has been completed, create Portainer data directory with the following command:

sudo mkdir /opt/portainer /data

Next, run the Portainer container with the following command:

sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

You can see the Portainer image with the following command:

sudo docker images

You should see the following output:

REPOSITORY            TAG        IMAGE ID      CREATED        SIZE
portainer/portainer   latest     19d07168491a  2 months ago   74.1MB

You can check the running container with the following command:

sudo docker ps

You should see the following output:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8d0c002fda93 portainer/portainer “/portainer” 5 seconds ago Up 3 seconds
0.0.0.0:9000->9000/tcp confident_leavitt

Access Portainer Web Interface

Portainer container is now installed and running on port 9000. It’s time to access Portainer web interface. Now, open your web browser and type the URL http://**.**.**.**:9000 (Of http://domeinnaam:9000 / Localhost:9000). You will be redirected to the Portainer web interface as show below:

Hoe je Portainer upgrade naar versie 2.0 wordt hier uitgelegd:

Maar je kunt voor een upgrade ook deze commando’s uitvoeren (getest en werkend):
docker stop portainer
docker rm portainer
Those 2 commands will stop and remove the container respectively. Doing this will NOT remove your other applications/containers/etc.Now that you have stopped and removed the old version of Portainer, you can run this command
docker run -d -p 8000:8000 -p 9000:9000 –name=portainer –restart=always –pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

Voor verdere instructies hoe Portainer gebruikt kan worden om een container toe te voegen kijk hier:
https://linuxhint.com/install_portainer_docker_ui_ubuntu


Webmin op Ubuntu server

      Geen reacties op Webmin op Ubuntu server

Om een grafische interface te kunnen gebruiken en zo een Ubuntu server makkelijker te kunnen
beheren volg de onderstaande instructies:

Add Webmin Ubuntu repository

Open the /etc/apt/sources.list file to manually add the repository link to the list. In order to
open the sources.list file, run the following command as root in your Terminal:

$ sudo vi /etc/apt/sources.list

This will open the file in the Nano editor. Move to the end of the file and paste the following line in
order to add the Webmin repository to the list:

deb http://download.webmin.com/download/repository sarge contrib

The next step is to get the Webmin PGP key for the newly added repository. This way the system will
trust this repository. Run the following command to do so:

$ wget http://www.webmin.com/jcameron-key.asc

Then add the key through the following command:

$ sudo apt-key add jcameron-key.asc

Installing Webmin on Ubuntu

Once the repository has been added and recognized, let us update the list of packages on our
system through the following command:

$ sudo apt update

Finally, install the Webmin application through the following command:

$ sudo apt install webmin

Hierna kan er ingelogd worden op de interface door te gaan naar https://[server ip-adres of hostnaam]:10000

Voorbeeld van het resultaat is hieronder getoond:


Certbot Get your site on Lock https://

      Geen reacties op Certbot Get your site on Lock https://

What’s Certbot?
Certbot is a free, open source software tool for automatically using Let’s Encrypt certificates on manually-administrated websites to enable HTTPS.
Certbot is made by the Electronic Frontier Foundation (EFF), a 501(c)3 nonprofit based in San Francisco, CA, that defends digital privacy, free speech, and innovation.
Kortom, met Certbot kun je simpel een website voorzien van een gratis (Let’s Encrypt) certificaat en secure (https) maken. Hieronder de installatie instructies die te kiezen zijn voor alle webserver software en besturingssystemen. Als voorbeeld voor Apache op Ubuntu 18.04 LTS Bionic:
1. SSH into the server
SSH into the server running your HTTP website as a user with sudo privileges.
2. Install snapd
You’ll need to install snapd and make sure you follow any instructions to enable classic snap support.Follow these instructions on snapcraft’s site to install snapd.
install snapd
3. Remove any Certbot OS packages
If you have any Certbot packages installed using an OS package manager like apt, dnf, or yum, you should remove them before installing the Certbot snap to ensure that when you run the command certbot the snap is used rather than the installation from your OS package manager. The exact command to do this depends on your OS, but common examples are sudo apt-get remove certbot, sudo dnf remove certbot, or sudo yum remove certbot.
4. Install Certbot
Run this command on the command line on the machine to install Certbot.
sudo snap install –classic certbot

5. Choose how you’d like to run Certbot Either get and install your certificates…
Run this command to get a certificate and have Certbot edit your Apache configuration automatically to serve it, turning on HTTPS access in a single step.
sudo certbot –apache
Or, just get a certificate
If you’re feeling more conservative and would like to make the changes to your Apache configuration by hand, run this command.
sudo certbot certonly –apache
6. Test automatic renewal
The Certbot packages on your system come with a cron job or systemd timer that will renew your certificates automatically before they expire. You will not need to run Certbot again, unless you change your configuration. You can test automatic renewal for your certificates by running this command:
sudo certbot renew –dry-run

The command to renew certbot is installed in one of the following locations:
/etc/crontab/
/etc/cron./
systemctl list-timers

7. Confirm that Certbot worked
To confirm that your site is set up properly, visit https://yourwebsite.com/ in your browser and look for the lock icon in the URL bar. If you want to check that you have the top-of-the-line installation, you can head to https://www.ssllabs.com/ssltest
Of controleer de goede werking op https://www.sslcheck.nl/mattizz.nl


De slimme meter live uitlezen mbv een Raspberry Pi 3 Model B+

Op deze website www.ztatz.nl wordt uitgelegd hoe je vrij simpel mbv een zogenaamde P1 kabel en een Raspberry Pi 3 Model B+ je slimme meter live kunt uitlezen en over langere periode kunt zien hoeveel stroom en gas je wanneer verbruikt en hoeveel stroom je opwekt met je zonnepanelen.
Er is ook een weer-API (openweathermap.org) aan gekoppeld zodat te zien is wat de buitentemperatuur was in relatie met aan het gasverbruik.

Aangezien ik nog een ongebruikte oude Samsung Galaxy Tab 4 (7.0) had liggen, deze in de meterkast gemonteerd zodat de actuele meterstanden altijd beschikbaar zijn.
Hieronder een foto hoe de Samsung Tab in de meterkast is aangebracht:

Het is makkelijk als de RPI een vast ip-adres in het netwerk heeft. Dat is simpel als volgt uit te voeren waarbij alleen de wlan0 instellingen hoeven worden ingegeven als de RPI alleen draadloos wordt gebruikt. Om het interne ip-adres vast te stellen om via ssh in te loggen kan gebruik gemaakt worden van de app “fing”:
Edit the file /etc/dhcpcd.conf as follows:
Type sudo nano /etc/dhcpcd.conf at the command prompt.
Scroll to the bottom of the script, and add the following lines:
interface eth0 (als voorbeeld, verschilt per interne netwerk)
static ip_address=192.168.178.8/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.1

interface wlan0 (als voorbeeld, verschilt per interne netwerk)
static ip_address=192.168.178.8/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.1

Vergeet niet het p1mon ssh (root) wachtwoord te veranderen met het commando sudo passwd p1mon. Ook is het belangrijk dat de verwijzing naar de nameserver goed is ingesteld. Dit is aan te passen met het commando sudo vim /etc/resolv.conf.

Op de interface zie je links (geel) het actuele verbruik, rechts (groen) is de actuele opbrengst van de zonnepanelen.
Hieronder een voorbeeld van de toepassing van p1mon op een oude iPad: