Commit Graph

42 Commits (34ade62e4eb1575a6f9aae63a4b1f8564f17e3a2)

Author SHA1 Message Date
jenkins b7fe5a624e Merge PR #82: PowerConfiguration cluster: Add battery voltage 2023-02-21 17:42:47 +01:00
Michael Zanetti 9306d15c92 PowerConfiguration cluster: Add battery voltage 2022-12-30 23:22:41 +01:00
Michael Zanetti eb833edee9 Align command signal names
Originally the intention was to add the commandReceived() signal to
the ColorControl cluster but noticing differences in various clusters
wrt commandSent() and commandReceived() namings of those signals.

Decided to commandReceived() as it feels more natural to use
and also the Zigbee cluster spec uses that wording.
2022-12-30 20:13:50 +01:00
Michael Zanetti ac7972df35 Complete the OTA cluster implementation 2022-10-12 12:17:30 +02:00
Michael Zanetti 725272e1fa Add Time cluster implementation 2022-06-20 00:03:50 +02:00
Michael Zanetti d210d696e0 Add Battery Alarm State support to PowerConfiguration cluster 2022-05-13 11:20:49 +02:00
Michael Zanetti a38e8be190 Simplify ZigbeeCluster inheritance
Instead of having 2 methods (setAttribute and addOrUpdateAttribute)
to allow specific cluster implementations to override behavior,
merge them into one, setAttribute, and use standard C++ syntax for
calling a base class implementation.
2022-02-14 11:23:36 +01:00
Michael Zanetti 7ccbfc3a6d Add helpers for mandatory attributes in AnalogInput cluster 2022-02-14 11:21:55 +01:00
Michael Zanetti df0b7e9c63 Rafactor handling of TSNs in ZCL to allow the application using it.
This patch separates the transactionSequenceNumber used for sending from the
one received. According to the specification, the transactionSequenceNumber is
not meant to equally increase on both ends, but instead really just be a "random"
number which allows to match a reply to a request. Syncing them on both ends
has the outcome to increase the likelyhood of collisions if a device sends
a notification at the same time we send a request and thus even may wrongly
interpret that incoming command as a reply to the request. In fact, ideally TSNs for
outgoing messages would stay away as far as possible from incoming ones.

The old code additionally had the problem that it would re-use the last received
TSN for outgoing requests, given it used a post-increment when reading
m_transactionSequenceNumber after setting it to the last received TSN.

The new code will use a single static upcounting TSN for all outgoing requests
but will still allow overriding it with a custom TSN of for some reason a certain
device requires a specific TSN (apparently those exist).
It will not do anything with incoming TSNs but forward them now to the application
layer which may decide to use it match its own transactions or to deduplicate packets.

This allows fixing the issue in nymea that remote controls sometimes produce duplicate
pressed events (seen most often with the Tradfri Symfonisk) by discarding commands that
didn't increase the TSN.
2022-01-22 13:51:21 +01:00
Michael Zanetti 6afc214202 More work on OnOff, LevelControl and ScenesCluster
This alignes the OnOff cluster with the LevelControl cluster in terms
of signal behavior: Previously, the OnOff cluster would fire a generic
commandSent() signal for some commands and specific signals for others.
Effectively forcing the user to connect multiple signals even if only
the command would be of interest.

The LevelControl cluster instead always fired a generic commandSent()
signal and *additionally* more specific signals for parsed parameters.

This changes the OnOff cluster to be in line with the LevelCluster
as and making the API a bit simpler to use when parameters are not of
interest.

Also it completes the specific parsing for all 3 clusters.
2021-12-07 10:14:02 +01:00
Simon Stürz 5072ad7c1e Add develco profile and manufacturer, implement manufacturer specific cluster methods, improve binary input cluster 2021-04-28 13:39:07 +02:00
Simon Stürz 94539c0d02 Add scene cluster basic structure 2020-12-11 18:06:43 +01:00
Simon Stürz cc725a9533 Improve debug output and add level cluster signals 2020-11-26 18:32:07 +01:00
Simon Stürz 5901dc06b5 Add multistate value cluster 2020-11-26 13:16:53 +01:00
Simon Stürz ae18e793e6 Add multistate output cluster 2020-11-26 13:13:30 +01:00
Simon Stürz 6c2bccd775 Add binary value cluster 2020-11-26 13:08:19 +01:00
Simon Stürz e2ac3a48ea Add binary output cluster 2020-11-26 13:03:50 +01:00
Simon Stürz 6762d0e007 Add binary input cluster 2020-11-26 12:58:52 +01:00
Simon Stürz 8bfdaaae44 Add analog value cluster 2020-11-26 12:53:10 +01:00
Simon Stürz 62b491fca8 Add analog output cluster 2020-11-26 12:47:37 +01:00
Simon Stürz 3854be170e Add analog input cluster 2020-11-26 12:38:47 +01:00
Simon Stürz a651ece1cf Add multistate input cluster and improve internal endpoint initialization 2020-11-26 12:01:26 +01:00
Simon Stürz e245f7c845 Introduce binding management and cleaning 2020-11-25 13:06:31 +01:00
Simon Stürz 0768903b07 Add group cluster and fix reply handling in NXP backend 2020-11-24 12:45:20 +01:00
Simon Stürz 66637cc389 Add read binding tables for testing 2020-11-23 18:26:19 +01:00
Simon Stürz 4eafe285b0 Clean up clusters and implement default get methods for now 2020-11-12 13:27:37 +01:00
Simon Stürz af26efac17 Add pressure cluster and improve nxp backend APS handling 2020-11-11 15:50:56 +01:00
Michael Zanetti 40512509ae Fix some typos 2020-11-11 14:43:26 +01:00
Simon Stürz 0c6924e3f2 Implement command responding over cluster api and implement OTA server for default responses 2020-11-06 19:19:46 +01:00
Simon Stürz 8f1043ba9f Implement lqi updating of nodes and finishe on/off and level cluster 2020-06-14 14:39:10 +02:00
Simon Stürz cdd7a1a1aa Implement power configuration cluster 2020-06-13 21:18:01 +02:00
Simon Stürz 0992028a8a Rework entire uart communication flow and prepare level cluster command execution signals 2020-06-06 14:09:11 +02:00
Simon Stürz 275e4c8b97 Implement color control cluster and improve uart communication 2020-06-05 18:58:11 +02:00
Simon Stürz 80d4b1416e Restructure the descriptor handling and implement level control cluster server side 2020-06-03 19:50:47 +02:00
Simon Stürz b5b6709da3 Implement multiple attributes report parsing 2020-05-30 18:30:28 +02:00
Simon Stürz c565a25be2 Fix endpoint initialization order and move back to sorted list 2020-05-29 16:23:09 +02:00
Simon Stürz 8105a9082b Add identify and iaszone cluster implementations 2020-05-29 13:55:00 +02:00
Simon Stürz 4c4f540f21 Finish humidity sensor and update attribute internally at attribute read 2020-05-28 21:03:49 +02:00
Simon Stürz 69ed7e3496 Implement new clusters and restructure ZCL frame flow and implement attribute reports 2020-05-28 18:03:33 +02:00
Simon Stürz 7e5643a1cf Add on off cluster and use zigbedatatype for atributes 2020-05-27 21:56:41 +02:00
Simon Stürz 396c86a0d2 Implement data parsing and continue with basic cluster 2020-05-26 11:15:12 +02:00
Simon Stürz 4e897686bb Implement basic cluster comands and commuication 2020-05-25 22:25:49 +02:00