Getting started with nymead

Once you have installed nymea successfully you can start the nymead daemon. There are two ways to start nymead:

  • starting nymea as daemon (service)
  • starting nymea as application (terminal application) and see the full debug output.

In order to get help, just type in the terminal nymead -h:

$ nymead -h
Usage: nymead [options]

nymea is an open source IoT (Internet of Things) server, 
which allows to control a lot of different devices from many different 
manufacturers. With the powerful rule engine you are able to connect any 
device available in the system and create individual scenes and behaviors 
for your environment.

nymead 0.9.0 © 2014-2018 guh GmbH
Released under the GNU GENERAL PUBLIC LICENSE Version 2.

API version: 1.3

  -h, --help                                Displays this help.
  -v, --version                             Displays version information.
  -n, --no-daemon                           Run nymead in the foreground, not
                                            as daemon.
  -p, --print-all                           Enables all debug categories.
                                            Single debug categories can be
                                            disabled again with -d parameter.
  -l, --log <logfile>                       Specify a log file to write to, if
                                            this option is not specified, logs
                                            will be printed to the standard
  --session                                 If specified, all D-Bus interfaces
                                            will be bound to the session bus
                                            instead of the system bus.
  -d, --debug-category <[No]DebugCategory>  ...

Also a manual page is available:

$ man nymead

By default, nymead will start as a daemon. If you want to start nymead as an application, you can pass the parameter -n and it will start in the foreground.

If you want to see a special debug category, you can pass that category to the parameter. You can find all available categories in the help message (nymead -h):

Example: start nymead in the foreground and enable the JsonRpc and Hardware and disable the DeviceManager debug messages:

$ nymead -n -d JsonRpc -d Hardware -d NoDeviceManager

Systemd service

The nymead package also provides systemd service, which allows you to start, stop, restart and get the status of the nymea-daemon.

Start the service:

$ sudo systemctl start nymead

Stop the service:

$ sudo systemctl stop nymead

Restart the service:

$ sudo systemctl restart nymead

Get the status of the service:

$ sudo systemctl status nymead

Autostart nymead

If you want to auto start nymead on boot, you can enable the service by calling the following command:

$ sudo systemctl enable nymead

Created symlink from /etc/systemd/system/ to /etc/systemd/system/nymead.service.

Disable autostart nymead

If you want to disable auto starting nymead on boot, use the following command:

$ sudo systemctl disable nymead

Removed symlink /etc/systemd/system/

Follow debug output

If you have nymead running in the background (as daemon and started with systemd) you can see the live debug out by monitoring the log file. You can do that with the following command:

$ journalctl -f -u nymead

Add a custom plugins path

If you want nymead to load plugins from a custom directory, like a build directory of a nymea plugin, you can add the path to the environment variable by passing the following command:

$ sudo NYMEA_PLUGINS_PATH=/path/to/plugin nymead -n -p

As an alternative, you can also export the environment variable NYMEA_PLUGINS_PATH for the current bash session like this:

$ export NYMEA_PLUGINS_PATH=/path/to/plugin
$ nymead -n -p

You can also export mulitiple paths by splitting them with the : character:

$ export NYMEA_PLUGINS_PATH=/path/to/plugin:/path/to/other/plugin
$ nymead -n -p

You can check in the debug output if the path will be used to load plugins and which plugins where loaded from that directories.