From 74765c87f5193fb076ef4fd0f01f901338136cd0 Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Sat, 27 Apr 2024 06:56:55 +0200 Subject: [PATCH] Update README.md --- README.md | 80 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 9b5b212..eb9618c 100644 --- a/README.md +++ b/README.md @@ -103,12 +103,36 @@ Meanwhile, refer to [BresserWeatherSensorTTN - README.md](https://github.com/mat ## Remote Configuration Commands / Status Requests via LoRaWAN +### Parameters + +| Parameter | Description | +| --------------------- | --------------------------------------------------------------------------- | +| | Weather sensor receive timeout in seconds; 0...255 | +| | Sleep interval (regular) in seconds; 0...65535 | +| | Sleep interval (energy saving mode) in seconds; 0...65535 | +| \ | Unix epoch time, see https://www.epochconverter.com/ ( \ / "0x....") | +| | Raingauge reset flags; 0...15 (1: hourly / 2: daily / 4: weekly / 8: monthly) / "0x0"..."0xF" | +| | Real time clock source; 0x00: GPS / 0x01: RTC / 0x02: LORA / 0x03: unsynched / 0x04: set (source unknown) | +| | Bresser sensor IDs include list; e.g. "0xDEADBEEF"; "0x00000000" => empty list => default values | +| | Bresser sensor IDs include list; e.g. "0xDEADBEEF"; "0x00000000" => empty list => default values | +| | BLE sensor MAC addresses; e.g. "DE:AD:BE:EF:12:23" | + +> [!WARNING] +> Confirmed downlinks should not be used! (see [here](https://www.thethingsnetwork.org/forum/t/how-to-purge-a-scheduled-confirmed-downlink/56849/7) for an explanation.) + +> [!IMPORTANT] +> To set sensors_inc / sensors_exc to the compile time default configuration, set the first ID in CMD_SET_SENSORS_INC / CMD_SET_SENSORS_EXC to 0x00000000. +> To set the BLE sensor addresses to the compile time default configuration, set the first address in CMD_SET_BLE_ADDR to 0x000000000000. + +> [!NOTE] +> 'Default values' + ### Using Raw Data | Command | Port | Downlink | Uplink | | ----------------------------- | ---------- | ------------------------------------------------------------------------- | -------------- | -| CMD_GET_DATETIME | 0x86 (134) | 0x00 | unixtime[31:24]
unixtime[23:16]
unixtime[15:8]
unixtime[7:0]
rtc_source[7:0] | -| CMD_SET_DATETIME | 0x88 (136) | unixtime[31:24]
unixtime[23:16]
unixtime[15:8]
unixtime[7:0] | n.a. | +| CMD_GET_DATETIME | 0x86 (134) | 0x00 | epoch[31:24]
epoch[23:16]
epoch[15:8]
epoch[7:0]
rtc_source[7:0] | +| CMD_SET_DATETIME | 0x88 (136) | epoch[31:24]
epoch[23:16]
epoch[15:8]
epoch[7:0] | n.a. | | CMD_SET_SLEEP_INTERVAL | 0xA8 (168) | sleep_interval[15:8]
sleep_interval[7:0] | n.a. | | CMD_SET_SLEEP_INTERVAL_LONG | 0xA9 (169) | sleep_interval_long[15:8]
sleep_interval_long[7:0] | n.a. | | CMD_GET_LW_CONFIG | 0xB1 (177) | 0x00 | sleep_interval[15:8]
sleep_interval[7:0]
sleep_interval_long[15:8]
sleep_interval_long[7:0] | @@ -124,40 +148,20 @@ Meanwhile, refer to [BresserWeatherSensorTTN - README.md](https://github.com/mat ### Using the Javascript Uplink/Downlink Formatters -| Command | Downlink | Uplink | -| ----------------------------- | ------------------------------------------------------------------------- | -------------- | -| CMD_GET_DATETIME | {"cmd": "CMD_GET_DATETIME"} | unixtime[31:24]
unixtime[23:16]
unixtime[15:8]
unixtime[7:0]
rtc_source[7:0] | -| CMD_SET_DATETIME | unixtime[31:24]
unixtime[23:16]
unixtime[15:8]
unixtime[7:0] | n.a. | -| CMD_SET_SLEEP_INTERVAL | sleep_interval[15:8]
sleep_interval[7:0] | n.a. | -| CMD_SET_SLEEP_INTERVAL_LONG | sleep_interval_long[15:8]
sleep_interval_long[7:0] | n.a. | -| CMD_GET_LW_CONFIG | {"cmd": "CMD_GET_LW_CONFIG"} | sleep_interval[15:8]
sleep_interval[7:0]
sleep_interval_long[15:8]
sleep_interval_long[7:0] | -| CMD_GET_WS_TIMEOUT | {"cmd": "CMD_GET_WS_TIMEOUT"} | ws_timeout[7:0] | -| CMD_SET_WS_TIMEOUT | ws_timeout[7:0] | n.a. | -| CMD_RESET_RAINGAUGE | flags[7:0] | n.a. | -| CMD_GET_SENSORS_INC | {"cmd": "CMD_GET_SENSORS_INC"} | sensors_inc0[31:24]
sensors_inc0[23:15]
sensors_inc0[16:8]
sensors_inc0[7:0]
... | -| CMD_SET_SENSORS_INC | sensors_inc0[31:24]
sensors_inc0[23:15]
sensors_inc0[16:8]
sensors_inc0[7:0]
... | n.a. | -| CMD_GET_SENSORS_EXC | {"cmd": "CMD_GET_SENSORS_EXC"} | sensors_exc0[31:24]
sensors_exc0[23:15]
sensors_exc0[16:8]
sensors_exc0[7:0]
... | -| CMD_SET_SENSORS_EXC | sensors_exc0[31:24]
sensors_exc0[23:15]
sensors_exc0[16:8]
sensors_exc0[7:0]
... | n.a. | -| CMD_GET_BLE_ADDR | {"cmd": "CMD_GET_BLE_ADDR"} | ble_addr0[47:40]
ble_addr0[39:32]
ble_addr0[31:24]
ble_addr0[23:15]
ble_addr0[16:8]
ble_addr0[7:0]
... | -| CMD_SET_BLE_ADDR | ble_addr0[47:40]
ble_addr0[39:32]
ble_addr0[31:24]
ble_addr0[23:15]
ble_addr0[16:8]
ble_addr0[7:0]
... | n.a. | +| Command | Downlink | Uplink | +| ----------------------------- | ------------------------------------------------------------------------- | ---------------------------- | +| CMD_GET_DATETIME | {"cmd": "CMD_GET_DATETIME"} | {"epoch": \} | +| CMD_SET_DATETIME | {"epoch": \} | n.a. | +| CMD_SET_SLEEP_INTERVAL | {"sleep_interval": " | n.a. | +| CMD_SET_SLEEP_INTERVAL_LONG | {"sleep_interval_long": } | n.a. | +| CMD_GET_LW_CONFIG | {"cmd": "CMD_GET_LW_CONFIG"} | {"sleep_interval": , "sleep_interval_long": } | +| CMD_GET_WS_TIMEOUT | {"cmd": "CMD_GET_WS_TIMEOUT"} | {"ws_timeout": } | +| CMD_SET_WS_TIMEOUT | {"ws_timeout": } | n.a. | +| CMD_RESET_RAINGAUGE | {"reset_flags": } | n.a. | +| CMD_GET_SENSORS_INC | {"cmd": "CMD_GET_SENSORS_INC"} | {"sensors_inc": [, ..., ]} | +| CMD_SET_SENSORS_INC | {"sensors_inc": [, ..., ]} | n.a. | +| CMD_GET_SENSORS_EXC | {"cmd": "CMD_GET_SENSORS_EXC"} | {"sensors_exc": [, ..., ]} | +| CMD_SET_SENSORS_EXC | {"sensors_exc": [, ..., ]} | n.a. | +| CMD_GET_BLE_ADDR | {"cmd": "CMD_GET_BLE_ADDR"} | {"ble_addr": [, ..., ]} | +| CMD_SET_BLE_ADDR | {"ble_addr": [, ..., ]} | n.a. | - -| Parameter | Description | -| --------------------- | --------------------------------------------------------------------------- | -| | Weather sensor receive timeout in seconds; 0...255 | -| | Sleep interval (regular) in seconds; 0...65535 | -| | Sleep interval (energy saving mode) in seconds; 0...65535 | -| \ | Unix epoch time, see https://www.epochconverter.com/ ( \ / "0x....") | -| | Raingauge reset flags; 0...15 (1: hourly / 2: daily / 4: weekly / 8: monthly) / "0x0"..."0xF" | -| | Real time clock source; 0x00: GPS / 0x01: RTC / 0x02: LORA / 0x03: unsynched / 0x04: set (source unknown) | -| | Bresser sensor IDs include list; e.g. "0xDEADBEEF"; may be empty; empty list => all IDs | -| | Bresser sensor IDs include list; e.g. "0xDEADBEEF"; may be empty | -| | BLE sensor MAC addresses; e.g. "DE:AD:BE:EF:12:23" | - -> [!WARNING] -> Confirmed downlinks should not be used! (see [here](https://www.thethingsnetwork.org/forum/t/how-to-purge-a-scheduled-confirmed-downlink/56849/7) for an explanation.) - - -> [!IMPORTANT] -> To set sensors_inc / sensors_exc to the compile time default configuration, set the first ID in CMD_SET_SENSORS_INC / CMD_SET_SENSORS_EXC to 0x00000000. -> To set the BLE sensor addresses to the compile time default configuration, set the first address in CMD_SET_BLE_ADDR to 0x000000000000.