Commit Graph

18 Commits (7633cfe9fa1149bd7d121cf901c145b3d0347d6b)

Author SHA1 Message Date
jenkins 79e8c52765 Merge PR #527: Print a better warning when setStateValue() is called with a wrong name 2022-06-16 00:20:49 +02:00
jenkins 45c20c56cc Merge PR #526: Fix Things filter by param method 2022-06-16 00:20:47 +02:00
Michael Zanetti 48095b2ced Print a better warning when setStateValue() is called with a wrong name 2022-05-31 17:17:52 +02:00
Simon Stürz 964edeee5d Things filter by param 2022-05-23 16:10:12 +02:00
Michael Zanetti bbc585e92e Fix filters genering wrong data types
When enabling a jitter filter on integer states (e.g. a signal
strength that repeatedly jumps up and down by 1), old code
may cause integer state to be populated with floating point values
as the filtering happens after the intial validation for the new
value being valid.
2022-05-13 11:25:48 +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 262e490b9b Add more "by name" thing methods and c++11 list_initializers for lists 2021-12-09 18:00:18 +01:00
Michael Zanetti df5d3550ba Add support for dynamic min/max state values 2021-12-09 17:59:52 +01:00
Michael Zanetti 15faf72785 Add more methods to get to states by name instead of id 2021-07-13 12:27:16 +02:00
Michael Zanetti 3774a4adc9 Add some convenience methods to access states/stateTypes ba name 2021-06-25 13:48:44 +02:00
Michael Zanetti b92897600c Add support CONFIG+=asan for building with address sanitizer 2021-03-14 21:48:36 +01:00
Michael Zanetti ae38e185b6 more work... not really working yet 2021-01-02 14:33:15 +01:00
Michael Zanetti 56448543df An attempt to make it configurable 2021-01-02 14:33:15 +01:00
Michael Zanetti 12eef39013 Fix potential wrong state signal
Make sure to emit the very same value we store
2020-12-06 23:33:23 +01:00
Jenkins nymea 768b6a877e Merge PR #314: Fix conversion of values 2020-08-14 13:09:34 +02:00
Michael Zanetti 85146abca5 Fix type conversions of values
This fixes 5 issues in regard to types of values:

1) Default values for params in the metadata were not converted properly,
most visibly on integer values being loaded as double values.

2) Param values coming in from jsonrpc were not converted properly.

3) The plugin might set state values with invalid types or being out of range.

4) If, for some reason (e.g. earlier versions of nymea, or a plugin setting
its own params in code with a wrong type), there was a param value with a
wrong type in the system, we stored that wrong type and restored it on loading
of plugin params while instead it really should be converted to the specified
type in the ParamType.

5) If a plugin is not loaded for a configured thing, the old code would
not initialize the states properly but upon shutdown save those invalid
values to the cache.
2020-07-15 00:22:43 +02:00
Michael Zanetti f029184651 Allow emitting events from things directly 2020-06-16 16:16:23 +02:00
Michael Zanetti 3e425fc55b Rename devices to integrations/things 2020-03-02 13:40:26 +01:00