background_background_header@2x.webp
nymea:app
Client for Nymea professional IoT server

# nymea:app client

Authors: tutorial the Ubuntu App Cats
Contact: info@ubports.com
Category: #Utilities
Where to get it: OpenStore

What is nymea:app all about?

According to its creators, it is a professional IoT platform which allows users to link smart devices and services together. The nymea:core software is used for smart products like home gateways, intelligent and connected home appliances, energy control services, asset management applications, sensor data collectors and more. Nymea software is open source, written in Qt and offers the tools & step-by-step guides for your own device/service integration.

Nymea:app platform support:

  • Android

  • Windows

  • macOS and iOS

  • Linux Desktop

  • Embedded Linux

  • Ubuntu Touch phone


Why is Nymea interesting for UT users?

We all know Ubuntu Touch lacks some interesting everyday apps. One of them is perhaps an app to control a home wireless music speaker. For some time, Bose and Sonos device plugins have been included in nymea:core and that means you can now control those wireless speakers with your nymea Ubuntu Touch client and running nymea:core on a low end IoT device, on a Raspberry Pi in a home network and talk to IoT devices in the home via WiFi, Bluetooth, ... or  on a Linux PC (or VM) or even in a cloud server instance.

We have to be honest here, the control and settings options available for these speakers are not yet at the same level as in the Bose and Sonos original brand client apps available in Play Store and App store, but the first steps have been made!

 

Where to start: setup requirements

To make nymea:app useful you will first need to install nymea:core operating system and by far the best way to test it and gain first hand experience is to install it on a Raspberry Pi. Of course you will also need some IoT device to connect to.

What is interesting about nymea:core is that does not depend on a cloud or other external facility and can connect directly to a wide range of devices and services. The cloud is an option if you want to control your device from outside your home network. Not very interesting for a wireless speaker but quite possibly for a home heating or house plant watering system.

According to the nymea wiki page to setup on your Raspberry Pi 2/3/4 there are just 8 short and easy steps you have to follow. It is super easy and quick.

One of the steps, number 3, is to download the nymea:app clienthere is the link for the Ubuntu Touch version, kindly made and maintained for us by Michael Zanetti. On your phone just open the OpenStore app and search for "nymea" client.

I have also been comparing the Ubuntu Touch client with those for iPhone and Android devices and I can say they are practically the same in terms of their behavior.

Odoo image and text block

Configuration

The easiest way to configure everything is to open and use the nymea:app client, but you can also do it manually.

As soon as you open your nymea:app client in Ubuntu Touch with your Raspberry Pi and its nymea:core running, the client will find it automatically and guide you through the necessary ‘next, next’ steps.

    Odoo - Sample 1 for three columns

    Adding SoundTouch

     

    Odoo - Sample 2 for three columns

    SoundTouch added


    Odoo - Sample 3 for three columns

    Playing SoundTouch


    My practical experience of using Nymea 

    As I mentioned above, the controls available for my Bose SoundTouch speaker are very basic: I can turn the device ON and OFF, I can play the latest channel used by another device, set with the proprietary brand client app or via Bluetooth. I can also control the volume, however I cannot configure the speaker or switch among the different presets.

    Regarding the volume, while I was testing the stable version I was experiencing a very slow reaction time but it worked. I checked whether it was the same with the iPhone and it was. The bug was reported and it has been resolved. Now, when testing the latest release candidate release (version 0.18, which is now with QA), the volume control works perfectly. And yes, you can switch channels; just use your Nymea:app client.

    In your Nymea:app, go to System settings,select System update, click on the settings wheel found in the top-right corner and select your new channel. The system will update and restart, then automatically reconnect. All done, enjoy! From now on you can also help by reporting your experience to developers and enjoy the improvements as they come.

    Michael Zanetti, one of the Nymea project main leaders said:

    The new release should be one of the most awesome ever, as it will include no less than 8 new plugins and new scripting support.

    A future feature which in exceptional cases you will have need of is to enable password recovery to be sent by email or allow for a reset by push button authentication. According to the developers these options are not yet part of the official image but they can be installed manually now. With that, you will be able to just press a button and get a new authorization token.

    If you don’t want to do the manual install, what you can do is to delete: /etc/nymea/user-db.sqlite and restart nymea:core, which will then allow you to start afresh and create a new account with the Nymea:app. The tutorial below will not be necessary soon as the next update will come with new easy password refresh setup included. If you wish you can skip the current tutorial below.

    How-To:

    Login with SSH protocol:

    nymea@nymea:~ $ ssh nymea@nymea.local    # password: nymea

        • change the „nymea.local“ above part with your home hostname IP address

        • the password can be different in case you have already change it

    go to /etc directory:

    nymea@nymea:~ $ cd /etc/nymea

    list the fields you are to verify so you know you are at the right place:

    nymea@nymea:/etc/nymea $ ls

    you should see this:

    devices.conf       nymead.conf                tags.conf

    devicestates.conf  nymea-networkmanager.conf  user-db.sqlite

    now delete the user-db.sqlite file:

    nymea@nymea:/etc/nymea $ sudo rm user-db.sqlite

    you should see this, and a request to type your nymea password:

    We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

        #1) Respect the privacy of others.

        #2) Think before you type.

        #3) With great power comes great responsibility.

    [sudo] password for nymea: nymea

    That is all, your nymea:app will welcome you again with its first wizard settings screen.

    Odoo - Sample 1 for three columns

    First setup

     

    Odoo - Sample 2 for three columns

    First setup


    Odoo - Sample 3 for three columns

    First setup


    In addition to what I have said above, I should mention that the currently available nymea:app client for Ubuntu Touch has an unconfined AppArmor profile and therefore has access to restricted system data. There are probably ways in which that can be fixed but putting in that investment of time depends in part on the amount of interest shown by the UBports community. Michael Zanetti has pointed out that avahi network service discovery (https://avahi.org/) doesn’t work if the app is confined, so it would not be able to find your nymea:core in the network.

    If I remember correctly, during one of the UBports Q&A sessions in 2019 a suggested workaround for this kind of situation was proposed by Jan. Ideally, we would want all apps to be confined, if that is possible. We will have to wait and see if there is progress on this issue. But in the process of writing this blog it has become clear how rapidly the Nymea system is evolving.

    We think Nymea:app client represents a big step forward for Ubuntu Touch today but with the coming of 5G and the never ending expansion of new types of IoT peripherals, interest in it will only increase.

    Why not to try it today!

    What do you think of this app?

    Explore the full spectrum of Ubuntu Touch Apps at OpenStore - The official Ubuntu Touch app store.

                      background_background_header@2x.webp
                      Ubuntu Touch Q&A 68
                      FOSDEM 2020 coming