Editrealtime vizualisation

Hi everybody
I am using EmonCMS version 9.9.4 on a PI3 and the editrealtime vizualisation is not working…

I have tried to delete data in the window, just to test

the console show an error in modules/vis/editrealtime.php
it says typeError: $(...).modal is not a function

 $('#delete-button').click(function () {
    $('#myModal').modal('show');
  });

Edit : the bootstrap modal appears when I choose the full screen mode
Anyway, I cannot delete the datas in the window…
I’ve seen it goes through a json request
http://your_emoncms_ip/emoncms/feed/deletedatarange.json?&apikey=your_api_key&id=32&start=1544756356&end=1544770496
But when I launch manually the request, the API returns false

I’ve searched through the github repository, with the keywork deletedatarange…I am using the PHPFina engine
shouldn’t there be a function deletedatarange in the /Modules/feed/engine/PHPFina.php or is there something I misunderstand ?

Re-edit : I see, This is specific to the MEMORY MYSQL ENGINE (mysqltimeseries)…I guess it is not possible on a timeseries like the one used by PHPFina…

do you have such an error or is it just specific to my setup, and not reproductible from your side ?

Alex

If you look at Learn → Electricity Monitoring → Timeseries you will find an explanation of how the data is stored.

This might help your understanding, and why you can only edit, and it is impossible to delete, data in PHPfina files.

Thanks Robert, I’ve seen my misunderstanding…
Anyway, do you know if it is possible to replace a window of erronous datas by NaN or 0 eventually ? Actually it was what I was trying to do…and I thougth the delete button was doing this kind of operation…but maybe it is more with “the multiply data in window by”…I will investigate further in the code as I see it may launch a scalerange function…
I’ve tested the update point by point and it is working…
Sorry for the inconvenience.

Sorry, but I do not know the details of that part of emonCMS, so I cannot help you.

Hello @alexandrecuer, the scale and delete features dont currently work in editrealtime. I have a made a note on the emoncms issue list to remove these for now to avoid confusion remove scale and delete options from editrealtime · Issue #1141 · emoncms/emoncms · GitHub

OK Thanks Tristan…
I went through the feed controller and model and understood it was not functionnal
Are these things still in your roadmap / postponed to a later date ?
Anyway, I am going to try to do it on my side but I cannot appreciate the complexity right now, as I don’t have a deep knowledge of the PHPFina engine

@TrystanLea
I have pushed some pull requests on this matter of scale and edit features, one for the PHPFina Engine and the other for the PHPTimesSeries…could you eventually review them briefly just to check if I am out of scope or not ?

thanking yu by advance
Alex

1 Like