Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Nov 21, 2023
1 parent b8a5532 commit 572c90a
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,65 +25,76 @@ This project is closely related to [BresserWeatherSensorReceiver](https://github

## Sensor Data Provisioning Options

See sensor types in [WeatherSensor.h](https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/main/src/WeatherSensor.h)

Select option in [SensorTransmitter.h](SensorTransmitter.h).

1. Raw Data
### Raw Data
```
uint8_t payload[] = {0xEA, 0xEC, 0x7F, 0xEB, 0x5F, 0xEE, 0xEF, 0xFA, 0xFE, 0x76, 0xBB, 0xFA, 0xFF,
0x15, 0x13, 0x80, 0x14, 0xA0, 0x11, 0x10, 0x05, 0x01, 0x89, 0x44, 0x05, 0x00};
```
2. [class WeatherSensor](https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/main/src/WeatherSensor.h)
3. JSON Data as Constant String
### [class WeatherSensor](https://github.com/matthias-bs/BresserWeatherSensorReceiver/blob/main/src/WeatherSensor.h)

### JSON Data as Constant String

```
const char json[] =
"{\"sensor_id\":255,\"s_type\":1,\"chan\":0,\"startup\":0,\"battery_ok\":1,\"temp_c\":12.3,\
\"humidity\":44,\"wind_gust_meter_sec\":3.3,\"wind_avg_meter_sec\":2.2,\"wind_direction_deg\":111.1,\
\"rain_mm\":123.4}";
```

4. JSON Data as Input from Serial Console

Example 1: Bresser 5-in-1
### JSON Data as Input from Serial Console - Examples

#### Bresser 5-in-1 Protocol - Weather Sensor

```
{"sensor_id": 255, "s_type": 1, "chan": 0, "startup": 0, "battery_ok": 1, "temp_c": 12.3, "humidity": 44, "wind_gust_meter_sec": 3.3, "wind_avg_meter_sec": 2.2, "wind_direction_deg": 111.1, "rain_mm": 123.4}
```

Example 2: Bresser Soil Temperature and Moisture
#### Bresser 6-in-1 Protocol - Soil Temperature and Moisture

```
{"sensor_id": 4294967295, "s_type": 4, "chan": 0, "startup": 0, "battery_ok": 1, "temp_c": 12.3, "moisture": 44}
```

Example 3: Bresser 6-in-1
#### Bresser 6-in-1 Protocol - Weather Sensor

```
{"sensor_id": 4294967295, "s_type": 1, "chan": 0, "startup": 0, "battery_ok": 1, "temp_c": 12.3, "humidity": 44, "wind_gust_meter_sec": 3.3, "wind_avg_meter_sec": 2.2, "wind_direction_deg": 111.1, "rain_mm": 123.4, "uv": 7.8}
```

Example 4: Bresser 7-in-1
#### Bresser 7-in-1 Protocol - Weather Sensor

```
{"sensor_id": 65535, "s_type": 1, "chan": 0, "startup": 0, "battery_ok": 1, "temp_c": 12.3, "humidity": 44, "wind_gust_meter_sec": 3.3, "wind_avg_meter_sec": 2.2, "wind_direction_deg": 111.1, "rain_mm": 123.4, "uv": 7.8, "light_klx": 123.456}
```

#### Bresser 7-in-1 Protocol - Particulate Matter

```
{"sensor_id": 65535, "s_type": 8, "chan": 0, "startup": 0, "battery_ok": 1, "pm_2_5": 2345, "pm_10": 1234}
```

Example 5: Bresser Lightning
#### Bresser Lightning Sensor

```
{"sensor_id": 65535, "s_type": 9, "chan": 0, "startup": 0, "battery_ok": 1, "strike_count": 11, "distance_km": 7}
```

#### Bresser Leakage Sensor

```
{"sensor_id":4294967295, "s_type": 5, "chan": 0, "startup": 0, "battery_ok": 1, "alarm": 1}
```

## Serial Port Control

**Note:** No additional spaces are allowed in commands! (But spaces are permitted in JSON strings.)

| Command | Examples | Description |
| ----------------------- | --------------------------------------------- | --------------------- |
| `{...}` | see above | Set JSON message data |
| `enc[oder]=<encoder>` | `enc=bresser-5in1`<br>`enc=bresser-lightning` | Select encoder |
| `enc[oder]=<encoder>` | `enc=bresser-5in1`<br>`enc=bresser-6in1`<br>`enc=bresser-7in1`<br>`enc=bresser-lightning`<br>`enc=bresser-leakage` | Select encoder |
| `int[erval]=<interval>` | `int=20` | Set transmit interval in seconds<br>(must be > 10) |

0 comments on commit 572c90a

Please sign in to comment.