UserOnline

, 3 Guests, 3 Bots

Archives

Print This Post Print This Post

Raspberry Pi MineOS Minecraft Server

PiMine

I have built a few Minecraft R Pi servers but wanted more functionality that what the other guides were building their servers.  So I built this several times and it works but isn’t as powerful as any of the x86_64 systems but it is pretty cool to do.  First let me list the stuff I used to create this server.

  1. Raspberry Pi 2
  2. MineOS webpages
  3. SDFormatter
  4. Win32disk
  5. Ubuntu R Pi image
  6. 16 Gig MicroSD card
  7. Putty

The reason I didn’t user Rasbian is due to the overall size of the image.  The Ubuntu 14.04 image is only 1.75G vs 3.05G Rasbian image.  So to prep the OS I did a few things. The Ubuntu image can be downloaded from https://wiki.ubuntu.com/ARM/RaspberryPi .  The default user is ubuntu and a password of ubuntu.  So I used my Windows machine to setup my MicroSD card and write the image to the card.  I used SDFormatter to format the card and Windisk32 to write the image.  You can do this with Linux as well and the Ubuntu webpage has all the directions you need to accomplish this.  Now you should be ready to pop this bad boy into the R Pi.

The first boot will need a monitor and keyboard connected to the R Pi because the OS doesn’t have an ssh server installed by default.    So enter sudo su – to elevate to the root prompt and type apt-get update.  If just tried to install the openssh server from the git go but it kept failing until I ran the update.  You should also follow the following instruction from the Ubuntu webpage.

There are no Raspbian-specific utilities included, specifically no automatic root resizer. However, it’s not hard to do manually. Once booted:

 $ sudo fdisk /dev/mmcblk0

–  You can use fdisk -l to see the available size of your Micro SD before increasing the size.

Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:

$ sudo resize2fs /dev/mmcblk0p2

There is no swap partition/file included. If you want swap, it’s recommended you do:

 $ sudo apt-get install dphys-swapfile

You should have a (resized) SD card at least 8GB, because by default it will want to create a ~2GB swapfile and allow for the actual game files to grow.  This gave me a 1866 Meg swap space.

This will give you the full Micro SD card space and add a swap that the R Pi will need even with the 1G of memory the R Pi 2 has.  Below is a before and after df -h for this server.

BEFORE

before

AFTER

after

 Now that the drive space is ready it is time to download and install the MineOS webpages.  This part is optional but I really like the functionality that it brings to the server.  First thing is to go to http://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS_(apt-get).  This would be the apt-get link for the Ubuntu install we are using here.  If you decide you want to use MineOS you can go the link above and install it.

MineOS makes downloading and setting up the server pretty easy,  if you are not going to use MineOS you can wget the minecraft server from  https://minecraft.net/download .  I personally like Spigot better however with the copyright problems you can’t just download it anymore.  So if you want to use Spigot you can build it using the instructions on their website. The link to setup the MineOS webpage is at the bottom of the post.  Also the link to build instructions for Spigot is at the bottom of the post.

On distributions featuring apt-get, you can install dependencies with these commands:
As root:
apt-get update apt-get -y install -y nodejs nodejs-legacy npm git rdiff-backup screen openjdk-7-jre-headless

rsync

MineOS requires rsync 3.1.0+, which comes default in Ubuntu 14.04 and later. Ensure you have a recent enough version.
Installing MineOS scripts with git
As root:

mkdir -p /usr/games
cd /usr/games git clone https://github.com/hexparrot/mineos-node.git minecraft
cd minecraft
git config core.filemode false
chmod +x service.js mineos_console.js generate-sslcert.sh webui.js npm install –all
ln -s /usr/games/minecraft/mineos_console.py /usr/local/bin/mineos

As updates are made frequently to the MineOS scripts, you should make a habit of updating the webui via git on a regular basis. Updating the web-ui does not require a host or server restart.
Running the MineOS Web Service
Starting the web-ui at boot

This method uses upstart, which is available on Ubuntu 14.04 by default.

Have the web interface start
As root:
cp /usr/games/minecraft/init/upstart_conf /etc/init/mineos.conf start mineos

Using secure HTTPS operation

Before you can start the server, you must generate a self-signed certificate for HTTPS functionality: /etc/ssl/certs/mineos.{pem,crt,key}
As root:
cd /usr/games/minecraft ./generate-sslcert.sh
Starting/Stopping the webui

Remember, you won’t need to do this on subsequent restarts, as the initscript will take care of it.
As root:
start mineos stop mineos

Using the webui

The scripts, by default, will run a server operating on port 8443 and place minecraft data files into /var/games/minecraft.

When creating minecraft servers, it is required to use an unprivileged user to create and manage Minecraft servers. For most distros, this will be with the adduser username command. The password you set during user creation will also be the password used for the web-ui.

In your browser, visit the location: https://xxx.yyy.zzz.aaa:8443

Servers may only be created by unprivileged users, or in other words: not root. Be sure to log in as any unprivileged user to create any servers you wish and leverage group membership to share control of servers with others!

http://minecraft.codeemo.com/mineoswiki/index.php?title=MineOS-node_%28apt-get%29

standalone UI
http://minecraft.codeemo.com/mineoswiki/index.php?title=Installing_MineOS

Spigot
https://www.spigotmc.org/wiki/spigot/

Another reason that I use Spigot is for the plugins that can be added to the server.  The main one I would add is called Dynmap.  This plugin simply draws a map of the areas that you have explored.  This can be opened in a web browser and can be set to very fine detail for map resolution.  It will give you a map like the following.

 dynmap_example

Spigot:  https://www.spigotmc.org/threads/minecraft-1-8-8-release.81138/

Dynmap:  http://dev.bukkit.org/bukkit-plugins/dynmap/

The one thing I did find is that the R Pi works for a Minecraft server but it needs some tweaking to get it to work well.  I think the R Pi 2 has enough power to really run the server as long as it has a small map, but it needs some tweaking to really get it to run well.  I experienced lag and blocks reappearing after you had broken it.  Now you can strip everything out and just run a Minecraft server without any add-on but that is part of what makes the server functional to me.  But running the server by itself in a terminal on the R Pi does work but I still has some lag and performance problems.  So  for the people that will say don’t use an R Pi to build a Minecraft server I say why not.  I understand it is low powered and was not built for this, but what was it built for.  It was built for people to buy and tinker with, program and see what it can do.

  So in closing the R Pi 2 will work as a Minecraft server and the performance isn’t that bad.  It could use some tweaking and once it is figured out I am sure it will be a low power option to a power hungry desktop.  Not that it will out perform it, but it is cheap and can stay on all day without using a Kilowatt of power.  So tinker around see how it goes.  It you have any questions about this setup feel free to leave a comment.

Print This Post Print This Post

Make Your TV a Smart TV with Android TV Dongles

Dongle

  On  a recent trip I was looking at a store and saw this dongle that was billed as make any TV a smart TV.  So I looked at it and it looked like a large flash drive with Android as the operating system.  So it was $47 so I decided to give it a try and purchased it.  Well when I got back to the hotel I plugged it in and it had Android 4.2.2 on it and needed some kind of input device hooked to it so you could control it.  All in all I thought it worked really well and that I would now use this as my traveling media center because most TVs these days have a HDMI port and I could watch moves, listen to music, and even surf the internet if I wanted to.  All in all I liked it.

So I decided to dig into the device hardware and what I could do with it.  The device I bought was an AVOL UAD2842 Android TV dongle.  It uses Nexeon board and it turns out these are used in a lot of these devices.  The full specs are below.

  • CPU:  RockChip 3188-T  1.4Ghz Quad core
  • Mem:  2G DDR3
  • Nand:  8G flash ROM
  • GPU:  Mali Quad core 500Mhz
  • USB:  2 micro USB, 1 Standard USB
  • WiFi:  RTL8723bs or AP6210 with Bluetooth
  • Storage:  MicroSD card slot up to 32G

Now the specs can be different depending on your device but both of mine had these specs.  Just as a note insure you now the exact specs of you device before you start trying new ROMs.  I bought one to use and the one to tinker with.  I opened the one I use and the installed new ROMs on the other one.  Well after several attempts and ROMs that are suppose to work on these specs I took the other one apart and found it had a different WiFi card.  So just make sure you now what hardware you have.

So I found some Android 4.4.2 ROMs for similar devices with the same chip set and started researching.  So to make a long story short chances are you will not find a perfect ROM for your device but you will find tons that may work.  So I downloaded about 12 different ROMs and flashed each one.  I only had one that all the hardware worked but the ROM was really laggy on my device.  So here are some of the tools you will need.

  1. A Rockchip flash tool or one for the chip set you have.
  2. Some ROMS of course.
  3. Know how to boot your system into download or flash mode.
  4. Drivers for the computer you will be flashing from.

First thing you have to do is install the usb drivers so the system can read the device.  Mine is a Rockchip based system so I installed the 64bit ones to go with my 64bit laptop.  Once that was completed the dongle has a reset button that you will use to put the device in the right mode.  You plug in the one end of the USB cable and then hold in the button and plug in the other end of the USB.  Then computer should pick up the device, if not you may need to try the process again or reinstall the drivers.  Once the computer recognizes the device you can open the flash tool.  I use RKFirmwareTool version 1.34.  There are several versions so use which one works for you.  The you select the ROM to flash and select restore.  Once it is done plug it into the TV and see how it works.  Below are some pics of the flash tool.

v1 v2

After I tested about 12 ROMs I started looking a Linux for the device.  I also found several ROMs that were Dedian based.  I was a Linux administrator  for a few years so I now my way around a console and thought it would be cool to see how it worked.  I found some ROMs at Radexa and they have several Android and Linux ROMs.  I used the exact same tools to flash Ubuntu to the Nand on the device.  It worked well but I couldn’t get the graphics to work quit right.  Another great thing is the ability to boot Linux from you SDcard.  So if you don’t want to remove you Android you can just prep a MicroSD card to accomplish the same thing.  I found that the Lubuntu image I got from Radexa worked really well when I ran it from the SDcard.  The WiFi didn’t work but I only played with it for about 30 minutes.  Here are some pics of Linux on the device.

image_2306

image_2305

 

So once I get back home I am going to try and get a USB Ethernet device to work so I can work on fixing the WiFi.  I sure beats going out and downloading stuff and trying to get it uploaded through USB or SDcard.

For the most part though these devices work really well for a media center device.  I installed several of my favorite Android apps and I have been listening to music, watching movies, and even checking the status of my network with this device.  Once I have a wireless keyboard to plug into it I believe it will be worth every penny I paid.  I also have a small remote that works like a Wii mote and has a qwerty keyboard on the other side.  This will make the device family room ready for the kids to use.

So if you want to make your TV do a little more than watch shows you may want to pick one of these devices up.  Below will be some links to firmwares and names of devices that you can look for.  I really like the device and I use it everyday.  If you have any questions feel free to leaves a comment and remember that if you decide to change your firmware you always do it at your own risk.

 

 

Print This Post Print This Post

Serviio Media Server is Awesome

serviio

In an effort to for a better way to watch my movies I searched a ton of different media servers and ways of sharing.  What i was looking for was pretty basic.  I wanted a media server that could stream to all of my devices on the LAN and through the Internet.  Then I came across Serviio.  This server can do almost anything and runs on Linux, Windows, or Mac.  So I set out to do a little more research on this an learned it did everything I wanted and more.    So lets start out with features and other specs for the server.

Features

  • streams audio, video (SD & HD) and image files in their native format or transcoded in real-time
  • streams content from online sources, like RSS feeds, live audio/video streams, web page content
  • includes a plugin system to support streaming from non-trivial online sources
  • supports most known playlist formats
  • supports subtitles
  • automatically updates the media library when you add/update/remove a media file or a metadata file
  • supports RAW camera images
  • wide array of localized library browsing options
  • supports different editable renderer profiles
  • supports automatic renderer detection and per-IP profile assignment
  • extracts metadata of your media files the way you want it, incl. embedded metadata tags, local metadata files, online metadata sources (in preferred language), XBMC, Swisscenter, MyMovies
  • supports video thumbnails, CD covers, DVD posters, etc.
  • categorizes video files into movie and/or series and marks last viewed episodes of a series
  • available for Windows, Linux and Mac (with the possibility to run the server part on one platform and console on another)

Supported media files

  • Audio: MP3( .mp3), MP2 (.mp2), Windows Media Audio (.wma), AAC (.m4a), OGG (.ogg, .oga), FLAC (.flac), Wawpack (.wv), Musepack (.mpc), Monkey’s Audio (.ape)
  • Video: MPEG-1 (.mpg, .mpeg), MPEG-2 PS (.mpg, .mpeg, vob, mod), MPEG-2 TS (.ts, .m2ts), MPEG-4 (.mp4, m4v, mov), AVI (.avi, .divx), Windows Media Video (.wmv, .asf), Matroska (.mkv), Flash (.flv, .f4v), DVR-MS (.dvr, .dvr-ms), WTV (.wtv), OGG (.ogv, .ogm), 3GP (.3gp, .3g2), RealVideo (.rm, .rmvb)
  • Image: JPEG (.jpg, .jpeg), GIF (.gif), PNG (.png), RAW (.arw, .cr2, .crw, .dng, .raf, .raw,. rw2, .mrw, .nef, .nrw, .pef, .srf, .orf)
  • Playlist: PLS (.pls), M3U (.m3u, .m3u8), ASX (.asx, .wax., .wrx), WPL (.wpl)
  • Subtitles: SubRip (.srt, .txt), SSA/ASS (.ssa, .ass), MicroDVD (.sub, .txt), SAMI (.smi), VTT (.vtt), MOV open text

I think it is worth mentioning that Serviio has a free and Pro edition.  The free edition starts out with Pro for 15 days and then convert to the free on.   The differences are pretty minimal but the Pro edition had the features I needed so I went with Pro.  The good thing is it only cost $25.  The Pro edition had the Android app access and I wanted that so I bought it.  So below are the differences between the two and you can decide.

So once I decided I was going to build a Serviio server for my network I had to decide what platform I was going to put it on.  I was leaning towards Linux but I already had a Windows box that wasn’t doing anything but using electricity so I used it.  Installation is straight forward.  You just download the install package and install it. Below are some of the requirements to run Serviio.  Mine is a dual core with 2 gigs of memory.  It works well but the cpu goes way up during usage so maybe a quad core would be better.  So what every hardware or virtual you decide to use just keep that in mind.

Minimal requirements

  • 512 MB of memory or more
  • 150 MB of disk space (plus additional space for storing the media library), when using transcoding make sure there is at least 1GB free (depending on the original file size)
  • if on Linux, Java 8 must be installed. Windows and OSX come with Java runtime aready included in the installation.

Additional information

  • Linux users need to install the FFmpeg package (incl. libRTMP, libASS, libx264 and libmp3lame) for their OS distributions or, ideally, compile FFmpeg using the source files provided above
  • Linux users need to install the dcraw package if they need RAW image support
  • Only 64-bit OSX machines are supported, with OSX 10.8 minimum

Once installed it has a pretty easy to use interface.  You tell it where you store your media and it scans it.  One of the feature I like is that it downloads the cover pictures for the media along with the rest of the meta data.  I use mine for moves and when you log into the web or android interfaces,  you see all the picture and just click on it to play.  Here are some pics of the server interface.

Serviio3serviio1  Serviio2

Now on thing  I didn’t mention is security.  You set the access password on the server and everyone uses that password to access the server.  Only one person can access the server at a time so one password it all you need.  However it would be better to have accounts and access by multiple people at a time.  This would take a pretty powerful computer to run so maybe one account  is the best choice.

Now the web interface isn’t to shabby either.  It is designed well and easy to use.  You can also create a play list,  I really don’t have a use for this but it is a cool feature.  It does take a little while to fully load, but it is a lot of pictures.  The android interface loads faster.  I never really use the web interface because I wanted the Android interface.  We have a few Android media players and it really works great on these devices.  Here is some pics of the two interfaces.

ServiioWeb

 

Another good thing is that Serviio has support for multiple mobile devices as well.  The have apps for Android and Windows phone.  There are also several different apps that you can choose from.  They are third party and not directly supported by the group that makes Serviio.  Anyhow I use this all the time.  I really enjoy it and it works great.

The following are my dislikes about Serviio.

  • The movie metadata isn’t always correct.  Not Serviios fault but can be annoying.
  • Have to buy pro to get mobile features.  But they got to make their money somehow.

That’s it I really enjoy this program and use it all the time.  One thing to note is that to use the program outside of the LAN you have to open port 23424 on your router.  This is the port it talks on inside the network as well.  But $25 isn’t bad for a fully functional media server.  I recommend it to everyone that is looking for a good media server.  I should also note it does music and pictures.  I don’t use them yet but plan to move my music over to this server as well.  Any how check it out.  If you have any questions about performance, resource utilization, or anything else.  Feel free to leave a comment.  I will get back to you as soon as I have an answer for you.  Thanks I how you find this informative.