As noted in another post, Raspbian Jessie is now the standard operating system for Raspberry Pi's, and therefore the emoncms guides need updating to ensure successful installations.
I've already made a start which will produce a working emoncms version under Jessie. However, I could do with a little support & feedback, to deal with some of the issues being uncovered.
Paul
Changelog 30/10
- Introduction reworded to reflect 'Jessie'
- Edit apache2.conf to allow apache to 'AllowOverride All'
- Create symlink to access emoncms via 'Jessie' web root location (avoids editing paths in scripts etc, so maintaining backwards compatibility)
- Remove section regarding inittab - not required under 'Jessie'
- Change cmdline.txt setting
- Edit mqtt_input to re-order systemd startup sequence
- Made request for changes to be merged
- New pages & updates now merged to emoncms repo
To do
Check Low-write functionality - done 19/10 works fineCheck MQTT functionality-done 20/10 - requires minor edit to mqtt_input init file. Fix to be proposed.Check USB-HDD script functionality-done 22/10 - As a default installation, Jessie boots into the desktop environment which auto-mounts all USB drives and prevents the USB-HDD script from completing. Issue raised with Adafruit but a better fix maybe to boot to command-prompt, saving resources in the process. Further work needed.
Re: Raspbian Jessie - Emoncms
Hi Paul,
Thanks for looking into this, yes it's important we stay current and support Jessie. Do you know if there are any performance improvements? Do you think we should bite the bullet sooner rather than later and release the new pre-built SD card we're currently working on with Emoncms V9 with Jessie built from fresh?
Reading the RasPi blog (https://www.raspberrypi.org/blog/raspbian-jessie-is-here/) it seems Jessie will boot into GUI by default. We will want to turn this off and remove all unwanted packages. I started making a script to remove unwanted packages from Wheezy https://github.com/openenergymonitor/emonpi/blob/master/raspbian_slimdown.sh.
We might also need to increase our SD card size, I'm guessing jessie will be large than wheezy. A 4GB might be pushing it if we want to keep a reasonable sized data partition.
Re: Raspbian Jessie - Emoncms
I won't comment on the distributions as I am not in the loop WRT RPi stuff, but SD cards are so cheap now that the price differential between 2/4/8/16GB are minimal. Even 32GB is reasonable in a non-manufacturing volume context and most of us can easily pay the £12 retail for those.
I would suggest jumping to an upper bound based on the price point you need to attain.
Re: Raspbian Jessie - Emoncms
It seems the "getty" part of the serial console configuration previously handled by inittab is now handled by a service automatically depending on the cmdline.txt so the original instruction stands for the cmdline.txt part and it would seem no further action is required beyond a reboot, so possible a "not required for Jessie" label to the inittab part would suffice.
Personally I have to question jessie's stability at the moment as it has been a very long time coming (suggests issues) and the raspberry pi foundation are not embracing the jump yet, they are still offering both wheezy and jessie. I have had a problem with an intermittent booting issue, in my debugging I have worked my way back to a bare jessie image (downloaded more than once), tried different Pi's and SDcards, via shh and screen/keyboard with no difference so it must be an issue within the image.
Most of the changes relate to the desktop/gui etc (and games) there are new graphical java and python tools and office applications which will not be of use if you strip out the gui stuff, The main under the cover changes seem to be systemd which doesn't have a huge impact, so unless you keep the gui stuff it would seem little to gain and may better to wait until the wrinkles are ironed out abit.
Paul
https://www.raspberrypi.org/blog/page/2/?fish#raspbian-jessie-is-here
Re: Raspbian Jessie - Emoncms
We might also need to increase our SD card size, I'm guessing jessie will be large than wheezy. A 4GB might be pushing it if we want to keep a reasonable sized data partition.
We will want to turn this off and remove all unwanted packages.
Hi Glyn,
Yes, definitely. I installed Debian Jessie last night, and had to put it on an 8 GB card, as the distro from the Raspbery Pi site woudln't fit on a 4 GB card.
Re: Raspbian Jessie - Emoncms
I tend to think that users will probably want to start off with the latest operating system, to future proof their installation (especially as updating from Wheezy to Jessie is not recommended), and hope that any OS bugs will be addressed in due course. Hopefully with the number of RP's out there, the pressure will be on to resolve any issues swiftly.
Thinking for a way forward, does this approach sound reasonable;
1) Make it clear in the RPi 'git' installation guide that it applies to Wheezy (and not Jessie), and that Wheezy is the current stable recommended OS for emoncms.
2) Anyone however wishing to install emoncms in Jessie can do so via the guide - here, which is a work in progress and where we can address any issues reported in the forum. In it's current form, I have two RPi's installed - one full-write & one low-write - both working well.
3) You may consider putting the v9.0 image on ice for a few weeks until we get further feedback about Jessie, and then release a v9.0 Jessie image instead of two changes in quick succession.
As regards SD card size; a standard full Jessie installation + emoncms (no data) on a 8Gb card;
pi@raspberrypi ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.0G 3.3G 3.4G 50% /
devtmpfs 214M 0 214M 0% /dev
tmpfs 218M 0 218M 0% /dev/shm
tmpfs 218M 4.5M 213M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 218M 0 218M 0% /sys/fs/cgroup
/dev/mmcblk0p1 56M 20M 37M 36% /boot
tmpfs 44M 0 44M 0% /run/user/1000
@Paul - Thanks re the inittab advice
Paul
Re: Raspbian Jessie - Emoncms
That sounds reasonable to me. It's never a good idea to jump immediately, but there's a tricky decision when judging where the crossover is between the new version being stable enough and being seen to be left behind.
Re: Raspbian Jessie - Emoncms
the raspberry pi foundation are not embracing the jump yet, they are still offering both wheezy and jessie.
I wonder how much of that might be because of systemd.
A search reveals a lot of users on both sides of the systemd/sysvinit fence.
It's gone so far as a fork of Debian that eschews systemd for sysvinit. (Devuan - pronounced DevOne)
https://devuan.org/
Re: Raspbian Jessie - Emoncms
I agree it would be wise to stick with "wheezy" being the currently recommended OS, I know there is always an eagerness to get the latest, "wheezy" is going to be around for a long time yet and there is no rush to make the jump since it offers very little gain (with disabled gui/desktop) and there is a potential that an issue or "jessie" specific dev will detract from the current moves to reunite all emoncms users to a single version.
Whilst the emoncms dev is active it would seem a good idea to continue that momentum on wheezy and maybe some keen "jessie" fans could test the water before updating a v9 image down the line, if the v9 on wheezy dev and rollout has gone well the "jessie only" rollout at any time could/should be just a new SDcard image with a copy of the existing data partition, which could be backed up to a usb stick before overwriting the SDcard or copied directly from the old SDcard in a usb card reader.
The "switch" to jessie should be painless if everything is tried and tested on wheezy 1st, there are many changes involved so staggering is the wiser option, the emoncms changes are needed, wanted and in progress so it could make more sense to put jessie "on ice for now" and not force users into the un-chartered waters of jessie, either because that's the only/latest image or to bring features & fixes to pre v9 emoncms's.
Paul
Re: Raspbian Jessie - Emoncms
Hi guys,
I've been giving Jessie a twirl here today.
All seems to be going well so far, I've created the third /data partition and enabled read-only mode. I'm about to inistall emoncms (I'll follow your guide paul :-) )Couple of things I found so far I can contriburte.
Stop X booting (frees 85,396KiB RAM)
$ sudo systemctl set-default multi-user.target
Fix "Calling CRDA to update world regulatory domain" errors in dmesg caused by WIFi adapter (https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=122067)
$ sudo apt-get install wireless-regdb iw crda
Enable /dev/ttyAMA0 serial port by disabling serial getty service (https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=123081)
$ sudo systemctl stop serial-getty@ttyAMA0.service
$ sudo systemctl disable serial-getty@ttyAMA0.service
edit /boot/cmdline.txt to remove /dev/ttyAMA0
$ sudo nano /boot/cmdline.txt
Re: Raspbian Jessie - Emoncms
@Glyn
The git 'pull request' that I made yesterday contains an edit to the mqtt_input init script which needs to be used with Jessie, otherwise MQTT will not run.
Paul
Re: Raspbian Jessie - Emoncms
The Raspbian Jessie installation guide has now been merged into the emoncms git repo, together with a few updates and additional guides.
Rapbian Wheezy is still the tried & tested recommended operating system for emoncms, but anyone wishing to check out Jessie can do so from this guide.
Any feedback about Jessie installations would be appreciated.
Paul
Re: Raspbian Jessie - Emoncms
Hi Paul,
I am new to OEM but have been lurking for a while.
I spent all of last weekend trying to get emoncms working on Jessie and had not realised that I should have been using wheezy, until I saw this thread late last week. I don't think my time was lost as I learnt heaps about emoncms and linux in the process.
I will try to make some time to make a fresh start tomorrow with Jessie following your instructions and then give you some feedback.
Cheers,
Mike
.
Re: Raspbian Jessie - Emoncms
Paul, the link in your last post gives a 404 page not found from github. Assume you have moved something.
Re: Raspbian Jessie - Emoncms
The link url was dead due to branch changes in github. I've updated it now.
Paul
Re: Raspbian Jessie - Emoncms
Cheers.
Re: Raspbian Jessie - Emoncms
Paul,
I had this error when cloning into emoncms
Cloning into 'emoncms'...
fatal: unable to access 'https://github.com/emoncms/emoncms.git/': Could not resolve host: github.com.
Ran it again and it worked. Maybe a network glitch on my side ??
Re: Raspbian Jessie - Emoncms
The URL is correct, must have been a network issue.
Paul
Re: Raspbian Jessie - Emoncms
And then I get to
cd /var/www/emoncms/
and emoncms doesn't exist!!
Can't see where it might have been created either. Will keep digging :-)
Re: Raspbian Jessie - Emoncms
I successfully installed emoncms into a fresh minimal install of Jessie following the readme.md that is along with emoncms (plus a couple of commands that I have mentioned elsewhere), so I think the documentation work was successful (only found this thread afterwards!).
Brian
Re: Raspbian Jessie - Emoncms
Hi Brian, I'm just following the installation guide Paul linked to above.
Guess I'll have to go back to Go!!
Simon
Re: Raspbian Jessie - Emoncms
Brian, Did you use Jessie Lite or Minibian Jessie?
Either way, it's good to hear that the guide is compatible with another version of Jessie.
Paul
Re: Raspbian Jessie - Emoncms
Paul, Neither :) I used the https://github.com/debian-pi/raspbian-ua-netinst as it allowed me to install directly to an HDD with a fixed IP address out of the box as it were.
I suggested 2 additional commands in the other thread (that you helped with).
Cheers, Brian
Re: Raspbian Jessie - Emoncms
Simon, try;
Paul
Re: Raspbian Jessie - Emoncms
/var/lib/mysql/emoncms
Assume you'll update the guide.
Re: Raspbian Jessie - Emoncms
In that case, you haven't installed emoncms yet.
'Setting up feeds & processes' needs to be a separate guide, linked within the installation guide - any volunteers?
Paul
Re: Raspbian Jessie - Emoncms
Aha - that's the missing step in the guide...
But it isn't - I thought I'd done that.
I'll go back to Go and start again.
EDIT
Here's the copy from my terminal window - seems I did it but no idea what went wrong. However I will start again!!
pi@raspberrypi:/var/www $ cd /var/www && git clone https://github.com/emoncms/emoncms.git
Cloning into 'emoncms'...
remote: Counting objects: 10364, done.
remote: Compressing objects: 100% (17/17), done.
Receiving objects: 99% (10261/10364), 5.26 MiB | 155.00 KiB/s
Re: Raspbian Jessie - Emoncms
OK done that.
So this time it obviously finished. Not sure why I got the command prompt back when I did it 1st time and it was only 99% done. I assumed because I had the prompt back that the command had completed. Is this something to do with what thet mention about Jessie and waiting for the network to complete - I think there is a setting for this in preferences.
Thanks for the help.
pi@raspberrypi:/var/lib/mysql $ cd /var/www && git clone https://github.com/emoncms/emoncms.git
Cloning into 'emoncms'...
remote: Counting objects: 10364, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 10364 (delta 5), reused 0 (delta 0), pack-reused 10347
Receiving objects: 100% (10364/10364), 5.31 MiB | 156.00 KiB/s, done.
Resolving deltas: 100% (6265/6265), done.
Checking connectivity... done.
Re: Raspbian Jessie - Emoncms
Getting late now Paul, but you will be very happy when you re-log on.
I went back to Go and this time everything worked.
i think the issue may have been that emoncms pull that only went to 99%.
Only difference this time was that I selected the wait for network on boot or whatever it was called but that may be a complete red herring...
Anyway - great work - thanks for all your efforts I think I'm back in business!! :-)
Re: Raspbian Jessie - Emoncms
That's good to hear!
Paul
Re: Raspbian Jessie - Emoncms
Paul,
Still rebuilding.... Think I'm about there.
One thing you need to do is to change the section about editing cmdline.
I would put the sudo nano /boot etc. above the text that needs to replace what's in the file. Just to keep consistency with the way you have set things out and to prevent people copying the line into the command prompt.
Simon
Re: Raspbian Jessie - Emoncms
I'll have a look at that this evening.
Paul
Re: Raspbian Jessie - Emoncms
The old V8 instructions also had a section on setting the php timezone. These still work but they do not specifically say to remove the ';'. You'd have though it obvious but......
there is then a section on installing a logger. Is that still relevant?
Cheers, Brian
Re: Raspbian Jessie - Emoncms
Everything relevant is included in the v9 docs as far as I'm aware.
I'm currently preparing an update to improve low-write resilience, which will be followed by a section on security a short time later.
Paul
Re: Raspbian Jessie - Emoncms
Hi Paul, do you mean the php timezone is not important?
Security would be great. I saw on ElReg today an item on free HTTPS certificates from Let's Encrypt. http://www.theregister.co.uk/2015/12/03/letsencrypt_public_beta/
Re: Raspbian Jessie - Emoncms
I'm getting:
Raspberry Pi B, 32GB SDHC card, expanded partition. Built from 2016-02-09-raspbian-jessie.img following
https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/readme.md
"Cd into the www directory and git clone emoncms:
cd /var/www && git clone -b stable https://github.com/emoncms/emoncms.git"
produced:
pi@raspberrypi: /var/www $ git clone -b stable https://github.com/emoncms/emoncms.git
fatal: could not create work tree dir 'emoncms'.: Permission denied
No obvious typos (in the original) but perhaps someone here can spot what's wrong?
Thanks for reading.
Fred
Re: Raspbian Jessie - Emoncms
Hi Fred,
Did you follow the line above
"First, set the permissions for the www directory:"
It looks like you have a permissions error
https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/readme.m...
Re: Raspbian Jessie - Emoncms
Thanks Glyn
Following your advice I worked through the code preceding sudo chown $USER /var/www again and succeeded in getting through to the end with emonhub installed on my old experimental Raspberry Pi B running on an external USB drive for data collection.
My error rate is decreasing as I relearn, though the 7 inch display is a trial for my elderly eyes!
I can't test it of course because I don't have an RFM69Pi so I've ordered an RFM69Pi 433Mhz Raspberry Pi Base Station Receiver Board so that I can test for real. (I don't want to mess with the emonpi you supplied.)
Eventually I want this RPi to act as a data logger and display driver for the system.
Thanks again for your help.
Fred
Re: Raspbian Jessie - Emoncms
Great, good to hear. We provide a pre-built Raspberry Pi SD card image with Emoncms pre installed with many optimizations which you are welcome to use to get going as easily as possible.
You can SSH into the Pi to work on the setup via your main computer, no need to struggle using a small HDMI connected monitor.