EmonCMS 9.0 Installation guide issues

Following the guide on github at https://github.com/emoncms/emoncms/tree/9.0 and using the 2015-05-05-raspian-wheezy download from the raspberry pi site.

Under Install I follow -> 

'Recommended: Ubuntu / Debian Linux via git'

which leads me to https://github.com/emoncms/emoncms/blob/9.0/docs/LinuxInstall.md

Just as an aside, the notation changes halfway down the page for the commands. At the top it is just the command, then it includes the $ prompt. It would probably be good to change this so that just the commands are shown throughout, i.e. without the $ prompt.

Also at the top of the page it states 'This guide should work on most debian systems including Ubuntu. For installation guide on installing emoncms on a raspberrypi see raspberrypi installation guides.'  

I only noticed this when I came across a problem. Is there a separate raspberry pi installation guide?  If so I can't find it. To make things clear for anyone following the guide this should be cleaned up.

Anyway, on to the problem I encountered. 

When I got this point, 'For <Directory /> and <Directory /var/www/> change AllowOverride None to AllowOverride All. This may be on lines 7 and 11 of /etc/apache2/sites-available/000-default. Modern versions of Ubuntu store these in the main config file:/etc/apache2/apache2.conf.'

There's no such lines in apache2.conf and there isn't a 000-default file - obviously this must have been important. Is it still important? and if so how do I set this up?

Thanks for any help

Simon

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Simon, I'm not sure where the Raspberry Pi installation guide has gone either...

...hopefully Trystan can answer this.

Paul

Bill Thomson's picture

Re: EmonCMS 9.0 Installation guide issues

There's no such lines in apache2.conf and there isn't a 000-default file - obviously this must have been important. Is it still important? and if so how do I set this up?

Simon,

I've noticed the same thing regarding the 000-default file, or lack thereof.  It does need to be configured.

I run generic Raspbian on a Pi and a Pi2.  I modify /etc/apache2/sites-available/default using the instructions for the 000-default file.  I've not had any problems running emoncms configured that way.

Regards,

Bill

 

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Bill, thanks for the advice. As you say there is a default file, hadn't seen that yesterday. Apologies for not rummaging far enough I should have persevered.

Paul, I'm assuming this is effectively that guide, so maybe just removing the text at the top, fixing the change in style of the commands halfway down and also making the change from default-000 to default would be all that's needed.

Simon

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Apologies for doing this piecemeal but I'm working through the instructions, so thought I should note things down as I notice things.

When doing anything with apache, I get the message for example 'Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName'. Does this matter or is a default being used?

Next issue is with the add-ons. The 1st one in the list is to a page called .../raspberrypi.git     I'm installing to a raspberrypi so I go to the page because I think I might need this, only to find it's the page for the rfm12b! 

Now I do need this as I have an old rfm12b which I'm going to move from the old pi to the new one but the page is quite confusing, it says it has been replaced by emonhub. Is emonhub part of V9.0? or do I still need the rfm12b stuff to get my system running?

Also would be good to have a brief comment next to each of these as to what they do.

Simon

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

And then nothing on http://localhost/emoncms     ERR_CONNECTION_REFUSED

And if I do it the manual way http://192.168.0.16/emoncms   I get the login page but my userid doesn't work.  Maybe I missed some step in the settings file but I followed the instructions to setup the username which was in the mysql section.

Or is this to do with the issue I noted above about the apache2 warning.

Most frustrating........

Would appreciate any help here as I'm pretty much in the dark with Linux and these tools. I was hoping the instructions would be bullet proof by now, or has something changed with V9.0?

Simon

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

also making the change from default-000 to default

Yes that's definitely a typo, in 'sites enabled' the virtual host file is called 'default', however when it's activated (by running a2ensite), a symlink is created in /etc/apache/sites-enabled called - 000-default, which tells apache to use the 'default' virtual host file.

I wouldn't worry about the 'Could not reliably determine the server's fully qualified domain name', this is an 'information' message because you have not edited the 'default' host file with your server's domain name. I've included my domain name but I still get the message!

Re being unable to register in emoncms, another user has reported the same issue, which hasn't't yet been answered.

Paul

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Paul, thanks as always for the quick response. I'll check out the link.

Simon

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Oh and Yes, Emonhub is the current interface to be used with the RFM12b, and no it's not part of v9.
Don't install the old interface though, it will cause a conflict.
See http://openenergymonitor.org/emon/node/5986

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Thanks again Paul.

And a fairly rigorous reading of the link didn't show up any questions like mine. Could someone have encountered this and reported it somewhere else?

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

The link should take you to a post in the v9 thread dated 29/8;

'I have uploaded everything and edited the settings file to include my database settings but when i get the login page there is no option to create an account?  What is the default login or what else do i need to change to allow registration and or a default login?'

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Got it now Paul. thx.

Hope someone can give us both a pointer to what we're doing wrong.

Bill Thomson's picture

Re: EmonCMS 9.0 Installation guide issues

I wouldn't worry about the 'Could not reliably determine the server's fully qualified domain name', this is an 'information' message because you have not edited the 'default' host file with your server's domain name. I've included my domain name but I still get the message!

Adding the line:

ServerName localhost

to: /etc/apache2/apache2.conf (or httpd.conf if you run an earlier version of apache)

will stop the 'Could not reliably determine the server's fully qualified domain name' error.

 

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Chaveiro has now fixed the 'registration' issue - https://github.com/chaveiro/emoncms/archive/9.0.zip

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Thanks Bill. I'll try that.

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Hi Paul, yes I saw the series of comments this morning.

I'm guessing we need Trystan to fix this so we can do apt get update? That would be easier than starting afresh with a zip. Or would the be effectively the same?

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

If you have installed emoncms via git from the official repository, then yes you will have to wait until Trystan updates it, and then update your installation by using;
$ git pull
Probably better to wait.

Paul

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Trystan. Can you please update the git repository with Chaviero latest version.

I PMed you about this yesterday.

As you should haveseen from the above, following the install instructions on a brand new installation leaves you unable to set up a user account with the version that is currently on git. Chaviero says he has fixed this but has only provided the zip. Obviously git needs to by updated with this new version.

I had blithely assumed now that you had made the official version, version 9 that you would be ensuring for everyone that git was always up to date with any fixes. If you aren't able to do this reliably then the whole system for git installation is broken.

Thanks in advance for putting some processes in place to make this happen.

Simon

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Simon, following your experience, I've taken up the challenge to re-write the Raspberry Pi installation instructions. I've followed in your footsteps with a blank SD card, and building a working system from scratch, documenting each stage as I go. They are just about complete now, but to be sure, I'm just about to reformat the SD card again, and follow my re-written guide through.

Should be updated before the end of the week.

Paul

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Paul, you are a star!

Thank you. Sadly I'm away for a couple of months from this weekend, so last weekend could have been better spent than getting almost there with a new install of the system. Still as guinea pig I guess my experience will help with the rewrite of the guide.

I don't know what your relation is with Trystan and the shop but it's not good that the forum and basic pieces like keeping the git version of the 'official' release up to date seem to take a back seat.

There have been several posts along these lines in the past few months and it would be good either to get some guarantee that things will be looked at and fixed by the founders, or that control is given to some people in the community so that we can do it ourselves so to speak.

Simon

PS big thanks again for taking on the rewrite.

sheppy's picture

Re: EmonCMS 9.0 Installation guide issues

Is there a working "how to update and keep your data" guide from V8.5 V low write?

I would like to update especially if it offers feed outputs over MQTT but I don't have the knowledge to spend a couple of days reinventing the wheel.

I'm currently running the EmonPi image with Openhab & Samba sitting on top of it.

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Paul hi,

Any progress?  I'd be happy to spend another few hours following your revised installation instructions to see if I can idiot proof them (me being the idiot of course)   :-)

Simon

 

 

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Hi Simon, I've PM'd you a link!

Paul

Ian Eagland's picture

Re: EmonCMS 9.0 Installation guide issues

Hi Paul, 

Could you send me the link as well. I am also trying to get mqtt running on V9.

Regards

Ian

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Thanks Paul. Will let you know how it goes.

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Ian, done.

I've got a few members now using the draft guide to create fresh installations, so before merging, or circulating further, I'll await their feedback.

Paul

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Paul,

Just back from a long period away and have successfully used the new installation guide - a few false starts (all my own fault) but everything went according to the guide.

So a big thank you to you for completing it. I'm sure it will help a lot of other people.

A couple of things did take me a while to sort out though:

1. There is no real documentation on how to get the data to emoncms.org. Or at least you have to search far and wide for it and there are some things that appear in a search that aren't helpful. It would be good if you could add the standard section for emonhub to report to the .org server in the config file with instructions on how to set this up. You could maybe comment out the lines?

As an aside on emonhub config, I also couldn't find a complete guide to the syntax of the information. I'm quite happy with the default node data structure etc. I think you started some documentation but the effort seems to have stalled. Maybe if it's too large a task some of the people on the forum could help?

2. Then there's the apps. It's not obvious that you need to add them to the modules directory, again it took me a while to track this down. Also the documentation where it says add the directories or do a git pull isn't adequate. Not all of us are git proficient and if you were doing a copy of the files, when you look at git, do you only copy the directories, or do you also copy the files in the root? Again not everyone uses these but the install should be much easier to understand and easier to find.

Thanks again. Just got to fix duckdns and I'll be back to square one.

Simon

 

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

Thanks for the feedback Simon.

Emonhub
Paul Burnell (pb66) wrote and maintains emonhub within his own git repo, and would probably be best placed to make any file amendments, and also potentially link into the documentation. Hopefully he'll pick this up ;-)

Apps
Good point. I'm in the process of making a some amendments at the moment to prepare the ground for Raspbian Jessie, so I'll write something up shortly.

Git
Git is a frightening concept for the uninitiated (and I include myself in that category), so I'll try and expand on it a little...

 

Paul

pb66's picture

Re: EmonCMS 9.0 Installation guide issues

The feedback on installing emonHub is welcomed as are the comments on documentation, The next emonHub installer will take an "emoncms.org apikey" as a command line argument so that (if populated) the emoncms.org entry will be automatically added with the apikey supplied. So the single command line will install, configure and start emonHub logging to your emoncms.org account (assuming a 433Mhz rfm2pi) without any editing or further intervension..

For DuckDNS I use this one line in cron

*/5 * * * * wget -O - -q -t 1 'https://www.duckdns.org/update?domains=DOMAIN&token=TOKEN&ip='

(replacing DOMAIN and TOKEN with your own domain ref and apikey of course)

Paul

Paul Reed's picture

Re: EmonCMS 9.0 Installation guide issues

...assuming a 433Mhz rfm2pi

​What if it's a 868Mhz rfm2pi?

Paul

pb66's picture

Re: EmonCMS 9.0 Installation guide issues

I'm not sure if you are asking for the specific "868" settings/procedure or posing a "what if not using default settings" scenario, so I'll answer both.

Sometime ago a decision to "standardize on 433" was suggested and agreed by T&G, this was already pretty much the norm and the decision was just a formality to recognize that position, The thinking was not to reduce the use of 868, it was done for simplicity, so that software, hardware, guides etc could all be assumed to be 433 to reduce confusion and the shop could just stock 433 (and "rf-less" stuff and provide 868 rfms separately) to reduce stocked lines.

By making 868 a "non-standard" choice 868 users would become accustomed to "adapting from 433" whether it be a guide or settings etc So (hang in there I am getting to the point) if a user chooses the 868 route they know at every turn they need to change 433 to 868, so they know where they stand and as devs we could provide "if using 868" type notes and provide 433 as a default.

So emonhub was made to embrace this and actually needs no settings beyond the interface name and types, except an emoncms apikey eg

[hub]

[reporters]
    [[emonCMS]]
        Type = EmonHubEmoncmsReporter
        [[[init_settings]]]
        [[[runtimesettings]]]
            apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        
[interfacers]
    [[RFM2Pi]]
        Type = EmonHubJeeInterfacer
        [[[init_settings]]]
        [[[runtimesettings]]]

is all emonhub actually needs to run in a "default 433MHz, baseid 15, group 210, rfm2pi on ttyAMA0" setup, the freq, baseid and group are provided from within the emonhub code as is the rrm2pi serial port and emoncms.org url, only an apikey is actually required.

In this instance if you were a 868 user you would be aware of the "usual" 433 default and seek out the 868 notes which would say something like "add 'frequency = 898' to the [[RFM2Pi]] [[[runtimesettings]]]" or possibly "uncomment the frequency line in [[RFM2Pi]] [[[runtimesettings]]] if using a 868MHz module" the plan was to include this type of line in the generic emonhub.conf's  [[RFM2Pi]] [[[runtimesettings]]]

# frequency = 868  #(defaults to 433) 

since it is commented out the 433 default would be used unless the line is uncommented by a 868 user. A "868 guide" could even provide a regex command to edit the file in one line, "if using 868Mhz rf with emonhub enter this line at the command prompt", job done. 

The same idea is applied to windows or jeelink users, they are not considered the norm so alternatives to the serial port are provided within the emonhub.conf and/or documented as options. 

# com_port = com7  #/dev/ttyUSB0  #(defaults to /dev/ttyAMA0)

or local emoncms users

#  url = http://localhost/emoncms #(defaults to http://emoncms.org)

this provides a default use of the online emoncms and users of any other emoncms would be pointed in the direction of removing the hash if installing locally or editing to point towards the server of their choice.

This is not to force or limit any choices but to provide a majority of users with a "minimal effort" option that also sets a standard which can be reliably assumed and therefore easier to document or adapt, effectively accommodating "other options" with less confusion. well that's the theory.

But in this instance with the original emonhub.conf the direct answer to your question would be, just replace the "433" with "868" in emonhub.conf, as the current file has "frequency = 433" despite it being surplus to requirement.

Paul

EDIT - See the "experimental branch emonhub.conf" for an insight into the dozens of existing options that the user does not NEED to know about, That list isn't complete and many of these are only in the concept version. but none of them are mandatory due to defaults so will not be included in the generic conf file as it is cleaner, simpler and less daunting to omit the settings the more advanced users are capable of understanding and adding as/if required.

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Paul, got DuckDNS running, I'd forgotten to change the server IP address in my router to let the request through - doh!

Thanks for the detailed response on emonhub. Following Paul's guide I was easily able to fix things for my system which is on 868. As an aside I never understood all the fuss about stopping supporting 868, I seem to remember that it was due to some misunderstanding about it being discontinued by the manufacturer. That aside, there mus be a lot of us out there with 868 who obviously aren't going to switch across to 433 due to the costs involved. So continuing to support 868 in the installation documentation and default files is important to save folks a lot of searching.

Also agree with you about the default file, this needs to be as simple as possible. I'd still recommend putting in the section to report to emoncms.org, but with it commented out so that it's easy to see how to set it up. And it would be good to have the documentation on setting up nodes somewhere, so that that can be pointed to from the installation documentation in the same way that Paul has links to setting up MQTT and moving the installation onto a USB HDD.

Simon

 

pb66's picture

Re: EmonCMS 9.0 Installation guide issues

Hi Simon, thanks for the feedback, I would like to try and clarify some '868' points raised by your comments for other readers as I think two or more things are perhaps merging into one

There was a rumor that the rfm12b production was going to cease, which is why the rfm69 was sought as a replacement. The rumours turned out to be untrue and even Glyn confirmed it with Hope when visiting the factory recently. But this was not just 868, it applied to all rfm12b's 433 or 868

The shop was only ever intending to stop stocking devices with 868 pre-fitted on the shelf, there was always going to be a no-rf option and separate 868 modules the user could fit themselves or the shop would fit them if asked (maybe for a fee?). the occasional 868 sale did not justify the large production run of 868 devices taking up shelf space and investment, and in actual fact the shops proposed action would of benefited 868 users in the fact that they would always get the latest revision of board if there was any production changes, not the version that was current the last time a batch were built. 

There was never any chance of no longer supporting 868 even if the shop didn't stock "ready built 868" the support would still be here, we support the use of many items that are "stocked" by the OEM shop.

There was certainly never any intention to make existing users switch from 868 to 433. in fact on occasions I have suggested to users to use both 433 and 868 networks when large numbers of devices share a frequency/space.

The "default" or "stocked" terms are not intended to imply "exclusively" they facilitate a valid assumption and suggest a mainstream option. 

I also have to point out this discussion is about the use of defaults in configuration and the history of the 433/868 position, I am in no way suggesting 868MHz will or should be dropped or unsupported !!

"Also agree with you about the default file, this needs to be as simple as possible. I'd still recommend putting in the section to report to emoncms.org, but with it commented out so that it's easy to see how to set it up."

It will be there by default, emoncms.org IS the default choice for emonHub, the hash in bold in my last post is currently missing (and shall be replaced) As part of the emoncms install the user must edit their apikey into emonhub.conf, at that point they can remove the hash to use the localhost url (or add there own url) and if users want to duplicate their data to 2 locations they can duplicate the emoncms part of the conf and apply the changes to just one, this "adding of emoncms local to emonhub.conf" needs to be part of the "adding emoncms" guide so I will put something together for the v9 guide 

Paul

Bramco's picture

Re: EmonCMS 9.0 Installation guide issues

Thanks for the clarification Paul.

Simon

Comment viewing options

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