My Electric app showing yesterdays usage in *Use Today*

Paul Reed's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Which emoncms version are you using Ben.

I had this problem too when running v8.5, but I've now switched to the extended branch which does display the correct data/day.

Paul

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Thanks Paul - I thought v8.5 was the latest and greatest - sorry it is a little tricky to work out what is the correct branch to be working off. I will switch to extended and see how that goes - what other differences are there between v8.5 and Extended?

 

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Yep - that seems much better now - thanks again!

I now have a problem with my dashboard widgets however - the graphs and visualisations render fine, but my dials and cylinder widgets are blank in dashboard view-mode. As soon as I go into edit-mode for the dashboards they show up fine.

Ring any bells?

Paul Reed's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Could it be a break in the relationship between feed names & widgets as described here.
If you re-select the feedname in the widget configuration, and save, does that resolve the issue?

Paul

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Yeah I tried that - and just tried again - even deleted my original widget and created a new one. In edit-mode it looks fine, it is just when I switch to view-mode that nothing is rendered. The feeds and dashboards are public, nothing changed there, so I am at a bit of a loss.

I am seeing the following the JS console (on Chrome);

Uncaught SyntaxError: Unexpected token ILLEGAL
jquery-1.11.2.min.js:4 Synchronous XMLHttpRequest on the main thread is deprecated 
because of its detrimental effects to the end user's experience. For more help, 
check http://xhr.spec.whatwg.org/.

Not sure if that is relevant tho...

[Long line wrapped for legibility - RW]

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Found something in the JS console;

    $('body').css("background-color","#<br />
<b>Notice</b>:  Undefined index: backgroundcolor in 
<b>/var/www/emoncms/Modules/dashboard/Views/dashboard_view.php</b> 
on line <b>39</b><br />
");

Looks like this line in dashboard_view.php;

    $('body').css("background-color","#<?php echo $dashboard['backgroundcolor']; ?>");

Which is coming from dashboard_config.php?

        $('#page-container').css("background-color","#"+fields['backgroundcolor']);

PHP is a bit of a mystery to me but does this give any clues?

 

[Long line wrapped for legibility - RW]

Paul Reed's picture

Re: My Electric app showing yesterdays usage in *Use Today*

I don't think that error code is the problem - I've had it for the past year!

Only other thing I can suggest, is have you used the 'extended' default.settings.php file, or just copied the v8.5 version across.

The extended version must use it's own settings.php file.

 

Paul

Edit - this was in response to post timed 22.46hrs.

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

I did copy my 8.5 settings across, and had another issue due to the engines_hidden field that was missing. Copied that and made sure everything from default_settings.php exists in my settings file. So I am pretty sure that is ok now. 

However just to be sure I created a brand new setting file from the default, and set my DB connection properties. Still the same thing unfortunately.

Paul Reed's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Chaveiro is the author of the extended branch, and is probably the best person to answer this. I'll change the title of this forum thread to 'Extended version - widgets not displaying' to hopefully get his help.

Paul

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Thanks Paul - appreciated!

pb66's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Have you tried admin => upgrade and check db's ?

Paul

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

You sir, are a genius!! The upgrade step missing did involve the background colour it seems - and now the dashboards are fine - thanks again!!

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Hey Paul - I have renamed this thread again as I just noticed that post-midday I am again seeing yesterdays total in my USE TODAY field (see attached). I presume this has something to do with timezones as I am in NZ and this was working this morning when you were helping me out with my original query.

pb66's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Just for clarification Ben, are you saying the "use today" was correct (ie today's use) pre-midday and then incorrect post-midday (showing the previous days total) ? 

(using all NZ time refs)

Not that I think I will have an answer for you, but I just wanted to be sure I was reading it right as if it was a straight forward timezone issue and one or other was half a day out then I would of expected either AM would show yesterday or PM would show tomorrow, PM showing yesterday doesn't sound right at all. 

Did you set your timezone setting in emoncms again since upgrading? v8.5 & v8.5xt use secs rather than hours for TZ calc's behind the scenes to allow 15min timezone variances, so reselecting your timezone could make a difference, this was discussed in another thread a while back.

Paul

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Once again you are on the money Paul - setting my timezone to London and then back to NZ seems to have fixed it. I try and keep up to date with these threads but obviously missed that one about the changes in this Extended branch, requiring re-setting of params etc - many thanks (once again) for your help with this!

BTW - this extended branch seems pretty good - I like the dashboard menus and it looks really good on my phone/tablet.

Paul Reed's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Yes, it's definitely the best and most bug free version at the moment, and it's under current development.

Paul

 

pb66's picture

Re: My Electric app showing yesterdays usage in *Use Today*

no problemo!

From what I can gather the TZ reselection is both v8.5xt and v8.5 (but not v8.5 low-write) and then only the v8.5xt also requires the extra "hidden-engines" entry in settings.php and the "update & check" tables too.

A couple of other additions to xt are 

EmonCMS multi rate scheduler

Processor List with conditional processes

they look pretty neat but I haven't tried them myself yet as I've been working on other things but I hope to soon.

Paul

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

Unfortunately this is still not quite right...

As you can see this evening (Mon 11pm) the My Electric app is showing *yesterdays* total in the USE TODAY field. 

This morning the app was looking fine, i.e. it was showing the running total for today. I don't know exactly when it swapped over to this incorrect view but I am guessing it would have been around midday.

I will try and keep a closer eye on it tomorrow and report back any findings.

sumnerboy's picture

Re: My Electric app showing yesterdays usage in *Use Today*

I can confirm that up until midday today the app was correctly showing the running total for *today* in the USE TODAY field. As soon as it clicked over to midday, it started showing the total for *yesterday*.

The bars in the graph still render correctly (as shown in my screenshot above). It is only the USE TODAY field that is displaying the wrong value.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.