Saving graphs

I only seem to be able to save 5 graphs, is this something I can configure somewhere or an intentional limitation?

emonCMS local, or emoncms.org?

I can save more than 5 on both the local emonPi version of emonCMS and (7 so far) on emoncms.org. But trying it - the .org seems to be fussy with the names. It seemed to save, but not be able to find, short names or ā€œspecialā€ characters like ā€œV&Pā€.

This is one for @TrystanLea

Sorry, I sould have said I can save more than 5 graphs, but when selecting a graph, I can only see 5. Same when I create a dashboard and want to add a graph to it. If I create a new graph, then I lose access to one of the previous graphs.

BTW I am referring to the local site. I havenā€™t used emoncms.org

That wasnā€™t clear to begin with.

Nor this.

Which emonCMS version? Is it a browser limitation? Iā€™m running Opera under Ubuntu, and I have, and can see and choose, 7:

Screenshot 2021-04-12 14:45:54

Screenshot 2021-04-12 14:53:45

Iā€™m using Chrome, Firefox and Edge and no I doubt it would be anything to do with the browser. The list will be generated on the server. The emoncms version is 10.2.6

It was worth checking - was the browser handling the drop-down correctly, was my thinking. Iā€™ve tried Chrome and FF, and see exactly the same 7 graphs. But Iā€™ve got the July 2020 version, 10.2.7. Iā€™m not an emonCMS expert, so I wouldnā€™t know if this was something changed between V10.2.6 & 10.2.7. @TrystanLea should get notified so hopefully heā€™ll be able to advise you.

Hello @NickC I cant replicate this issue here, there should not be a limit on the number of graphs. Under the dropdown list for selecting graphs in the graph interface (not dashboards) do you see the [#1] part? or do you just see names?

@TrystanLea

Nor could I, but there does appear to be an issue with short names/the characters in the name, as I noted in post. no.2 (in fact both emoncms.org & local appear to be the same).

I have the same issue now on a local version, however Iā€™m stuck at 8 graphs.

Once you have a name/symbol that it does not like, thatā€™s the end of it, no more will display in the pull down menu after that. In my case my 9th graph was called ā€œTemperature & Humidityā€. I expect it does not like ā€˜&ā€™

I can create graphs (Iā€™m up to #11), but canā€™t edit nor display them.

Is there any easy way to delete the graph causing my issue?

Many Thanks
Wayne

Welcome, Wayne to the OEM forum.

There does indeed appear to be a problem with ā€œunacceptableā€ characters in the name (but no indication of what those are).

@TrystanLea

Can you have a look at this, please?

I just played around with it again. I deleted the last graph in the pull down menu (In my case #8). After doing this I can now create and edit new graphs again. Happy days!! There is something not 100% right, but I seem to have a work around.

I have been upgrading two installations from the 8.2.6 days to one new system. Iā€™m loving the new look! I have about 100 feeds to move across and doing a bit at a time.

Thanks guys.

All of a sudden I am able to view more than 5 in the list. These are new ones, perhaps I was using non alpha numeric chars in the old ones, Iā€™m not sure anymore.

I strongly suspect that is the problem, but I donā€™t know the internals of emonCMS, so I donā€™t know where to start looking.

Information for the graph definitions are stored in the MySQL database, along with the data that is to be graphed.

I hadnā€™t gone looking for it before, but after seeing this thread the other day I got some pointers.

You can see from the text below that the config (including the graph name) is held in a table called graph in the database called emoncms.

Iā€™m not suggesting this as a permanent fix, but if you need to get access to your graphs and canā€™t because thereā€™s a special character in one of them then you can rename the graph by updating this table.

David


pi@emonpi:/etc/emonhub $ sudo mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 477
Server version: 10.3.27-MariaDB-0+deb10u1 Raspbian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| emoncms            |
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.003 sec)

MariaDB [(none)]> use emoncms
    Database changed
MariaDB [emoncms]> show tables;
+-------------------+
| Tables_in_emoncms |
+-------------------+
| app_config        |
| dashboard         |
| demandshaper      |
| device            |
| feeds             |
| graph             |
| input             |
| multigraph        |
| postprocess       |
| rememberme        |
| schedule          |
| setup             |
| sync              |
| users             |
+-------------------+
14 rows in set (0.001 sec)

MariaDB [emoncms]> show fields from graph;
+---------+---------+------+-----+---------+----------------+
| Field   | Type    | Null | Key | Default | Extra          |
+---------+---------+------+-----+---------+----------------+
| id      | int(11) | NO   | PRI | NULL    | auto_increment |
| userid  | int(11) | YES  |     | NULL    |                |
| groupid | int(11) | YES  |     | 0       |                |
| data    | text    | YES  |     | NULL    |                |
+---------+---------+------+-----+---------+----------------+
4 rows in set (0.007 sec)

MariaDB [emoncms]> select * from graph;
+----+--------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | userid | groupid | data                                                                                                                                                                                                                                                                                                                                                                               |
+----+--------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|  7 |      1 |       0 | {"name":"Test graph","start":1618759800000,"end":1619365500000,"interval":900,"mode":"interval","fixinterval":false,"floatingtime":1,"yaxismin":"auto","yaxismax":"auto","yaxismin2":"auto","yaxismax2":"auto","showmissing":false,"showtag":true,"showlegend":true,"showcsv":0,"csvtimeformat":"datestr","csvnullvalues":"show","csvheaders":"showNameTag","feedlist":[],"id":""} |
+----+--------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.001 sec)
2 Likes

Thanks for the further info on this. I think Iā€™ve now been able to fix it, certainly works now with the ā€œTemperature & Humidityā€ test.

The latest version is currently in the graph module master branch which I will merge into stable and make available via emonPI update process soon.

Iā€™ve updated emoncms.org with this latest version as well.

1 Like