getting started with emoncms

I've trawled the forum and can't see anything .. is there a step by step guide to setting up emoncms on windows ? All the available instructions make massive assumptions about knowledge levels and I'm stumped. From a zero knowledge base I've built EmonTx & GLCD and they are working fine, I've installed C++ & Wamp but after that I've hit a brick wall on the next step to get started with emoncms.

 

Any thoughts ?

Robert Wall's picture

Re: getting started with emoncms

I have an old version (not the current one) installed and it was moderately obvious after reading the notes but not fully automatic. I probably need to rip out the old one and install anew, documenting as I go.

From memory, you need to use the Wamp utilities to get Apache, PHP and MySQL installed and working (i.e. can you run a php web page, can you create a test database with phpmyadmin?). Then you download and put the emoncms files into a folder in your Wamp "website" directory. The big problem I hit was getting a consistent set of passwords and the correct host and user names for the emoncms database - and that's where memory fails me! Just looking at the privileges table now, I've got "localhost", "127.0.0.1" " % " and " ::1 " as the host, and "root", "emon", "EmonCMS" and "Robert" as the user, and I can't remember which are redundant.

I don't think you need a C++ other than the Arduino IDE.

If you can narrow down where your brick wall (and stop taking my name in vain!) is, I'll try to help.

canary50's picture

Re: getting started with emoncms

thanks; I've been trying to follow the instructions at

http://emoncms.org/site/docs/installwindows

So I have installed C++ & installed Wamp. Next step is to allow mod rewrite using the CMS tutorial as a guide which says to check the rewrite module in apache modules which I've done. The tutorial then has same sample code but not clear what ( if anything ) I should do with that ?

The next step is to create a MYSQL database and I have absolutely no idea where or how I should do that.

And thats where I'm up to; if you are able to push me in the right direction, I'd appreciate it.

Robert Wall's picture

Re: getting started with emoncms

Fire up your browser and go to "localhost".  You're on a website now. You should see the Wamp home page and phpmyadmin is under "Tools". You run phpmyadmin from there (click it). Click "Databases" in the top banner. In the next screen, think of a name for your database (I used "emondata") and put that in appropriate box and click "Create". From memory, that's all you need to do there as the rest is handled by copying emoncms, until as I said you need to tie together the user names, passwords and permissions.

Note, you need to develop schizophrenia! And be clear which world you are inhabiting! You copy emoncms into the WAMP website folder in the Windows world (and you edit the setup file there too); but you move into the website world to run phpmyadmin through your browser, and there you set up the database and users.

When you've copied emoncms in the Windows world, you'll find you have (in the website world) on your Wamp home page (localhost) a website called something like openenergymonitor-emoncms3-1234567. It's that which you click on to run emoncms.

canary50's picture

Re: getting started with emoncms

the mists are clearing ... albeit slowly !

After copying emoncms into the website folder, do I need to make any changes to the setup file ? If so what changes ?

Run phpmyadmin to set up the database & users ... what do I do there ?

thanks in advance ..... 

Robert Wall's picture

Re: getting started with emoncms

Run phpmyadmin to set up the database & users ... what do I do there ?

Create a database, like I said.

Then set yourself up as a user: click on Privileges, click on Add a new user, then invent a User name, enter "localhost" as the host, and give yourself a password then click Create the user. When it returns to the previous screen, you need to give yourself ALL PRIVILEGES. So Click Edit privileges and click Check all, then Go to apply them (you might not need all privileges, I'm not sure about this. If you and emoncms are the only users, it won't matter anyway).

do I need to make any changes to the setup file ?

Do as the instructions say. Use the User name, password, server (host) and database names that you invented above:

6) Set emoncms settings.php

Copy default.settings.php and rename to settings.php. Enter your database username, password, server and database name.

canary50's picture

Re: getting started with emoncms

I'm getting there (!) and really appreciate the help.

I'm obviously doing something wrong with the settings.php file. How do I open it to make the changes ? I can't open from the windows folder and if I open it from phpmyadmin I can see the text file and see the lines of code but can't edit them.

Robert Wall's picture

Re: getting started with emoncms

"the settings.php file. How do I open it to make the changes ? I can't open from the windows folder"

You should be able to open it from Windows. What error message do you get? If it's open and PHP has locked it, then you might need to shut down Wamp, and check that it isn't readonly.

(I've got a utility called "Unlocker" that can work wonders in situations like this: http://www.emptyloop.com/unlocker/ )

(Oops - download there doesn't work, try http://www.filehippo.com/download_unlocker/ )

WARNING:  Toolbar alert! You really only need the Explorer extension - right-click on the file to access Unlocker.

 

canary50's picture

Re: getting started with emoncms

out of action for a few days, will let you know how things go and thanks again for the help. 

canary50's picture

Re: getting started with emoncms

Hi, back again .... ! Some progress but not quite there. I managed to edit the settings file using wordpad.

I now have emoncms installed at C:\wamp\www\emomcms-master.

I have both the default.settings.php file and the copied version called settings.php with username, password, server (localhost) and database names entered in it.

On the wampserver homepage ( at htttp://localhost ) under "Your Projects", I have emoncms-master. When I click on that I get

( ! ) Fatal error: Call to undefined function bindtextdomain() in C:\wamp\www\emoncms-master\core.php on line 117
Call Stack
# Time Memory Function Location
1 0.0009 150976 {main}( ) ..\index.php:0
2 0.0130 269488 controller( ) ..\index.php:65

Any thoughts ?

 

 

Robert Wall's picture

Re: getting started with emoncms

That says it can't find the function bindtextdomain() It should exist in PHP4 & PHP5 according to the manual - Which version of PHP you do have?

canary50's picture

Re: getting started with emoncms

 

Wampserver 2.2

apache 2.2.22

PHP 5.4.3

phpMyadmin 3.5.1 although I have just noticed the latest version is 3.5.7 would that make any difference ?

MySql 5.5.24

Robert Wall's picture

Re: getting started with emoncms

The PHP version isn't the problem then.(Phpmyadmin isn't running emoncms!)

After a lot of digging, here's the solution - the error message is being economical with the truth! It appears that you've got to install the "gettext" extension.

Left-click on your Wamp icon and hover on PHP, then click on php.ini.  This will open the file in Notepad and you'll see the line about half-way way down (do a find for "gettext"):

;extension=php_gettext.dll

it's commented out - remove the semi-colon and save the file. Do a restart all services on Wampserver and magic will be seen to have been performed. I'm just off to email Trystan to get him to change the instructions.

canary50's picture

Re: getting started with emoncms

magic has indeed occurred, many thanks for your help.Onto the next step now !

canary50's picture

Re: getting started with emoncms

I have now got the Mk2 solar diverter working ( just as we get a few days of cloud & rain ) and it seems to be working fine, thanks to this forum for the patience in guiding me through it !

I have got emontx talking to emonglcd and the data seems to calibrate quite well with the data from my Aurora inverter.

NanodeRF is working, sending a time signal to GLCD and sending data to emoncms.org where I can see inputs, the four sets of data from emontx and one from GLCD.

I want to go onto the next step and get the visualisations & dashboards working but this is where I get confused again ...

In Emoncms, looking at the "Docs" tab ... Using Emoncms .. inputs and feeds ... I'm invited to click on an example link but nothing to click on ( at least that I can see ) and I can't make sense of what to do next.

On the input screen, there are four lines for my Node 10 ( which I guess are the emontx data ) there is a pen icon which opens a text window but I can't save anything into the window. If I click on the spanner icon for each line, I am told a feed already exists so can't do anything with that.

Is there any user documentation I am missing ?

thanks

 

Robert Wall's picture

Re: getting started with emoncms

I think so! If you scroll down the first screen (the one where you log in), you should see User Documentation and Emoncms guide. Have you been there and seen that?

canary50's picture

Re: getting started with emoncms

the very first screen ? Nothing on that other than the banner at the top, which does have a "Docs" link to some further links on using Emoncms, but they stop short of being useful I'm afraid.

http://emoncms.org/site/docs/inputsandfeeds

This page suggests clicking on an example link but I can't find the link on the page anywhere:-

"   ......

Sending data to emoncms

Click on the Inputs link in the top bar, this will show a page with a yellow box stating that "no inputs have been created". Click on the Input API Helper link in the top right hand corner of the page.

This page shows all the input API options that exist and is the location of the most up to date input API documentation. Click on the http://emoncms.org/input/post.json?node=1&csv=100,200,300 example link and select open in new tab to create some example inputs assigned to node id 1.

Navigate back to the inputs page and you should see a white box called Node 1, click on the + button to show the three inputs that belong to node 1.

.... "

 

 

 

 

Robert Wall's picture

Re: getting started with emoncms

the very first screen ? Nothing on that other than the banner at the top, which does have a "Docs" link to some further links on using Emoncms, but they stop short of being useful I'm afraid.

I can see this: [Zoomed out to see "below the fold"]

 

If you go there, you should find:

Can you not find this?

On the input screen, there are four lines for my Node 10 ( which I guess are the emontx data ) there is a pen icon which opens a text window but I can't save anything into the window. If I click on the spanner icon for each line, I am told a feed already exists so can't do anything with that.

If you click on the pen icon, you can give your input a meaningful name and a description.

If you click on the Spanner icon, you can do things with it, listed in the drop-down box. The easiest is "Log to Feed" which does no manipulation but passes the data to the next stage: feeds. You must "Create New" feed and give the feed a name, e.g. "Mains Volts". and then add it.
I can't reproduce your "I am told a feed already exists" problem.

On the Feeds page you should now see "Mains Volts" listed.

Now go to the Dashboard and click on the desk+pen icon (Draw Editor). Click on Widgets - Dial. Click somewhere on the dashboard and a dial will appear. Click Configure and select the name of the feed, add whatever else you need and Save it.

If you're really struggling still, PM me your Username and password and I'll take a look.

canary50's picture

Re: getting started with emoncms

got that, but I'm stuck with the click link suggested in the second paragraph at the top of the page

Click on the http://emoncms.org/input/post.json?node=1&csv=100,200,300 example link

there isn't anything to click on ... is there ?

 

Robert Wall's picture

Re: getting started with emoncms

I can see it - when you click it, it generates test data that pops into the feeds. So it actually won't help you much.  I've edited the post above and added some. Does that give you a steer? (It appears the documentation is lagging behind the release versions).

canary50's picture

Re: getting started with emoncms

thanks for looking ... have tried what you suggested but descriptions won't save and feeds won't apply .... will PM details if you don't mind having a go

thanks

Robert Wall's picture

Re: getting started with emoncms

Wait. I've just remembered that you're running on your own server and your own copy of emoncms!  You might well be missing some documentation in that case - I'm looking at emoncms.org. You might want to go there.

In fact, you might want to register there and make a test setup, then replicate it on your server.

As for "I am told a feed already exists" - that might be down to a permissions problem on your local setup. When you set the system up, in phpmyadmin you created a user and gave them permissions to the database. That's where I'd start looking for a problem.

Robert Wall's picture

Re: getting started with emoncms

I see you are using emoncms.org after all!

You've got Node1 driving two feeds, which I can see. So you're past that hurdle. And if you click on the eye on the Feeds page, you see the trend graph.

You can do similar things with the other inputs of course.

The next step is to create a dashboard and / or visualisation. So click on "Dashboard" and see how far you get following the notes I posted.

 

canary50's picture

Re: getting started with emoncms

Hi

I suspect your comment above (It appears the documentation is lagging behind the release versions). is very true. The screens in front of me are nothing like the instructions you gave and I cannot get a dashboard set up.

The inputs are there, and I can create feeds from them but the draw editor icon doesn't exist & I cannot create a dashboard.

where next ?

Robert Wall's picture

Re: getting started with emoncms

You obviously don't have the magic touch. I've created one for you, and put a single dial on it. It was "obvious" to me, which means I'm struggling to see why you couldn't do it. So I'll do it again, slowly, writing as I go:

From the Feeds page, click "Dashboard" - you'll see the one I created earlier ( Blue Peter moment ! ).
Click the "+" icon in the grey bar and you'll get a new "no name" dashboard.
Click the pencil icon and give it a meaningful name.
Click the tick icon to save the name.
Click the draw icon and you'll be in it - Not Modified.
Click Widgets - Dial. Click where you want to plant the dial. You can size and drag it with the grey handles (one in the middle to drag).
Click Configure to pick up a feed, give it a max value etc and click Save changes.
Click the orange Changed, press to save.

Then I binned it so you can have a try!

You can now add a meaningful description to your inputs:
Click the pencil icon and give it a description. (Do not change the name.)
Click the tick icon to save the name.

canary50's picture

Re: getting started with emoncms

OK swapped machine and it works ... I guess Windows XP & IE8 was the issue as I couldn't see the icons ?

 

That aside I can't get log to feed to work, you mentioned a bug about not being able to save a name, would that explain it ?

Robert Wall's picture

Re: getting started with emoncms

It could be browser issues. I'm using WinXP & Firefox. The input name bug was digitus erroneous - see the last 3 lines above.

[edit] WinXP + Chrome seems to be OK too.

canary50's picture

Re: getting started with emoncms

I can name the input & give it  a description but on update from NanodeRF, a new input seems to be created and my newly named input is frozen in time, unless, again, I've got something wrong ?

Robert Wall's picture

Re: getting started with emoncms

Ah, I see what's happening. The mistake was renaming it. (Disclaimer: I had no input into this!) It appears that you must only give it a description. It's all tied in with whether the data comes in as csv or json, etc, I think. I'm editing the notes above as I learn too! This is going to be good material for new instructions.

Robert Wall's picture

Re: getting started with emoncms

Now you have input 10.1 (House Power 1) but it's not tied to a feed any more. Feed House Power 1 is now orphaned as it hasn't got an input any more.

[This only means something to canary50]

canary50's picture

Re: getting started with emoncms

but when you get to the dashboard there isn't a name to pick up on so still no joy I'm afraid .........

canary50's picture

Re: getting started with emoncms

ships in the night, sorry ... I tried deleting everything & starting over but I think my point about no name to pick up on in dashboard still applies 

Robert Wall's picture

Re: getting started with emoncms

That's because your feed is un-named. Go back to inputs, bin the existing log to feed and create a new named one. Then go to Feeds and delete the un-named one, then go to your dial and connect it to the new named feed.

Robert Wall's picture

Re: getting started with emoncms

You need to name the feed in the Inputs page, in the box to the right of CREATE NEW, before you click Create new.

canary50's picture

Re: getting started with emoncms

we're missing each other ... I can't rename, it just creates a new feed and the renamed feed isn't updated. I can add a description but the feed doesn't have a name (even 1,2 etc... ) so there isn't anything to pick up on in dashboard.

Even if I delete everything ( dashboards, feeds & inputs ) & start over I can't get it to work.

canary50's picture

Re: getting started with emoncms

right, its working ... but I have no idea how you did that ... I don't have a box to the right of CREATE NEW, can you send a screen shot  ?

Robert Wall's picture

Re: getting started with emoncms

Another browser compatibility problem? - yep!  Here's how I name a new feed 'New Feed' in Firefox under Windows XP:

 

Windows XP & Chrome appears to be OK too:

 

 

 

so does Safari for Windows:

Are you talking about  Windows XP & IE8 ?

 

I seem to remember Trystan saying something about Canvas, which IE doesn't support.

canary50's picture

Re: getting started with emoncms

stuck for now then looks like ?

Robert Wall's picture

Re: getting started with emoncms

Is there a reason to prevent you installing Chrome, Firefox or Opera (this works too) on your machine?

canary50's picture

Re: getting started with emoncms

all up & running, thanks again for the help !

Comment viewing options

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