The nymea snap


The nymea server is also available as a snap package for amd64 and armhf. The snap contains the nymead service, the default nymea-plugins and nymea-cli. You can find the snap build scripts here. If you have a running snapd daemon on your system, you should find the nymea package using following command:

$ snap find nymea

Name   Version  Developer  Notes  Summary
nymea  0.9.0    guh-gmbh   -      An open source IoT server

You can install the snap using following command:

$ sudo snap install nymea
nymea 0.9.0 from 'guh-gmbh' installed

You can get information about the snap using following command:

$ snap info nymea

name:      nymea
summary:   An open source IoT server
publisher: guh-gmbh
contact:   https://nymea.io
license:   unknown
description: |
  The nymea daemon is a plugin based IoT (Internet of Things) server. 
  The server works like a translator for devices, things and services 
  and allows them to interact. 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.
snap-id: vuamj1HCwJHJ1cxi7FAbMxvPyV4ae5qW
commands:
  - nymea.nymea-cli
services:
  nymea.nymead: simple, enabled, active
tracking:       stable
installed:      0.9.0 (2) 72MB -
refreshed:      2018-03-09 17:38:11 +0100 CET
channels:
  stable:       0.9.0 (2) 72MB -
  candidate:    0.9.0 (2) 72MB -
  beta:         0.9.0 (2) 72MB -
  edge:         0.9.0 (2) 72MB -

Interact with the snap


  • Run the nymea-cli command line interfaces

    $ nymea.nymea-cli
  • Get the status of the daemon:

    $ systemctl status snap.nymea.nymead.service
  • Stop the daemon:

    $ sudo systemctl stop snap.nymea.nymead.service
  • Restart the daemon:

    $ sudo systemctl restart snap.nymea.nymead.service
  • Disable autostart of the daemon:

    $ sudo systemctl disable snap.nymea.nymead.service
  • Enable autostart of the daemon:

    $ sudo systemctl disable snap.nymea.nymead.service
  • Get the stdout from nymead:

    $ sudo journalctl -f -u snap.nymea.nymead.service

Connect the needed interfaces


Since snap is very stric about permissions, you need to connect the slots and plugs needed by the nymea snap.

  • nymea:avahi-control
  • nymea:avahi-observe
  • nymea:bluez
  • nymea:network-manager

Once you connected an interface, you need to restart the nymea daemon using sudo systemctl restart snap.nymea.nymead.service.

  • Enable avahi discovery

    sudo snap connect nymea:avahi-control
    sudo snap connect nymea:avahi-observe
  • Enable bluetooth support

    sudo snap connect nymea:bluez
  • Enable network-manager support

    sudo snap connect nymea:nymea:network-manager

Switch channel


If you want to switch the release channel of the nymea snap, you can take a look with snap info nymea which channels are available and which version is released in each channel.

Here you can see an example of the channel list. The tracking field tells you which channel is currently installed and gets updated.

channels:
  stable:       0.9.0 (2) 72MB -
  candidate:    0.9.1 (3) 72MB -
  beta:         0.9.2 (4) 73MB -
  edge:         0.9.3 (5) 74MB -
  • Switching to stable:

    $ sudo snap refresh nymea --stable
  • Switching to candidate:

    $ sudo snap refresh nymea --candidate
  • Switching to beta:

    $ sudo snap refresh nymea --beta
  • Switching to edge:

    $ sudo snap refresh nymea --edge