@ove i guess it is hardcoded in the frontend… Check https://github.com/pimatic/pimatic-mobile-frontend/tree/master/app/pages
-
change the average value from 5 to 1 min
-
if doing updates to ./pimatic-app/node_modules/pimatic-mobile-frontend/app/pages/graph.coffee, how do i compile this changes and reload the webinterface ? Any file(s) i may delete so that the frontend is being recompiled automatically at next restart ?
Ove
-
@ove said in change the average value from 5 to 1 min:
if doing updates to ./pimatic-app/node_modules/pimatic-mobile-frontend/app/pages/graph.coffee, how do i compile this changes and reload the webinterface ? Any file(s) i may delete so that the frontend is being recompiled automatically at next restart ?
Ove
I cant exactly answer that question. Ill tag @mwittig and @sweetpi to answer that for you.
-
Succeeded
stopped pimatic.js,
changed line 482 in ./pimatic-app/node_modules/pimatic-mobile-frontend/app/pages/graph.coffee
from
when “day” then 5 * 60 * 1000 #=5min
to
when “day” then 5 * 60 * 1000/5 #=1min , was 5min before without division by 5deleted file
./pimatic-app/node_modules/pimatic-mobile-frontend/app/pages/graph.min.js
and restarted pimatic.js
After that i got - what i intended:I don’t know why i had to delete file graph.min.js , but due to the fact that everything seems to work i think it’s ok…
Thank you!
Ove
-
@ove nice. An update would undo this. Keep that in mind.
-
may be this will become a customizable setting inside pimatic one day
Ove
-
@ove said in change the average value from 5 to 1 min:
when “day” then 5 * 60 * 1000/5 #=1min , was 5min before without division by 5
why multiply and then divide by 5? why not just leaving the 5 out? or making it a variable that can be edited in the config?
-
you are absolutely right…everything is possible.
I personally love it to “mark” my own code-changes - so when editing again later in some months i’m able to see what was changed in just a second…
At the moment i’m using /10 instead of /5 to get “30 sec average values”.Ove
-
@sweetpi @mwittig
pls have a look to maybe merge these changes into the frameworki can imagine that the actual time interval of 5min has been chosen due to the limited cpu capability of the raspi1? nowadays with faster hardware it would sureley be possible to step down the values or does it blow up something at the framework then?
maybe it would be possible to change/insert a shorter interval somewhere in the mobile frontend’s setup, so there is a standard like now with the 5min. interval and if someone might want to change he can do this in the mobile frontend setup then.
just my 5 cents.pimatic v0.9 has been released!
Support Pimatic and get some free stickers
Like us on Facebookmake it so !
-
@leader21 said in change the average value from 5 to 1 min:
pls have a look to maybe merge these changes into the framework
Yes, I’ll have a look at this. It should be configurable imho.
https://github.com/pimatic/pimatic/issues/1012"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law
-
I want to reactivate this topic:
On my old server, it works very well (edit line with /5 and delete graph.min.js).A few days before, I set up an new server an, imported the DB and config, edited the graph.coffee and deleted the graph.min.js. But now a get the error “Cannot GET /”.
Do anyone knows the reason?
-
Hi!
Did it work before “edit line with /5 and delete graph.min.js”Ove
-
@ove yes, is did. After a restore of the graph.min.js, Pimatic runs normal, but with 5min average.
-
Do you have the line
when “day” then 5 * 60 * 1000 #=5min
in ./pimatic-app/node_modules/pimatic-mobile-frontend/app/pages/graph.coffee
If yes pls try to edit it as:
when “day” then 60000 #=60secMay be that would change something…
Ove
-
@ove said in change the average value from 5 to 1 min:
May be that would change something
No, the result is exactly the same
But after restore the original file and just editing the one line, it works… there was maybe an other error in the file
Thanks
-
tadaaaaa ))