CoIoT is a shelly specific extensions to CoAP:
It adds a new Request code which is not part of the CoAP spec
as well as using CoAP multicast (which is part of CoAP).
This commit
* renames "statusCode" to "reqRspCode" which describes
the actual field more precisely as it is in fact a Request or Response
code, not a status code.
* Allows joining multicast groups, by default using the CoAP specified
multicast address.
* Allows setting custom Request codes in requests, as well as
processing the PDUs Request/response code by the client.
* Fixed an indexOutOfRange warning when creating coap requests
because the first addOption() call was calling
m_options.insert(1) on an empty list.
* Old code was appending multiple UDP datagrams to a single big Coap
message, however, Coap is specified to only send s single datagram
per message. The datagram length specifies the payload size.
* some boolean member variables weren't initialized which resulted in
occational wrong flags.
* Parsing had issues with determining the option length in some occations
and also would crash when receiving coap messages without any options
or payload. To get rid of the complex and erraneous index calculations,
the entire package parsing is now using a DataStream.
(This makes it work with Shelly devices)
Fixes a theoretical memory leak (m_cacheSettings wasn't delete)
which isn't really an issue in practice but valgrind complains on it.
Fixes a typo: m_reties -> m_retries
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.
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.