mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 90 forks source link

Purge not working #475

Closed seant100 closed 5 years ago

seant100 commented 5 years ago

Purge data for a sensor does not work. Perhaps it is only clearing the raw data, but it should also purge the data for all time range graphs (eg weekly, yearly etc) based on the conditions and date range set to purge data for.

jkandasa commented 5 years ago

@seant100 Can you list the MyController version details?

seant100 commented 5 years ago

@jkandasa screenshot attached

image

jkandasa commented 5 years ago

@seant100 I have modified the source code and updated in SNAPSHOT version. Can you check with this change? Kindly confirm with least priority sensor variable.

NOTE: https://forum.mycontroller.org/topic/362/google-analytics-enabled-from-version-1-4-0

seant100 commented 5 years ago

@jkandasa Updated to latest snapshot. Tried to purge with condition = >60 and all dates and when I select "Year" graph it still shows values of 90+. So purge is still not working. Also the latest snapshot gives lots of errors and is incredibly slow for everything. So I have to now revert back to the previous snapshot version I was using. For interest I have attached the log file showing errors with latest snapshot which I downloaded on 25 Oct 2018. mycontroller.zip

jkandasa commented 5 years ago

@seant100 can you try with the most recent version? I have added a fix.

New option: only for double type data

Can you check with the most recent version?

seant100 commented 5 years ago

@jkandasa I did subsequently notice that the Purge data only seemed to purge "Average" values and not the "Min" and "Max" values. Does the new version cater for purging the Min and Max data as well. Or can you add an option of which data to purge i.e. Select Purge Average, Min, Max or All or something like that

jkandasa commented 5 years ago

@seant100 Yes, the new version(current SNAPSHOT) can purge min, max, avg. You can pass all the values in one go. or based on your requirement.

Examples:

You can use any combinations

seant100 commented 5 years ago

@jkandasa Thank you. I will give it a try asap.

jkandasa commented 5 years ago

@seant100 kindly report back the observations.

seant100 commented 5 years ago

@jkandasa Thank you. That works. I would suggest to add some "hints" or "usage examples" onto the purge page