Autor Thema: Problems with event-aggregator  (Gelesen 1119 mal)

Offline alangward

  • New Member
  • *
  • Beiträge: 32
Problems with event-aggregator
« am: 23 März 2018, 12:24:57 »
Hi,
I am using event-aggregator to smooth the readings from my weather station
It appears to be having the required effect, but I am still getting log entries every 4 seconds - in other words the down-sampling is not behaving as I expected.
I expect I am using it incorrectly, but I have studied the command ref and I can't see what I am doing wrong.
Below are the lines from the config file and following that is the tail of the event log.

Thanks,
Alan

--------------------------------------------------
define LaCrosse_16 LaCrosse 16
attr LaCrosse_16 IODev JLink
attr LaCrosse_16 alias WeatherStation
attr LaCrosse_16 event-aggregator windSpeed:600:linear:mean:3600,windGust:600:none:max,windDirectionDegree:600:linear:mean:3600
attr LaCrosse_16 event-on-change-reading battery,temperature:0.2,humidity:2,rain
attr LaCrosse_16 event-on-update-reading windSpeed,windGust,windDirectionDegree
-----------------------------------------------------------

---------------------------------------------------------------
2018-03-23_11:16:51 LaCrosse_16 windSpeed: 4.46189984704814
2018-03-23_11:16:51 LaCrosse_16 windDirectionDegree: 253.272714936656
2018-03-23_11:16:56 LaCrosse_16 temperature: 10.3
2018-03-23_11:16:56 LaCrosse_16 windSpeed: 4.46083464935384
2018-03-23_11:16:56 LaCrosse_16 windDirectionDegree: 253.293676591986
2018-03-23_11:17:00 LaCrosse_16 windSpeed: 4.45971052955391
2018-03-23_11:17:00 LaCrosse_16 windGust: 11.5
2018-03-23_11:17:00 LaCrosse_16 windDirectionDegree: 253.28685380903
2018-03-23_11:17:05 LaCrosse_16 windSpeed: 4.45877504291007
2018-03-23_11:17:05 LaCrosse_16 windDirectionDegree: 253.279630600458
2018-03-23_11:17:09 LaCrosse_16 windSpeed: 4.45808773102379
2018-03-23_11:17:09 LaCrosse_16 windDirectionDegree: 253.279628337155
-------------------------------------------------------------------


Offline frickelpiet

  • Newbie
  • Beiträge: 1
Antw:Problems with event-aggregator
« Antwort #1 am: 29 Mai 2019, 09:26:02 »
Hi Alan,

not sure if this is still open, but for the record: I understand that the aggregated value is update each time the source value is updated. Which is not the generated events. For your purpose of thinning  the data volume you need to downsample the reading updates first and then aggregate in a separate step. My first attempt was using event-on attributes and notify to create separate user readings from the generated events. Maybe there are better ways, but works for me.

Cheers,
Peter