Submitted by vworp (not verified) on Sun, 20/05/2012 - 17:18.
I've had my first play with multigraphs and house-graphs this weekend, both are giving me similar issues. House-graphs take a long time to appear, multigraphs never appear and give me a message "Loading a feed can take time.."
I don't think I have a problem with volume of data, I started a fresh database only four days ago, it only has six inputs and eight feeds.
»
Re: Multigraph
Submitted by TrystanLea on Sun, 20/05/2012 - 20:23.
I think I may have fixed it, I had missed out a resolution variable in the feeds model - which would have caused it to load data points at full resolution. Could you try installing the latest version?
Submitted by vworp (not verified) on Sun, 20/05/2012 - 21:17.
It's made no difference for me.
»
Re: Multigraph
Submitted by TrystanLea on Mon, 21/05/2012 - 07:43.
Ok I think I've got it this time.. I forgot to add the line to create an index on the mysql feed table. I've just added the line and updated to the emoncms repo so all new feeds from now on will have an index and be much faster.
To add an index to old feeds, run the following mysql command in phpmyadmin for the feeds that need an index:
ALTER TABLE feed_1 ADD INDEX (time);
I will see if I can make a script that will do this automatically.
»
Re: Multigraph
Submitted by TrystanLea on Mon, 21/05/2012 - 07:59.
I've added a few lines to the feed conversion script conv.php which is in the root directory of emoncms3. It looks for missing indexes and then add them.
To run conv.php
1. Open the file and uncomment //$runnable = TRUE;
2. and then uncomment:
//$feeds = get_all_feeds();
To run the script for all feeds.
3. run conv.php in your browser.
»
Re: Multigraph
Submitted by vworp (not verified) on Mon, 21/05/2012 - 16:56.
Multigraphs seem to be working for me now. I'll have a bit of a play later and let you know if I have any problems.
»
Re: Multigraph
Submitted by vworp (not verified) on Mon, 21/05/2012 - 18:36.
I'm finding that if I try and include the multigraph in a dashboard, it's truncating the lower edge of the graph though the date/times.
div class="widget-container-nc"><iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://192.168.1.70/emoncms3/Vis/MultiGraph/multigraph.php" style="width:745px; height:570px;"></iframe></div
Oh dear. I've just update the software to the latest version, run conv.php, and now my house graphs (embedded dashboard) are empty, and when I try and login I get:
Unknown column 'lang' in 'field list'
Fatal error: Call to a member function fetch_array() on a non-object in /www/sites/fd9/da3/www.xxxxx.co.uk/web/emoncms3/Includes/db.php on line 56
The output from conv.php was:
converted feed: 1
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 2
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 3
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 4
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 5
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 6
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 7
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 8
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 9
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 10
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 11
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 12
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 13
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 14
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 15
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 16
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 17
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 18
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 19
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 20
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 21
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 22
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 23
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 24
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 25
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 26
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 27
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 28
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existfeed: 29 already converted
If you look in the php file there is a 100% width and 100% height you can change to 70-80%
»
Re: Multigraph
Submitted by TrystanLea on Wed, 23/05/2012 - 08:41.
Lloyd, Im not sure about the FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 27 error have not seen that before, will look into it.
I guess it originates on this line: $result = db_query("INSERT $feedname SELECT UNIX_TIMESTAMP (time),data FROM feed_tmp");
which works fine for me, I wonder if it could be differences in mysql version?
As for Unknown column 'lang' in 'field list', if you run setup.php it will add that field.
»
Re: Multigraph
Submitted by TrystanLea on Wed, 23/05/2012 - 08:44.
O dear, Has it deleted all your data? I realize that if it fails at that point it will not detect that it has and subsequently delete the feed_tmp data.
Tracked down the 'lang' field error last night and ran setup.php, which, as you thought, solved that issue. Re-running conv.php I did not get any errors. However, when I log in now I get no inputs, feeds or dashboard. Will try and see what (if any) data is left in my database now by using phpadmin. (I would have thought that even if the inputs were deleted they would have been recreated when I sent a new data packet from emonbase?)
Using the browser debugger, looking at list_view, I see all my inputs listed as a result of
var inputs = <?php echo json_encode($inputs); ?>;
However, when the code goes into the update_list function, in never enters the for loop ( for (z in inputs)), so no data is output. (And this is not a file I have edited)
Seems to have sprung into life (!). Not sure why, but I'm not going to bother looking.
Lloyd
»
Re: Multigraph
Submitted by TrystanLea on Sat, 26/05/2012 - 17:05.
Hello Lloyd, sorry for the slow reply, good to hear that your feed data is still there. I wonder if it was a cache problem as to why the inputs where not displaying.
Re: Multigraph
Volume of data? I always try and select the shortest time period before selecting the data to plot.
Lloyd
Re: Multigraph
ok, i just see a week. So that should not be a big problem.
Wonder if it has something to do with hosting my own server with static publich ipadr. And the setup off script path.
http://www.juelsminde.org/solceller/
Re: Multigraph
I've had my first play with multigraphs and house-graphs this weekend, both are giving me similar issues. House-graphs take a long time to appear, multigraphs never appear and give me a message "Loading a feed can take time.."
I don't think I have a problem with volume of data, I started a fresh database only four days ago, it only has six inputs and eight feeds.
Re: Multigraph
I think I may have fixed it, I had missed out a resolution variable in the feeds model - which would have caused it to load data points at full resolution. Could you try installing the latest version?
Have a look at the multigraph here for typical loading times: http://openenergymonitor.org/emon/beehive/v2
Re: Multigraph
It's made no difference for me.
Re: Multigraph
Ok I think I've got it this time.. I forgot to add the line to create an index on the mysql feed table. I've just added the line and updated to the emoncms repo so all new feeds from now on will have an index and be much faster.
To add an index to old feeds, run the following mysql command in phpmyadmin for the feeds that need an index:
I will see if I can make a script that will do this automatically.
Re: Multigraph
I've added a few lines to the feed conversion script conv.php which is in the root directory of emoncms3. It looks for missing indexes and then add them.
To run conv.php
1. Open the file and uncomment //$runnable = TRUE;
2. and then uncomment:
//$feeds = get_all_feeds();
To run the script for all feeds.
3. run conv.php in your browser.
Re: Multigraph
Multigraphs seem to be working for me now. I'll have a bit of a play later and let you know if I have any problems.
Re: Multigraph
I'm finding that if I try and include the multigraph in a dashboard, it's truncating the lower edge of the graph though the date/times.
div class="widget-container-nc"><iframe frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://192.168.1.70/emoncms3/Vis/MultiGraph/multigraph.php" style="width:745px; height:570px;"></iframe></div
Re: Multigraph
Oh dear. I've just update the software to the latest version, run conv.php, and now my house graphs (embedded dashboard) are empty, and when I try and login I get:
Unknown column 'lang' in 'field list'
Fatal error: Call to a member function fetch_array() on a non-object in /www/sites/fd9/da3/www.xxxxx.co.uk/web/emoncms3/Includes/db.php on line 56
The output from conv.php was:
converted feed: 1
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 2
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 3
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 4
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 5
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 6
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 7
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 8
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 9
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 10
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 11
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 12
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 13
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 14
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 15
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 16
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 17
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 18
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 19
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 20
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 21
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 22
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 23
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 24
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 25
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 26
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 27
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 28
FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existfeed: 29 already converted
Missing index added to: feed_29
feed: 30 already converted
Missing index added to: feed_30
feed: 31 already converted
Missing index added to: feed_31
feed: 32 already converted
Missing index added to: feed_32
feed: 33 already converted
Missing index added to: feed_33
Re: Multigraph
I'm finding that if I try and
If you look in the php file there is a 100% width and 100% height you can change to 70-80%
Re: Multigraph
Lloyd, Im not sure about the FUNCTION xxxxx_co_uk_db.UNIX_TIMESTAMP does not existconverted feed: 27 error have not seen that before, will look into it.
I guess it originates on this line: $result = db_query("INSERT $feedname SELECT UNIX_TIMESTAMP (time),data FROM feed_tmp");
which works fine for me, I wonder if it could be differences in mysql version?
As for Unknown column 'lang' in 'field list', if you run setup.php it will add that field.
Re: Multigraph
O dear, Has it deleted all your data? I realize that if it fails at that point it will not detect that it has and subsequently delete the feed_tmp data.
Re: Multigraph
Tracked down the 'lang' field error last night and ran setup.php, which, as you thought, solved that issue. Re-running conv.php I did not get any errors. However, when I log in now I get no inputs, feeds or dashboard. Will try and see what (if any) data is left in my database now by using phpadmin. (I would have thought that even if the inputs were deleted they would have been recreated when I sent a new data packet from emonbase?)
Lloyd
Re: Multigraph
Well inputs, feeds and dashboard all still exist. I wonder if I screwed up my editing whilst trying to debug last night?
Lloyd
Re: Multigraph
Using the browser debugger, looking at list_view, I see all my inputs listed as a result of
var inputs = <?php echo json_encode($inputs); ?>;
However, when the code goes into the update_list function, in never enters the for loop ( for (z in inputs)), so no data is output. (And this is not a file I have edited)
(Hope that makes sense!)
Lloyd
Re: Multigraph
Seems to have sprung into life (!). Not sure why, but I'm not going to bother looking.
Lloyd
Re: Multigraph
Hello Lloyd, sorry for the slow reply, good to hear that your feed data is still there. I wonder if it was a cache problem as to why the inputs where not displaying.