Internet connectivity and Calendar plugins

Is there any available plugin that I can use to check the Internet connectivity?
Also, a Calendar plugin would be nice to synchronize and show my google next calendar events.

Hi,

there isn’t either of those at this point, but I agree they sound useful.

I’d absolutely love a Google Calendar integration too!

I was thinking you can use regular events as event trigger in the rule engine, like a calendar entry “Commute to work” every morning triggers an action:
IF(Google calendar event = “Leave off to work”){Turn off lights, Arm security system, …}

What would you do with unregular events @flax1k?
What is the use case you have in mind besides making the calendar visible in nymea:app?

@mzanetti: then I need to build something in javascript and QML and put it in Magic scripting. I know how to do it in python, but I have to convert it somehow in JS &QML

@Simon : I need a calendar plugin to be notified by nymea of upcoming events, appointments, schedules, birthdays and according to the level of the events’ importance, starting/ending date or so on, the appropriate/desired effect to be done. Nothing special.
The base layer is to have a calendar plugin, after that, all is related to imagination and programming skills.

Thank you guys :smirk:

Maybe then you’ll find it interesting that in experimental there’s Support for python plugins. Here’s an example.

The docs aren’t 100% ready but for a start you should find anything you need in the preview docs at preview.nymea.io

I don’t know yet how to code/modify the nymea plugins.
I managed to code in JS something for checking the Internet connectivity, plus other functions for personal needs.
Next step, the calendar events - very important for me.
After that, I’ll try to figure it out how the nymea’s plugins are working/coded

I have downloaded the files from the new Fastcom plugin, as an example, as a starting point for my calendar plugin. So, I have the files: fasctom.pro and the json, py and requirements.txt files from the github.
According to the documentation, the next step required is to run the commands: qmake and make.
Nothing. I can’t obtain a `libnymea_integrationplugin.so file.
I’ve installed the QT creator with the same unfortunate result :unamused:
What am I doing wrong? Is the documentation updated?

Hmm… I see… So, python plugins don’t need to be compiled, you don’t need that .so file.

To begin with: As the python support is not released to stable yet (It will be in 0.24), you’ll need an experimental version of nymea and make sure to use the docs on preview.nymea.io as opposed to just nymea.io for the time being.

Please check out the section on python plugins here: https://preview.nymea.io/documentation/developers/integrations/plugin-code#python

The one thing you probably still need to do is to install the modules defined in the requirements.txt. The above section in the doc describes how to do that.

Once that’s done, you can go on to “loading the plugin”.

Thanks for the feedback. I’ll improve the docs on this to make this more clear.

Thank you for the quick answer.

Sorry for this off topic reply:
In order to write/update my scripts from Magic, I tried to login in the app, but surprise, I can’t.
I don’t understand why is that (and the password recovery option is missing)


I can login in the cloud
Screenshot from 2020-09-16 22-18-21
but I can’t view my things, or to access all my scripts from Magic, or to log in directly in the app, even they’re both in the same local network.

P.S. The nymea:core and the scripts from the Magic, that I wrote, are still up & running.

Hmm… Do you have another device with an app installation that’s still connecting? If so you could change the password with that one… If you haven’t, you can ssh into the Raspberry Pi (user nymea, password nymea unless you’ve changed it) and remove the file /etc/nymea/user-db.sqlite. Then restart it and it will ask you to set up a new user when you connect to it.

If you’re really sure you entered the correct password and believe there is a bug in the system, then I’d be curious to see your log files. Also please don’t delete that user-db file just yet but rather just move it to another place.

Still no luck…
I’ve tried the following steps:

  1. downloaded fastcom files from github on my nymea
  2. created a modules folder
  3. installed the required modules (fastdotcom, requests…)
  4. stopped the nymea service: sudo systemctl stop nymead
  5. restarted with the command:
    NYMEA_PLUGINS_PATH=/home/nymea/flaON/fastcom nymead -n -d fastcom -d ThingManager
  6. The info message says:
    I | ThingManager: Loading plugins from: “/home/nymea/flaON/fastcom”
    …meaning the plugin is still not loaded

What else should I check?

And by the way, the command nymea-plugininfocompiler is not found in my nymea.

Wait, when it says “Loading plugins from: …” it means that nymea is searching for plugins in that particular folder.

So far it looks quite alright. Is there anything after your message in (6.) which would hint for an issue with loading it? Otherwise I would assume it should be loaded fine…

nymea-plugininfocompiler is in the nymea-dev-tools package. Soon we’ll have a “nymea-sdk” package which should pull in everything and make the dev env installation easier.

No, the fastcom plugin is not loaded. If it would be loaded it should appear in my things list or in the to be installed plugins list.

I | ThingManager: Loading plugins from: “/home/nymea/flaON/fastcom”
I | ThingManager: Loading plugins from: “/usr/lib/arm-linux-gnueabihf/nymea/plugins”
I | ThingManager: Loading plugin from: “/usr/lib/arm-linux-gnueabihf/nymea/plugins/libnymea_integrationpluginanel.so”
I | ThingManager: **** Loaded plugin “anelElektronik”
I | ThingManager: * Loaded vendor: “anelElektronik” QUuid("{0e0a7d31-9f6b-402f-8029-8f1b2a77f994}")
I | ThingManager: * Loaded thing class: “netPwrCtlHome”
I | ThingManager: * Loaded thing class: “netPwrCtlPro”
I | ThingManager: * Loaded thing class: “netPwrCtlAdv”
I | ThingManager: * Loaded thing class: “netPwrCtlHut”
I | ThingManager: * Loaded thing class: “socket”
I | ThingManager: Loading plugin from: “/usr/lib/arm-linux-gnueabihf/nymea/plugins/libnymea_integrationpluginawattar.so”
I | ThingManager: **** Loaded plugin “awattar”

I will try something similar with a plugin written in Javascript, maybe I’ll be luckier :blush:
Or I will wait for the SDK package to be available in the new version of nymea. :+1: