Commit Graph

100 Commits (34ade62e4eb1575a6f9aae63a4b1f8564f17e3a2)

Author SHA1 Message Date
jenkins cdb2891aa2 Merge PR #84: Add window covering cluster 2023-05-05 11:15:41 +02:00
Michael Zanetti 7395695173 Add window covering cluster 2023-03-27 15:52:01 +02:00
Michael Zanetti 359fc305f3 Provide access to formatting settings for electrical measurement cluster 2023-03-14 19:59:07 +01:00
jenkins b7fe5a624e Merge PR #82: PowerConfiguration cluster: Add battery voltage 2023-02-21 17:42:47 +01:00
jenkins 2e307ae268 Merge PR #81: Align command signal names in clusters 2023-02-21 17:42:45 +01:00
jenkins 366414776b Merge PR #79: TI: fix reconncting the controller at runtime 2023-02-21 17:42:43 +01:00
jenkins 2f4ee53287 Merge PR #77: Fix a typo in ClusterIdOnOffConfiguration 2023-02-21 17:42:41 +01:00
Michael Zanetti 9306d15c92 PowerConfiguration cluster: Add battery voltage 2022-12-30 23:22:41 +01:00
Michael Zanetti 22837865f1 Fixes reconnecting the ZigBee controller after a reset during runtime
Resets may occur by unplugging the stick or calling a softReset() from
the software side.

Additionally resets the stick when 5 subsequent timeouts happen
as there are firmwares of the CC2652 available which tend to
crash occationally.
2022-12-30 20:49:45 +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
jenkins 0639a35750 Merge PR #78: Electrical measurement: Fix data parsing 2022-12-10 14:52:21 +01:00
Michael Zanetti 684e0dc53d Electrical measurement: Fix data parsing
Read individual entries instead of a whole list from the input stream
2022-12-02 11:29:34 +01:00
Michael Zanetti 303caf04e7 Fix a typo in ClusterIdOnOffConfiguration 2022-11-28 23:45:45 +01:00
Michael Zanetti 75d286b29a Expose raw dataIndications and allow sending raw commands on ZigbeeCluster 2022-11-04 18:25:05 +01:00
jenkins 4ea83aa44c Merge PR #70: Update all debug operators and make use of state saver 2022-10-17 11:20:00 +02:00
jenkins 761877fea2 Merge PR #68: Add Fan Control cluster implementation 2022-10-17 11:19:59 +02:00
jenkins b427648eb0 Merge PR #66: Implement timeout settings for occupancy sensing cluster 2022-10-17 11:19:56 +02:00
jenkins bbbbbbc521 Merge PR #65: Complete the OTA cluster implementation 2022-10-17 11:19:55 +02:00
Simon Stürz 2aa22ee262 Update all debug operators and make use of state saver 2022-10-13 12:48:43 +02:00
Michael Zanetti 33d3ad10e9 Add API to interact with bindings 2022-10-13 10:11:11 +02:00
Michael Zanetti ac7972df35 Complete the OTA cluster implementation 2022-10-12 12:17:30 +02:00
Michael Zanetti 4141de2200 Implement timeout settings for occupancy sensing cluster 2022-10-12 12:16:53 +02:00
Michael Zanetti f2511a9b25 Add Fan Control cluster implementation 2022-10-12 12:15:25 +02:00
Michael Zanetti ebf004af01 Implement Electricalmeasurement server command handling 2022-07-04 14:08:44 +02:00
jenkins a5d49d7b64 Merge PR #57: Implement commands for metering cluster 2022-06-30 15:04:00 +02:00
Michael Zanetti 92cdc4bc84 Implement commands for metering cluster
Main reasoning behind this is actually that Tuya devices seem
to send a CancelMessage command every other minute and are currently
spamming the log with unhandled ZCL indication warnings.

Instead of just silencing the warning (which is very useful most of the times)
I decided to complete the implementation of the metering cluster and
actually make it a handled ZCL indication.
2022-06-20 23:30:18 +02:00
Michael Zanetti 725272e1fa Add Time cluster implementation 2022-06-20 00:03:50 +02:00
jenkins 0b92eb4968 Merge PR #53: Explicitly stop the ZCL timeout timer 2022-06-07 23:06:19 +02:00
jenkins 59025c0c2e Merge PR #50: Fix a typo in the illuminancemeasurement cluster 2022-06-07 23:06:16 +02:00
jenkins 19d262b459 Merge PR #49: Add IAS WD cluster 2022-06-07 23:06:15 +02:00
Michael Zanetti c90ed3ab09 Fix a typo in the illuminancemeasurement cluster 2022-05-13 11:22:07 +02:00
Michael Zanetti 365386ea71 Add IAS WD cluster 2022-05-13 11:21:20 +02:00
Michael Zanetti d210d696e0 Add Battery Alarm State support to PowerConfiguration cluster 2022-05-13 11:20:49 +02:00
Michael Zanetti fd12d0518b Explicitly stop the ZCL timeout timer
Also don't use a QueuedConnection, as it's not guaranteed the
sender will still live on by the time slot is called.
2022-05-12 17:33:35 +02:00
jenkins 53bd313766 Merge PR #47: Timeout ZCL replies 2022-04-25 23:53:22 +02:00
jenkins 07f25a749b Merge PR #44: Add electrical measurement and metering clusters 2022-04-25 23:53:18 +02:00
Michael Zanetti b96f9fa98f Timeout ZCL replies
This is basically the same as #41 does with ZDO replies but for ZCL replies.

Working with a z-stack dongle and a Gewiss binary input device a lot of
timeouts happen during the device interview. While basic device interview
timeouts are caught by the ZDO timeouts, later interview steps like
cluster attribute reading run into the same issue with this device and
the interview process never finishes.
2022-04-25 14:31:10 +02:00
Michael Zanetti 9abcdfcf3d Add electrical measurement and metering clusters
Renamed the SimpleMetering enum to Metering as that's what it is in the Zigbee
Alliance Spec. SimpleMetering seems to come from a NXP document which
isn't complete though and the upstream spec is what matters in the end.
Also adds some cluster ids which are in the Zigbee spec but missing in
the NXP document.
2022-03-08 01:21:52 +01:00
Michael Zanetti 88920274da More work on the Thermostat cluster 2022-02-17 01:15:10 +01: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
Jenkins nymea 09f4f5ef80 Merge PR #26: More work on OnOff, LevelControl and ScenesCluster 2021-12-11 00:30:27 +01:00
Jenkins nymea ec8c13ad33 Merge PR #22: Add support for IAS Zone enrollment 2021-12-11 00:30:22 +01:00
Michael Zanetti a22fdcedde Add manufacturer specific philips cluster 2021-12-07 20:36:24 +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
Michael Zanetti e7d533b9e8 Add support for IAS Zone enrollment 2021-10-15 17:01:14 +02:00
Simon Stürz 2f8af57d4e Add invalid measurment filtering for measurement clusters 2021-05-21 08:54:49 +02: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 1dd3406120 Update IAS Zone cluster 2020-12-15 16:44:06 +01:00