Weather station with ModBus over RS-485
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.1 KiB

# Todo list for weather station with ModBus over RS-485
## Bug in rain meter register
The first hour, the ModBus register SensorRainIreg is instable. This is because in setup(), the variable RainPerHourCounter is set to the current millis() value. The RainPerHourCounter is the index for the array RainPerHour, which can hold 24 values. But the index is set to the millis() value, which can have a value abouve 23. This causes a buffer overflow. After the first hour, the index is reset and from thereon the register SensorRainIreg holds the proper rainfall value. The solution is that the variable HourTimer should be set to the current millis() value in setup().
```
-- ts = millis();
-- RainPerHourCounter = ts;
++ ts = millis();
++ HourTimer = ts;
```
## Reset firmware via ModBus coil bit
Soemtimes the weater station needs to be reset. For example if the I2C communication with the sensors is lost. The pressure sensor tends to have this probem occacionally.
## Implement support for new humidity sensor [done - 2024-01-14]
Heater function of former sensor needs to be disabled as the new sensor does not have (or need) a heater.