Community
OpenEnergyMonitor

Community

[solved] Problems with graphs module in local emoncms

graph
Tags: #<Tag:0x00007f10aeee6130>
(alex) #1

Hi,
first of all thank you for all your work.
I’m testing out emoncms in two different raspberrys.
one run smoothly but with the other one i have issues with the graph module.
when i try to select a feed in the graph module a popup appears:
EmonCMS Error


Message: TypeError: item.data is undefined
URL: http://192.168.1.17/emoncms/Modules/graph/graph.js?v=1
Line: 622
Column: 17

the emoncms.log says :
|WARN|feed_model.php|Feed model: Requested feed does not exist feedid=0

i’ve got 3 PHPFINA feeds with an update of 30 sec.

another thing:
to pass my values i use this string every 30 sec:
http://127.0.0.1/emoncms/input/post?time=”+ unixtime +"&node=energia&json={" + str(i) + “:” + str(values[i]) + “}&apikey=e7d40db902ca61eed33b2705432e218c”
the input section of emoncms does update the values but does not update the values’ time. in fact i see the values changing but i don’t see the “updated” counter reset to 0. it reset itself to 0 every 60sec.

where is the error?

thank you

Edit - fixed text formatting. BT, Moderator.

0 Likes

(Frogmore42) #2

Are you using the latest graph module checked in to GitHub or did you burn the last stable SD card image?

That is, what are you running?

I got a similar error using the graph module from GitHub with the stable sd card image. But the stable card image by itself has always worked fine.

0 Likes

(alex) #3

thank you for your reply.
it’s a fresh raspbian stretch installation. i’ve used the instruction from github in both the raspberrys.

this is what it tells:
Version low-write 9.9.5
Modules Administration | Dashboard v1.3.2 | EventProcesses | Feed | Graph v1.2.1 | Input | CoreProcess | Schedule | Time | User | Visualisation

0 Likes

(Paul) #4

Have you cloned emoncms and the graph module at the same time or updated them together (git pulls)?

Are they both master branches?

There was a change a couple of weeks ago to the graph module that depended on a change to the emoncms core too. So graph modules installed or updated after that point need to run with emoncms installed or updated after that time too, assuming they are both on the default master branches.

If they are both master and both up to date, you should be ok
If they are both stable branches, you should be good.
It’s only when you have latest graph master and out of date emoncms master or emoncms stable, you should see the problem.

In short, ensure they are both master or both stable and ensure they are both up to date (fresh pull).

If the issue persists after an update and a browser cache clear [CRTL-F5] let us know the output of the following command, run from each of emoncms and emoncms/Modules/graph folders

git describe 
git status

[edit - split 2 commands on to 2 lines in case the first fails (see below)]

0 Likes

Enhancements to the graph module
(alex) #5

hi
all up to date and stable.

EMONCMS

9.9.4-25-g59723e7c
On branch stable
Your branch is up-to-date with ‘origin/stable’.

GRAPH

fatal: No annotated tags can describe ‘8de3b88a9b79ff4d655d2ba36d781bd565c628e7’.
However, there were unannotated tags: try --tags.

i’ve followed the instructions from here:

thank you

0 Likes

(Paul) #6

We have some conflicting info there.

The commit number returned in the git describe is only 4 days old and only in master not stable.

If you followed the graph install guide to the letter and didn’t change branch to stable (git checkout stable) you will install master by default.

[edit] I should have put the git commands on different lines as when on one line, if the first fails the second doesn’t run.

git describe
git status
0 Likes

(alex) #7

Here the git status on graph folder:

On branch master
Your branch is up-to-date with ‘origin/master’.
nothing to commit, working tree clean

and yes i have followed the instruction to the letter. i was supposing that it was the stable release…

0 Likes

(Paul) #8

To switch to stable branch use

git checkout stable

from within the graph module folder

0 Likes

(alex) #9

ok, i’ve done it, then git pull but it says already up to date.

now as soon as i open the graphs page from the setup menu this messages appear:

EmonCMS Error


Message: ReferenceError: apikey is not defined
URL: http://192.168.1.17/emoncms/Modules/graph/graph.js?v=1
Line: 582
Column: 9

Edit - fixed text formatting. BT, Moderator

0 Likes

(Paul) #10

Can you confirm you are on stable using git status and alao clear the browser cache, with ctrl-f5 (on most browsers) whilst viewing the graph page.

0 Likes

(alex) #11

Paul you are my hero! :wink:

after clearing the cache it works!
thank you for your time!

have you got a solution for the 30sec input update issue?

1 Like

(alex) #12

Sorry, my bad!
an issue with my script that updates the values…
i was updating the values without updating the time…

Thank you again!

0 Likes

(Eduardo Rodrigues) #13

I’m having the same problem described in the first post!
My EmonCMS installation was working ok for about a year, it isn’t a new one.
The result of the @pb66’s commands:

Emoncms:

[email protected](rw):emoncms# git describe
9.9.4-25-g59723e7
[email protected](rw):emoncms# git status
On branch stable
Your branch is behind 'origin/stable' by 180 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

         modified:   default.emonpi.settings.php

no changes added to commit (use "git add" and/or "git commit -a")

Graph:

[email protected](rw):graph# git describe
fatal: No annotated tags can describe '607db6fd39329e7273860da4d2a66b9bfe411ea8'.
However, there were unannotated tags: try --tags.
[email protected](rw):graph# git status
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
0 Likes

(Brian Orpin) #14

The solution (as marked) was to clear the cache, have you tried that?

0 Likes

(Eduardo Rodrigues) #15

Yes I try that with no luck but now I’m out of home and in the phone the graphs look ok…

0 Likes

(Eduardo Rodrigues) #16

Now in the phone have the error too… and clear the cache doesn’t solve the problem!
I got the problem even in a brand new browser!

0 Likes

(Brian Orpin) #17

Hi,

One issue is you cannot do an update because you have modified one of the files in your setup.

Please copy default.emonpi.settings.php to just emonpi.settings.php.

You then need to restore the default file.

git checkout -- default.emonpi.settings.php

then try a

git pull

Which should update your Emoncms installation

I suggest you then run an update from the administration interface as that will bring the whole set of software up to date.

Let me know how you get on.

0 Likes

(Eduardo Rodrigues) #18

That solve the problem, thanks!

Now I’m having this problem again: Hovering data point values not showing

0 Likes

(Brian Orpin) #19

Did you do the full update from the Administration Menu? The update takes a while (so be patient - go do something else) and you might need to clear cache again.
image

0 Likes

(Eduardo Rodrigues) #20

Yes already update, now it’s 9.9.7, clear the cache, try another browser, etc… and keeps not working!

0 Likes