Issues with MyElectric [SORTED]

Struggling to get MyElectric recording the kWh/day correctly.

I'm using a PHPFIWA mains import feed (positive values) for the Power feed (Watts): which displays the Power Now OK.

For the Use Today and the bar graph I have tried a MYSQL 'Power to kWh/d' feed, and various Bar graph feed type settings - none of which appear to give the correct figures.

I've read Trystan's post about this several times - am I missing something obvious?

Paul.

JBecker's picture

Re: Issues with MyElectric [SORTED]

Mine started to work after upgrading to the latest V8.08.

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

I'm running v8.09

TrystanLea's picture

Re: Issues with MyElectric [SORTED]

Could you try the latest update to the master repo, the error is being produced is by the data values from mysql being returned as string values instead of floats, I've added a typecast in there.

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Getting there!!

The 'Power Now' and bargraph are showing the correct values, but the 'Use today' value is incorrect.

It shows 8.5kWh, when according to the 'power to kwh/d' feed I've used 5.76kWh (the value which is also shown on the bargraph - far right - rounded).

Paul

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

In fact, just spotted the issue! The 'Use Today' value is being taken form the far left bargraph value instead of the right hand side (8.53 rounded = 9).

If I restore up the window size a little so more values are displayed, the 'Use Today' value changes to that of the furthest left value on the barchart (9.61 rounded = 10).

Paul.

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Is this error unique to MYSQL feeds?

Paul

JBecker's picture

Re: Issues with MyElectric [SORTED]

Mine is working perfectly with PHPFIxA feeds. Window resized from 5 to 15 bars 'width', always showing the correct 'use today' value.

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Jörg, what are you using for the 'Bar graph feed'?

I'm using a MYSQL 'Power to kWh/d' feed'.

Paul

JBecker's picture

Re: Issues with MyElectric [SORTED]

PowerTot is a normal power feed with unit W.

PowerKwhD is made from power input by power to kwh/d.

All feeds are PHPFIWA or PHPFINA:

Jörg.

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

I thought that daily feeds (PowerKwhD) were still written to MYSQL?

When I select a 'daily' process, I don't get the option to select anything other than MYSQL.

Paul

JBecker's picture

Re: Issues with MyElectric [SORTED]

If I add a process 'Power to kwh/d' I am not able to select any feed engine at all!?! And then the feed is always set to PHPFINA.

Is this different to what you see?

Jörg.

 

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

AAaah yes, by default, it creates a new PHPFINA feed. I presumed because the option to select a feed type was not there (as it is when creating a new 'log to feed') that it would create a MSQL feed. My mistake!

 
My 'Power to kwhd' is currently MSQL, and it does not currently work fully with Myelectric (as above), so maybe the answer is to delete my MYSQL feed and create a fresh PHPFINA feed. I'll do that later.
 
Thanks
 
Paul
TrystanLea's picture

Re: Issues with MyElectric [SORTED]

Paul: I've pushed up the fix for the use today value bug.

TrystanLea's picture

Re: Issues with MyElectric [SORTED]

Yes the new default is PHPFINA. If you did want MYSQL (both are compatible) its possible to enable the engine selector with an option for mysql by modifying the Modules/input/process_model.php. For example to enable MYSQL as an option for the power_to_kwhd input processor, change the line:

$list[5] = array(_("Power to kWh/d"),ProcessArg::FEEDID,"power_to_kwhd",1,DataType::DAILY,"Power",array(Engine::PHPFINA));

to:

$list[5] = array(_("Power to kWh/d"),ProcessArg::FEEDID,"power_to_kwhd",1,DataType::DAILY,"Power",array(Engine::PHPFINA,Engine::MYSQL));

If you've already got your daily data in MYSQL then I would carry on using it as both should be fully compatible.

tgmaxx's picture

Re: Issues with MyElectric [SORTED]

I applied the latest update for use today value. It is now working if I use my write API key. I access the page using my write API, such as:

http://192.168.0.252/emoncms/myelectric?apikey=.................  

But, the menu bar shown is the logged in one, even though I am not logged in. The wrench is available and I am apparently able to change the feed settings. If I use the read API key, nothing comes up.

What was the planned access procedure for the myelectric page?

Thanks,

Tom

 

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Tom, I already asked this, see http://openenergymonitor.org/emon/node/4775#comment-20229 and Trystan's reply.

Back on topic - Yes the latest update has fixed the bug, and all is well!!

 

Paul

 

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Trystan, for some reason I'm still getting the wrong 'USE TODAY:' reading in the Myelectric page.

It appears to be getting the value from the leftmost 'bar' instead of the righmost 'bar', so if I shrink the browser window, the 'USE TODAY:' value changes as the bar chart reduces the number of 'bars' being displayed.

I'll PM you a link!

 

Paul.

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Just looking back... the original issue (post #1) was resolved on 4th April (as above) which related to a MYSQL bar graph feed issue.

This issue (which is not the same, yet not dissimilar to the above) has revealed because I am now using a PHPFINA feed for the bar graph feed, instead of MYSQL.

Paul

JBecker's picture

Re: Issues with MyElectric [SORTED]

Same for me! Saw this some days ago and reminded me of what you found weeks ago, Paul.

Jörg.

 

Paul Reed's picture

Re: Issues with MyElectric [SORTED]

Fixed!, I've made a git pull request to Trystan to merge the code change.

Paul

tgmaxx's picture

Re: Issues with MyElectric [SORTED]

Paul,

I am still seeing the issue you described -- USE TODAY showing the left-most column. I am using MYSQL.

Thanks,

Tom

 

CapnBry's picture

Re: Issues with MyElectric [SORTED]

I upgraded my emoncms last night and love the new MyElectric display. It also was showing the left-most column as the total.

The issue is that MysqlTimeseries (good ole engine 0 KWHD) reports some of its data backward in descending time order. All graphs render properly because the points all have times associated with them so they effectively re-sort when the graph is created, but the myelectric page expects the most recent data to be in the last item returned (which it is for other feed engines).

All that's needed to be done is to fix the order so MysqlTimeseries returns its data sorted in time order. I don't think any other module expects the data to be flopped (especially because currently some code paths return it in natural sort order).

 

Comment viewing options

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