EmonLibCM - Version 2 (Support)

That is correct - the “instantaneous” data does not exist in a form that is usable, because in order to be able to monitor continuously, much of the calculation that was done on each sample pair (in emonLib - the old discrete sample version) is now done when reporting the average values.

That is the real problem - OEM was never intended for control, only monitoring.

You could set the reporting period to 0.5 s. You can use the ½ second power values to actuate your buzzer. Then you need to send every 120th set of energy values to emonCMS. If you want power averaged over that period, you can do that in emonCMS or you can save the old energy value in the sketch and subtract it from the new value. That would be very easy to do.
You are likely to have problems with temperature measurements - the library commands the sensor to start “converting” the temperature at a time it calculates, based on the resolution you ask for, so that the reading will be ready when the power calculations are done. (This is so that, reporting every 1 minute, the temperatures are only 1 second old when they are reported.) It would be possible, but very hard, to command the start in the previous datalogging period and read the temperature in the next, but even then, data transfer from the sensor is very slow (it takes about 16ms per sensor) and that might cause more problems. It is not something I have looked into.

1 Like