Sounds like you are looking for something like 
this https://github.com/influxdata/kapacitor/issues/643. The feature hasn't 
been implemented but if its what you are looking for any input on the issue 
will help us prioritize and make sure the implementation meets your needs.

On Friday, February 17, 2017 at 5:13:22 AM UTC-7, jens...@gmail.com wrote:
>
> Investigating Influx and Kapacitor as a platform for our sensor data.
> The sensor captures data from plants in horticultures and other places.
>
> We need to find irrigation time based on plant moisture data.
>
> I have made the TICK script below which calculate the irrigation state 
> based on the moisture growth.
> Basically it gives a postive when moisture is increased and negative when 
> moisture is decreasing.   
>
> This is fine but i would like to enhance the series to only have points 
> when irrigation start and ends.
> Accordingly it would be nice if i could remove redundant points
>
> Is there any means to do this - for example removing identical consecutive 
> points ?
> Of course I can query the series and do some mapreduce but I would like 
> that done by the kapacitor script.
>
> Do you guys have any suggestions ?
>
> stream
>     |from()
>         .database('spiio_senors')
>         .retentionPolicy('autogen')
>         .measurement('sensor_data')
>         .groupBy(*)
>     |window()
>         .period(30m)
>         .every(30m)
>         .align()
>     |derivative('moisture')
>         .as('dryrate')
>     |eval(lambda: ceil("dryrate"))
>         .as('irrigation_state')
>     |influxDBOut()
>         .database('irrigation')
>         .retentionPolicy('autogen')
>         .measurement('irrigations')
>         .precision('s')
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to influxdb+unsubscr...@googlegroups.com.
To post to this group, send email to influxdb@googlegroups.com.
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/a11d9fdb-1dea-4e57-a9a2-fb122a1a8956%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to