Commit graph

151 commits

Author SHA1 Message Date
Ole Odendahl
20d6c893bf
Added callback for handling identify button action as declared in identify cluster. 2023-03-27 12:20:03 +02:00
rbaron
02b3970ffc Shorten job names 2023-03-19 16:45:55 +01:00
rbaron
5cc40a41f6 Set calibration coefficients for 2.0.0 2023-03-19 15:06:39 +01:00
rbaron
b34bc60a0a Actually use the devicetree calibration coeffs 2023-03-19 15:06:39 +01:00
rbaron
2f7a25e266 Add devicetree calibration coeffs to nrf52833 board 2023-03-19 15:06:39 +01:00
rbaron
e24530b7c3 Fix devicetree-coeffs bug 2023-03-19 15:06:39 +01:00
rbaron
1983f31af9 Store calibration polynomial in devicetree
This will enable us to transparently use different calibration for
different board revisions. The 2.0.0 revision changes the sensing
circuitry and will need its own coeffs.

In this commit, both models are run in parallel for debugging.
2023-03-19 15:06:39 +01:00
rbaron
dbf288138e Add 2.0.0 board revision & CONFIG_BOARD_REVISION Kconfig 2023-03-19 15:06:39 +01:00
rbaron
5e315ba9cd [ble] Update connection interval docs & power profile
Closes #98
2023-02-12 16:13:55 +01:00
rbaron
7be5fe1669 [ble] Bumps default advertising interval to [30, 40] ms
This makes the BLE sample use the same parameters as the legacy
firmware, and immproves the range.
2023-02-12 16:02:51 +01:00
rbaron
d292190d31
Merge pull request #103 from MJDSys/fix_battery_information 2023-02-02 08:14:47 +01:00
Matthew Dawson
d3bcc13749
Fix battery quantity/size reporting
The API for reporting information requires a pointer to the data value,
and cannot deal with a constant directly.  The current quantity/size
returned by the device are random values from memory.

Instead move these values into the prst_batt_attrs_t struct and
set their values in prst_zb_attrs_init.
2023-02-02 00:43:13 -05:00
rbaron
28db7224a6 Make advertisement intervals configurable
We were previously relying on the default values (100ms, 150ms). This
PR makes it easier to test and configure parameters for different
tradeoffs between range / power consumption (#98).
2023-01-28 11:44:17 +01:00
rbaron
41ba531fba
Merge pull request #101 from MJDSys/zigbee_2.2_sdk 2023-01-23 11:12:55 +01:00
Matthew Dawson
af47848b80
Update Zigbee example to work with SDK 2.2.0
The new SDK requires 802.15.4 to be enabled in the board DTS file.

Also disable IPv6 explicitly to avoid compile errors related to its
network stack, since it is not used currently.

Closes #94
2023-01-22 02:51:24 -05:00
Marvin Rohrbach
ee38d4561a Fix: Counter was missing 2023-01-12 08:12:18 +00:00
rbaron
5d25499ae1 [zb] Implement double-reset factory resetting method 2022-12-27 19:22:01 +01:00
rbaron
8105bfcd7b Ensures sensor-reading callback is always rescheduled 2022-12-26 11:06:26 +01:00
rbaron
98433502af Default PRST_ZB_SLEEP_DURATION_SEC to 60s 2022-12-24 18:37:00 +01:00
rbaron
54792ce35f
Merge pull request #81 from rbaron/zigbee-sample
Introduce an experimental/educactional/exploratory Zigbee firmware sample
2022-12-24 10:29:38 +01:00
rbaron
3d68e5c689 Better docs 2022-12-24 10:06:35 +01:00
rbaron
c76b8dc289 Fix ADC config for nRF52833 2022-12-21 18:40:48 +01:00
rbaron
fe63fda2f1 Setup Kconfig for prstlib 2022-12-19 18:34:03 +01:00
rbaron
c567408861 Fix prst_zb_attrs.c format 2022-12-19 09:33:18 +01:00
Ole Odendahl
54382e3356
Removed log level config from board definition.
Moved prst lib log level config to application layer with prst lib default fallback behaviour.
2022-12-18 21:23:10 +01:00
Ole Odendahl
0f859c77cd
Slightly improved power cluster with more values. 2022-12-18 17:27:43 +01:00
Ole Odendahl
580f425b01
Added hardware version config value. 2022-12-18 17:15:58 +01:00
Ole Odendahl
ac8677f3e8
Renamed basic cluster attributes to comply with library defaults. 2022-12-18 17:12:25 +01:00
Ole Odendahl
0933c4a2a6
Fixed default sleep duration in Kconfig to 600s.
Removed specific Kconfig values from prj*.conf files.
2022-12-18 16:57:50 +01:00
Ole Odendahl
412188502b
Changed name of config value for prstlib default log level. 2022-12-18 16:55:32 +01:00
Ole Odendahl
891a63a1b3
Added separate debug config to better separate flags during development. 2022-12-16 13:15:51 +01:00
Ole Odendahl
61729aa81a
Made more basic attributes compile time configurable. 2022-12-16 12:16:42 +01:00
Ole Odendahl
3b91d7525c
Improved basic attribute list to include more properties. 2022-12-16 12:15:36 +01:00
Ole Odendahl
0a3d711787
Fixed bug in cluster list not connecting power cluster. 2022-12-16 12:10:08 +01:00
Ole Odendahl
03b45062c0
Fixing sensor logging millivolts. 2022-12-16 11:49:37 +01:00
Ole Odendahl
96e1e85179
Making zigbee main log level configurable. 2022-12-16 11:21:52 +01:00
Ole Odendahl
228b6f2f16
Making core log level configurable via Kconfig entry. 2022-12-16 11:21:27 +01:00
rbaron
5da4ad836f Update description 2022-12-10 16:52:35 +01:00
rbaron
37237a4301 More accurate power profile 2022-12-10 15:48:02 +01:00
rbaron
17b487f362 Add docs 2022-12-10 15:45:22 +01:00
rbaron
3a6561bbf4 Make the LED flash while pairing 2022-12-10 15:14:01 +01:00
rbaron
7b4e64cec7 Implemented a pairing-reset detection strategy
This is a "tricky" workaround due to the lack of physical buttons:

We can distinguish between the two "power up" modes:

- Power on: when the device receives power for the first time. Example:
swapping batteries, prroviding external power. This _DOES NOT_ reset the
pairing info.

- Reset pin: when the device is manually reset (by shorting the RESET
pin to GND), or when a new firmware is flashed. This _RESETS_ the
pairing info.
2022-12-10 12:37:29 +01:00
rbaron
8eb54106d5 Add illuminance cluster & reporting 2022-12-10 10:47:16 +01:00
rbaron
3c2094db2d Add GitHub action 2022-12-09 20:01:46 +01:00
rbaron
fbf1a35099 Moves configs to Kconfig 2022-12-09 19:38:56 +01:00
rbaron
cb6ed73691 Add battery percentage computation 2022-12-09 19:02:55 +01:00
rbaron
676b525bd9 Reading and sending real soil moisture works! 2022-12-07 22:22:41 +01:00
rbaron
01bb9da2a4 Cleanups 2022-12-07 21:43:30 +01:00
rbaron
f7373cc6da Custom Soil Moisture cluster works! :)
This commits adds a Soil Moisture cluster according to the one that
exists in https://github.com/Koenkk/zigbee-herdsman/blob/master/src/zcl/definition/cluster.ts#L2570.
The cluster Id is 1032 (I didn't find it in the official specs).
2022-12-07 20:10:52 +01:00
rbaron
15b1d9d2a8 Batt, temp and humi show up (with reporting!) on HA with zigbee2mqtt :)) 2022-12-07 20:10:52 +01:00