116 Commits

Author SHA1 Message Date
jenkins
0d85868465 Merge PR #702: Fix some typos in the code base 2025-09-23 14:12:43 +02:00
Simon Stürz
2acf7784a6 Update the entire Qt6 code to new signal slot connections
Update logging cathegories and allign coding style
2025-09-11 10:09:24 +02:00
Simon Stürz
f5c4bd16ac Add Qt6 support
Add Qt6 debian packaging
2025-09-11 10:09:24 +02:00
Simon Stürz
4e27699915 Fix some typos 2025-07-02 14:58:49 +02:00
Michael Zanetti
4e509841b0 Rework the log engine to use influxdb instead of sql 2023-05-08 23:38:34 +02:00
Michael Zanetti
92197cb97c Refactor NymeaCore class
This moves all the things and rules logic away from NymeaCore
into their respective modules where it belongs.

One major change is the removal of the removePolicy functionality.
This was somewhat broken as it was only working for rules but not
for all the other modules like scripts, experiences etc. After
an attempt to create something that works with all modules it
really seemed that this does not make a lot of sence after all,
given that updating rules would in most cases leave something
very broken behind and removing them was the only sane thing to do.

On the other hand, experience plugins may not work well with such
a policy eithre as they may require to do their own special thing.

So in the end the removePolicy was dropped altogether. Apps should
instead figure out themselves what removal of a thing may imply and
inform the user about that beforehand.
2023-01-24 17:56:04 +01:00
Simon Stürz
41a5d2caf0 nymea testbase: remove extern plugin info from testlib header 2022-10-03 15:17:29 +02:00
Michael Zanetti
327fba5797 Fix creating rules without giving action params that have a default value 2022-09-07 20:25:33 +02:00
Michael Zanetti
2a91dad1f0 Don't generate events for state changes any more
Up until now, nymea would generate EventTypes for every StateType
as well as emit an Event (along with a StateChanged notification) for
every change. This results in a lot of duplicated network traffic
which is of not much use. The StateChanged notification contains
all the information in the Event too and nymea:app actually never
really used Events for state changes.

This commit removes the events from the ThingClass, making it a lot
smaller and stops emitting Events for state changes.

As this is breaking the behavior, the JSONRPC API major version
is bumped.
2022-02-08 10:38:41 +01:00
Michael Zanetti
717b4f33cc Remove deprecated Devices, Action, Events, States namespaces from JSONRPC 2022-02-08 00:29:07 +01:00
Michael Zanetti
b9be92df2e Add state based value comparison in rules 2020-12-04 16:16:55 +01:00
Michael Zanetti
399f406d10 fixes 2020-07-27 19:38:21 +02:00
Michael Zanetti
bcb35bf9d7 fix testrules 2020-03-06 11:26:19 +01:00
Michael Zanetti
8208473302 bump api 2020-03-05 16:16:57 +01:00
Michael Zanetti
2fbbaeda97 More work 2020-03-03 16:54:55 +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
Michael Zanetti
b97e4e5b0c Add support for JS device plugins 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
3cbd01c1d2 drop all pack/unpack methds 2019-11-03 21:24:16 +01:00
Michael Zanetti
feee5ef23a Fix tests 2019-11-01 20:55:45 +01:00
Michael Zanetti
baaa719b6a Restructuring json done 2019-11-01 20:55:45 +01:00
Michael Zanetti
5e3bc2acbd Drop JsonTypes class by distributing logic to json handlers
This is required in order to be able to be more flexible in registering
new types/methods.
2019-11-01 20:46:55 +01:00
Michael Zanetti
0d00342b3a fix tests 2019-10-30 17:35:43 +01:00
Michael Zanetti
9b1b6d86e6 Allow more granular notification subscriptions in API 2019-10-19 14:13:48 +02:00
Michael Zanetti
7f0f2d1d09 Rework devicemanager and plugin api 2019-10-16 17:56:49 +02:00
Michael Zanetti
51f5538772 Improve the PIC to detect duplicate UUIDs, give metter messages. Clean up mock plugin. 2019-07-15 22:55:11 +02:00
Michael Zanetti
d24abfe3d0 Move devicemanager's implementation out of libnymea into libnymea-core 2019-07-15 22:52:52 +02:00
Michael Zanetti
299052d2f7 Fix processing of rule action params and make tests pass again 2019-04-10 13:40:16 +02:00
Michael Zanetti
5fcfe1a11c Update removeConfiguredDevice to update rules as appropriate 2019-04-10 13:40:16 +02:00
Michael Zanetti
774452ff7c Add support for state based rule action params 2019-04-10 13:40:16 +02:00
Michael Zanetti
49bcfe72f5 Fix Scenes getting activated by state changes 2019-04-08 13:55:15 +02:00
Michael Zanetti
81e4db3a90 Handle binding loops in rules properly 2019-04-08 13:55:15 +02:00
Michael Zanetti
635a4e3ef2 fix mock device and introduce tests logging category 2019-04-08 13:55:15 +02:00
Michael Zanetti
15938cafb3 Fix an issue where Rules might not be initialized properly at startup 2019-04-08 13:55:15 +02:00
Michael Zanetti
371c2f76c2 move servers into subdir, cleanup some includes 2019-04-08 13:55:15 +02:00
Michael Zanetti
cdf5c63b59 remove rules which are left without any action after a device removal 2019-04-08 13:55:15 +02:00
Michael Zanetti
6cf060aa93 fix an issue where state values in rules could be casted wrong from string to double 2019-04-08 13:55:15 +02:00
Michael Zanetti
157b0b2b2c use exitActions for else-action in event based rules 2019-04-08 13:55:15 +02:00
Michael Zanetti
abd2305bc0 add support for paramTypes by name 2019-04-08 13:55:15 +02:00
Michael Zanetti
e21c2f16a5 add support for interface based StateDescriptors 2019-04-08 13:55:15 +02:00
Michael Zanetti
11d56d1020 allow passing params if QVariant can convert them 2019-04-08 13:55:15 +02:00
Michael Zanetti
67a535619f fix typos as reported by Krazy2 2019-04-08 13:55:15 +02:00
Michael Zanetti
0f46245230 fix stateevaluator bug where it would not properly use the OR operator 2019-04-08 13:55:15 +02:00
Michael Zanetti
84854868ea fix packing rules for interface based events and actions 2019-04-08 13:55:15 +02:00
Michael Zanetti
b8a86b095d copyright headers guh -> nymea 2019-04-08 13:55:15 +02:00
Michael Zanetti
36d4f89b24 namespace guhserver -> namespace nymeaserver 2019-04-08 13:55:15 +02:00
Michael Zanetti
34d68ab38a guhtestbase -> nymeatestbase 2019-04-08 13:55:15 +02:00