Some plugins may support network discovery, but may not be able to clearly
identify a device and return a list of discovery results that may
be the device, but also may not. As this breaks some app flows they
will be marked as "weak" discovery and can be excluded from said setup
wizards.
NOTE: This commit does not bump the API version even though it should
to avoid merge conflicts with other branches that do bump the version.
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.
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.