89 Commits

Author SHA1 Message Date
Michael Zanetti
ae38e185b6 more work... not really working yet 2021-01-02 14:33:15 +01:00
Michael Zanetti
5f1855ff44 Don't log all states by default any more 2021-01-02 14:33:15 +01:00
Jenkins nymea
8f27d36698 Merge PR #375: Reorder shutdown 2020-12-21 18:01:07 +01:00
Jenkins nymea
9b076a9873 Merge PR #370: Prevent multiple finish calls on API objects 2020-12-21 18:00:59 +01:00
Jenkins nymea
2d132ab57e Merge PR #346: Add ZigBee hardware resource and network management 2020-12-21 18:00:42 +01:00
Jenkins nymea
48bbe244a7 Merge PR #344: Add a command line argument for additional server interfaces 2020-12-21 18:00:41 +01:00
Michael Zanetti
5e409be5b8 Reorder shutdown
The server manager might be used by things, so we need to destroy things first
2020-12-16 01:28:22 +01:00
Michael Zanetti
f1fa59c535 Fix initialisation of the global logging category variable
Just accessing the raw variable doesn't guarantee the order
of construction and may lead to crashes in certain constellations.
2020-12-14 23:38:17 +01:00
Michael Zanetti
bfc4476019 allow the same plugin fetching a zigbeenode multiple times
inform the zigbeemanager about things finishing loading
2020-11-16 22:18:19 +01:00
Michael Zanetti
57ec37712a tell the zigbee resource when we're done loading things 2020-11-16 17:58:13 +01:00
Simon Stürz
255a6dc090 Move zigbeemanager include into the cpp 2020-11-16 14:50:16 +01:00
Simon Stürz
c3508acc23 Pass nodes into the zigbee resource and implement available for resource 2020-11-06 18:36:22 +01:00
Simon Stürz
fb74df8f81 Start integrating zigbee into nymea 2020-11-06 18:34:54 +01:00
Michael Zanetti
61a07c3bb1 Add a command line argument for additional server interfaces 2020-10-27 09:44:00 +01:00
Michael Zanetti
c7f957f201 some more python plugin work 2020-10-15 22:34:06 +02:00
Jenkins nymea
70c9c7f495 Merge PR #323: Fix cleanig up tags that are not needed any more 2020-08-14 13:09:34 +02:00
Jenkins nymea
bd0072e48f Merge PR #307: Loggingcategories 2020-08-14 13:09:34 +02:00
Michael Zanetti
1066e768c9 Fix cleaning up of tags that are not needed any more 2020-08-13 17:40:08 +02:00
Michael Zanetti
75afab7eaf Add nymea logging categories as opposed to just Qt ones 2020-06-17 14:32:35 +02:00
Michael Zanetti
021f2479d9 Vaguely inform the plugin about the origin of actions.
Fixes #277
2020-06-16 17:49:41 +02:00
Jenkins nymea
94152ebe78 Merge PR #287: Drop internal networkmanager and use libnymea-networkmanager instead 2020-06-07 19:16:23 +02:00
Jenkins nymea
b1521c8207 Merge PR #286: Log DB schema 4 2020-06-07 19:16:23 +02:00
Michael Zanetti
bb30a451b3 New DB schema version
* Store plaintext values in log db again
* Use msecs precision instead of secs
* rename column deviceId to thingId
2020-05-04 11:32:42 +02:00
Michael Zanetti
9f856f3ce9 Add support for generic IO connections 2020-05-01 14:43:23 +02:00
Michael Zanetti
58c4dcb6c9 Drop internal networkmanager and use libnymea-networkmanager instead 2020-04-23 15:08:02 +02:00
Michael Zanetti
a53e714f25 Allow removing child things if they're not autocreated 2020-03-20 11:11:46 +01:00
Michael Zanetti
8208473302 bump api 2020-03-05 16:16:57 +01:00
Michael Zanetti
3e425fc55b Rename devices to integrations/things 2020-03-02 13:40:26 +01:00
Michael Zanetti
8f5536ba1a Update copyright 2020-01-23 20:07:26 +01:00
Jenkins nymea
5cbace14bf Merge PR #248: Disconnect all slots of nymea:core on shutdown 2020-01-22 23:47:15 +01:00
Jenkins nymea
2d08e7a028 Merge PR #241: Improve log DB housekeeping performance 2020-01-22 23:47:15 +01:00
Jenkins nymea
e256ac034d Merge PR #238: Add System Time API 2020-01-22 23:47:14 +01:00
Michael Zanetti
de0395f115 Disconnect all slots of nymea:core on shutdown 2020-01-15 14:17:01 +01:00
Michael Zanetti
03c8e8d114 Improve log DB housekeeping performance
Getting row count on a db with approx 200000 entries on an RPi takes
about 500ms. To avoid this, this branch keeps better track of entries
in the DB and only queries DB count if we can't calculate it ourselves.
Trimming itself takes some 150ms. To reduce those calls it changes the
threshold of when to trim the DB from a fixed value of 100 to 1% of
maxDBSize.

Last but not least, getLogEntry() calls are now prioritized over
appendLogEntry() calls in order to stay responsive to client apps even
if the DB is overloaded with a huge job queue.

If the job queue grows to over 1000 jobs, logs of the same device/type
will be discared to avoid log flooding.
2020-01-05 23:46:51 +01:00
Michael Zanetti
9b07216768 Add system api to configure the system time
This gets rid of the locally kept time zone which caused issues
in plugins and the ScriptEngine.
2019-12-15 12:44:14 +01:00
Michael Zanetti
24cecf9d47 Add tests for the scriptengine 2019-12-10 18:49:28 +01:00
Michael Zanetti
3a9a0a0abc Add scripts api namespace 2019-12-01 00:08:57 +01:00
Michael Zanetti
d4081195d4 Some more work on the script engine 2019-12-01 00:07:35 +01:00
Michael Zanetti
4c0c95b1a8 Add a ScriptEngine 2019-12-01 00:07:35 +01:00
Michael Zanetti
c7dd26d525 cleanup, fix last tests 2019-11-16 00:44:08 +01:00
Michael Zanetti
3eac06de6e Threaded log database
This
a) makes the log db threaded by using QtConcurrent to run queries in a
different thread but still keeps ordering of the queries and always
only allows a single query at a time (QSql is not threadsafe). This fixes
removeDevice calls failing if we take more than $jsonprc_timeout to clean
a deleted device from the DB and keeps nymead responsive during that too.

b) generally improces performance of the system by not requiring operations
(emitting events, changing states) to wait for the sync log db entry to be
made.

c) drops some of the houskeeping code on nymea startup. While this will still
do log db housekeeping if the DB exceeds maxDbSize, it will not run
housekeeping on the DB any more at application startup. Reasoning for this
is that there have been reports of rules/log entries beimg destroyed if a
plugin can't be found at application startup. Given our general direction
of working towards more dynamic plugin loading, this might happen more often
in the future and we sure don't want to destroy rules etc when we just
temporarily miss a plugin.

d) tries to fix issue #226 by rotating the DB not only when it fails to open
initially, but also when it fails to insert new entries.
2019-11-15 18:33:10 +01:00
Michael Zanetti
ec15e664e1 cleanup warnings and allow setting "unknown" debug categories 2019-11-06 13:38:22 +01:00
Michael Zanetti
baaa719b6a Restructuring json done 2019-11-01 20:55:45 +01:00
Michael Zanetti
e2cf9cb5c3 More work on the experience mode framework 2019-11-01 20:55:45 +01:00
Michael Zanetti
fab1871ea1 loading plugins working 2019-11-01 20:53:41 +01:00
Michael Zanetti
a47bded031 add loading of plugins 2019-11-01 20:53:41 +01:00
Michael Zanetti
f1ca2a5b86 Add experience mode plugins 2019-11-01 20:46:55 +01:00
Michael Zanetti
03b8be22d6 Drop old REST server 2019-11-01 20:14:00 +01:00
Jenkins nymea
d589b66e3c Merge PR #218: Improve live logs in debug interface and rework logging rules 2019-10-18 14:57:23 +02:00
Michael Zanetti
7f0f2d1d09 Rework devicemanager and plugin api 2019-10-16 17:56:49 +02:00