How to install Mycontroller on the RaspberryPI (or any other linux/UNIX system)

  • MOD

    This article is work in progress, all feedback is appreciated!!

    Please follow the steps below to install mycontroller on the RPI.

    The manual below is divided in 4 parts:

    1. Setting up the RPI with a good JAVA version
    2. Installing Mycontroller
    3. Connecting to the gateway
    4. Starting Mycontroller at boot time

    (If there are any questions, try the search function first on the forum)

    1. Setting up the RPI with a good JAVA version

    In this example i downloaded the 32bit version.... (jdk-8u101-linux-arm32-vfp-hflt.tar.gz)
    Today (November 3 2017 jdk-8u151-linux-arm32-vfp-hflt.tar.gz is the latest version)

    Step 1:
    goto:, click the download button of Java Platform (JDK) 8. Click to Accept License Agreement, download jdk-8-linux-arm-vfp-hflt.tar.gz for Linux ARM v6/v7 Hard Float ABI.

    (If you are running your RPI headless you need to download the software and transfer it using i.e. sftp in binary mode into your RPI, see step 2)

    Step 2
    goto the directory where you downloaded the software.

    sftp user@ ( is just an example, use the IP / hostname of the RPI)
    put jdk-8u101-linux-arm32-vfp-hflt.tar.gz

    press control-D to close the connection.

    Step 3:
    Once the software is located on the RPI:

    Log-in Raspberry Pi, enter the command to extract jdk-8u101-linux-arm32-vfp-hflt.tar.gz to /opt directory.

    $ sudo tar zxvf jdk-8u101-linux-arm32-vfp-hflt.tar.gz -C /opt

    Set default java and javac to the new installed jdk8.

    $ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_101/bin/javac 1
    $ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_101/bin/java 1
    $ sudo update-alternatives --config javac
    $ sudo update-alternatives --config java

    After all is completed successful, verify with the commands below.

    $ java -version
    $ javac -version

    and this topic

    2. Installing Mycontroller
    The Mycontroller software is available on github: ,or if you want to download the software directly click here

    IMPORTANT: 1.0.0.Final was the latest one when this blog has written, maybe older when you installing, download the latest version from

    First logon to thr RPI with i.e. ssh, once logged on:


    Once the file is downloaded, extract the archive:

    gunzip -c mycontroller-dist-standalone-1.0.0.Final-bundle.tar.gz | tar -xvf -

    you should now see a directory called "mycontroller"

    # ls -l
    total 33104
    drwxr-xr-x 7 root root     4096 Nov  3 15:10 mycontroller

    Now the mycontroller software is on the system, you might want to move it to a directory of choice... (or not, up to you :))

    sudo mv ./mycontroller /opt

    Now it is time to start mycontroller

    go into the mycontroller/bin directory:

    cd /opt/mycontroller/bin

    and start mycontroler with the command:

    sudo ./

    You should see the output below

    java version: 1.8.0_151
    Start issued for Mycontroller

    (You might have guessed it but stopping mycontroller is done with the command)

    Now point a webbrowser to: https://<IP-OF-YOUR-RPI>:8443
    You should see a login screen

    If all of the above works, it is time to connect mycontroller to the radio, so goto step 3.

    3. Connecting to the gateway

    There are 2 ways of connecting the NRF24L01 radio,

    1. directly to the GPIO header, (See this article) from
    2. connected to an arduino and the arduino to USB of the RPI, (see this article) from

    The example below is based on an arduino connected to USB:
    0_1509720859961_Screenshot 2017-11-03 at 15.53.26.png
    I might be that the device file for your arduino is different compared to the example, some tips to find your device file:

    sudo dmesg | grep tty


    sudo ls -l /dev | grep tty

    and look for device files that point you to an USB one.

    Do not forget to add the user account you are using to the dialout group in /etc/group (only aplies to non-root user accounts!)

    4. How to auto-start mycontroller at boot time

    If Mycontroller needs to be started at boot time, it can be easily done with the script below:
    (make sure you change the path in the script to the directory where mycontroller is installed!! in the example below it is /opt/mycontroller)

    1. copy the contents below into a file called mycontroller in /etc/init.d
    #! /bin/sh
    # /etc/init.d/mycontroller
    # Provides:          mycontroller
    # Required-Start:    $remote_fs $syslog
    # Required-Stop:     $remote_fs $syslog
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Start daemon at boot time
    # Description:       Enable service provided by daemon.
    # The following part always gets executed.
    #echo "This part always gets executed"
    # The following part carries out specific functions depending on arguments.
    case "$1" in
        echo "Starting Mycontroller"
        echo "Stopping Mycontroller"
        echo "Usage: /etc/init.d/mycontroller {start|stop}"
        exit 1
    exit 0

    Once the file is ready, make it executable:

    sudo chmod 755 /etc/init.d/mycontroller

    The ls -l output should now be:

    #ls -l /etc/init.d/mycontroller
    -rwxr-xr-x 1 root root 790 Oct 22 11:32 /etc/init.d/mycontroller

    once this is all fixed execute the command below:

    sudo update-rc.d mycontroller defaults

    if the system reboots, mycontroller will be stopped/started automagically!
    check with:

    sudo service mycontroller status
    ā— mycontroller.service - LSB: Start daemon at boot time
       Loaded: loaded (/etc/init.d/mycontroller)
       Active: active (exited) since Sat 2017-10-28 17:42:10 CEST; 1 weeks 1 days ago

    Stopping mycontroller manually:

    sudo service mycontroller stop

    Starting mycontroller manually:

    sudo service mycontroller start

  • @tag said in How to install Mycontroller on the RaspberryPI (or any other linux/UNIX system):

    1. Installing Mycontroller

    The following commands in part 2 should be run with sudo:

    sudo mv ./mycontroller /opt
    cd /opt/mycontroller/bin
    sudo ./

  • MOD


    You are right!, Thx! šŸ‘
    Update done

  • Thanks much for this tutorial.

    If the mycontroller directory (part 2) is not moved to /opt, then the /etc/init.d/mycontroller script (part 4) needs to be edited appropriately.

  • The links in this getting started guide are quite old and should be updated. Or maybe better: Link to the download page instead:

    I ran 1.0.0.Final for some days now and wasn't aware that this is an old release.

  • @benhub Thank you! I have added the following lines in the original blog.

    IMPORTANT: 1.0.0.Final was the latest one when this blog has written, maybe older when you installing, download the latest version from

Suggested Topics