• Set up the build environment
  • Set up the build environment

    Video for this tutorial

    Assuming you are working on an Ubuntu system here are the steps how to set up the build environment. Basically you can choose your preferred SDK but all tutorials are based on the Qt Creator and we reccommend to use that one. You can also use the Ubuntu SDK, which is basically a modified Qt Creator.

    Note: Please take care that you are using the Qt version from the system for building. The nymea server will always be built with the official Qt version for the appropriate system version. The plugin must have the same version like the nymea server.

    Install Qt

    In the first step you need to install the Qt libraries:

    $ sudo apt-get install qtcreator qt5-default qtbase5-dev python dpkg-dev debhelper hardening-wrapper

    Install nymea dependencys

    You can find a good instructions how to install the nymea repository on your system here:

    nymea install wiki

    For example, if you are working on Ubuntu 15.04 Vivid, you can create a source list file and add the nymea repository like this:

    $ sudo nano /etc/apt/sources.list.d/nymea.list

    Copy following 3 lines in the /etc/apt/sources.list.d/nymea.list file, save and close it

    ## nymea repo
    deb http://repo.nymea.io xenial main
    deb-src http://repo.nymea.io xenial main

    Now you need to add the public key of the nymea-repository to your key list with following command:

    $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 6B9376B0

    Update your package lists:

    $ sudo apt-get update

    Now you are ready to install the nymea packages:

    $ sudo apt-get install nymea nymea-webinterface nymea-cli nymea-doc libnymea1-dev
    • nymea → the nymea package is a meta package and will install the nymead, libnymea1 and nymea-plugins package so you can start the nymea daemon.
    • nymea-webinterface → the nymea-webinterface package will install the webinterface for nymea, which is accessable on http://localhost:3333.
    • nymea-cli → the nymea-cli package will install the command line interface for the nymea JSON-RPC API. You can find more information here.
    • nymea-doc → the nymea-doc package will install the offline documentation on your system (this homepage). You can access the documentation in your brwoser with file:///usr/share/doc/nymea/html/index.html.
    • libnymea1-dev → the libnymea1-dev package brings all development files of nymea (header files and lib) which will be needed to write a plugin.

    Once you have successfully installed everything you are ready for Getting started.