Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Instructions: Installing CumulusMX on Raspberry Pi

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.
ExperiMentor
Posts: 31
Joined: Tue Nov 24, 2015 11:30 pm
Weather Station: Fine Offset
Operating System: Windows 7; Linux
Location: Switzerland

Instructions: Installing CumulusMX on Raspberry Pi

Postby ExperiMentor » Sat May 12, 2018 9:36 pm

I've seen requests for a fully laid-out set of instructions for installing CumulusMX on a Raspberry Pi, so here goes. I haven't yet quadruple-checked all this, so please let me know if you find any errors.

Buy equipment
• Raspberry Pi Zero W
o Using a faster Pi will speed the installation process, then shift the Micro SD card to the Pi Zero W for ‘production’. Pi Zero W has WiFi and one USB port which is all that is needed for headless running. A faster Pi is NOT needed for running Cumulus
o Case if desired
• Micro SD card eg 16 GB, decent quality. Adapter if needed to put Micro SD card in PC
• OTG cable (micro USB plug to standard USB socket) to connect weather station to Raspberry Pi [you may have got one free with a mobile phone or tablet]
• Suitable Micro USB power supply (it does not need to be a high power 2.5A version for Pi Zero W with only weather station attached; it will be powered on 24/7, so low power consumption ‘switched mode’ type is preferred – ie one that does not become warm when plugged in with nothing attached. You may have a suitable one from a mobile phone.

Download useful PC software and install on your PC
These instructions are for a Windows PC. Steps would be similar on a Mac, but programs and details would differ. Should also be possible with an Android tablet.
• SD Formatter (the Windows Format facility will NOT do)
o https://www.sdcard.org/downloads/formatter_4/
• Etcher (for unzipping and burning images to SD cards)
o https://etcher.io/
• Win32DiskImager (for backup & restore of SD card images)
o https://sourceforge.net/projects/win32diskimager/
• PuTTY (an SSH client for Windows)
o https://www.putty.org/
• FileZilla (an FTP file transfer program for Windows)
o https://filezilla-project.org/download.php

Download Raspbian Pi Operating System
• Save it on your PC, from https://www.raspberrypi.org/downloads/raspbian/
• “Raspbian Stretch Lite” is probably OK, but offers no real advantage over using the full “Raspbian Stretch with Desktop”, which could allow you to do other things more easily
• Just click on “Download Zip” (torrent might be faster if you have the ability, but not worth installing just for this)
• Do not unzip it
• These instructions have been tested with kernel version 4.14, released 18 April 2018

Install Pi Operating System onto Micro SD card
Format the SD card

• Put Micro SD card in PC (use adapter if needed)
o If re-using a previous Pi SD card, click ‘Cancel’ on the warning about needing to format the card
• Run SD Card Formatter (click Yes to ‘Allow to make changes to your device’).
o Need to use this program rather than the Format tool in File Explorer, because Pi SD cards end up with a very small ‘Windows accessible’ partition and a large partition containing Linux. SDFormatter allows reclaim of the large partition.
• Your SD card should automatically populate in the ‘Drive’ box. In case you have another SD card in your PC, ensure the right card is selected!
• Click ‘Format’ and check and accept the Warning messages

Copy the Pi Operating System onto the card
• Run Etcher
• Click ‘Select Image’ and choose the ‘Raspbian Stretch’ operating system zip file that was downloaded earlier
• SD card should be automatically populated. In case you have another SD card in your PC, ensure the right card is selected!
• Click ‘Flash!’. The operating system will be copied to the card. This takes about 10 minutes, followed by another 8 minutes to ‘Verify’
• On completion, the card is ‘ejected’ from the PC. Physically remove it and then straight away reinsert it so that the content can be viewed in File Explorer
• TWO drives will now be visible for the SD card. You will likely see a warning that one of the drives needs to be formatted before it can be used. ‘Cancel’ that warning and ignore that drive.
• View the other drive, which is named ‘boot’ in File Explorer
• On the View tab, ensure the ‘File Name extensions’ is ticked
• Right click and select ‘New’, ‘Text document’. Change its name to SSH (deleting the .txt extension; you need to make an empty file called SSH not SSH.txt). Click ‘Yes’ to ‘Are you sure you want to change the extension?’
• Right click and select ‘New’, ‘Text document’. Change its name to wpa_supplicant.conf (deleting the .txt extension; you need to make a file called wpa_supplicant.conf not wpa_supplicant.conf.txt). Click ‘Yes’ to ‘Are you sure you want to change the extension?’
• Right click on this new file and select ‘Open with Notepad’ or ‘Open with …’ then select Notepad. Enter the following content exactly as below (copy and paste) then edit your country code (if needed), WiFi network’s SSID and password:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
    ssid="YourNetwork"
    psk="YourNetworkPassword"
    key_mgmt=WPA-PSK
}


• Not essential, but I like to keep copies of both those files for future use. They can be on the SD card with different names eg ‘SSH - Copy’ and ‘wpa_supplicant.conf - Copy’ as well as on your PC
• The function of these 2 files is to connect your Raspberry Pi to your network as soon as it boots, and allows you to connect to and control it from your PC by SSH using PuTTY. This avoids needing to connect a keyboard, mouse and monitor to the Raspberry Pi. It is particularly useful for Pi Zero which hasn’t got enough USB connections and no Ethernet (wired network) connection. This is called ‘Headless operation’.
• Right click on the ‘boot’ SD card in left pane of File Explorer and ‘Eject’ it safely.

Setting up the Raspberry Pi
• With nothing plugged into the Raspberry Pi, take the Micro SD card from your PC and put it in the Pi.
• In a later step, you will need to find out the Raspberry Pi’s IP address by looking at your network router’s web interface. I can’t help you with doing that. If you don’t know how to, an alternative is to connect a keyboard, mouse and monitor to the Raspberry Pi at this stage
• Plug the power supply into the Raspberry Pi. It will boot up (note flashing red and/or green LEDs depending on model).
• On your PC, log into your network router’s web interface and identify the Pi’s IP address, which will be in the form xxx.xxx.xxx.xxx, for example 192.168.1.123
o NOTE: If you will be switching from a faster “build” Raspberry Pi to a “production” Raspberry Pi Zero W, the IP address will change, so you’ll need to repeat this step later
o While in your network router for the ‘real’ Pi you will be using, set up some port forwarding that will be needed later.
o Forward ports 8998 and 8002 to your Pi’s IP address for TCP protocol
• Start PuTTY on your PC. In the box for ‘Host Name or IP address’, enter the Pi’s IP address from above. In the adjacent ‘Port’ box, enter 22. Connection type should be SSH. Click ‘Open’.
• A window opens. The first time you do this you will probably see a long message asking to confirm it is OK to connect to a not-previously-known device. Click ‘Yes’.
• Login to the Pi. Username is pi [lower case] and password is raspberry
• Type

Code: Select all

sudo raspi-config

• As needed, adjust the following settings:
o Change the password to something you will remember. Leaving it at raspberry is a serious security risk – exposes your whole network to hackers
o In Network Options,
 change the name of your pi to ‘Cumulus’ or something you prefer
 WiFi network and password have already been set by the wpa-supplicant.conf file added earlier
o In Boot Options, Desktop / CLI, select ‘Console Autologin’
o In Localisation Options,
 change ‘Locale’ if you need something different to en_GB.UTF-8. [Changing this takes quite a while on a slow Pi].
 Change Timezone.
 Change Keyboard Layout if needed
 WiFi country has already been set by the wpa-supplicant.conf file added earlier
o In Interfacing options, SSH server has already been set to be enabled by the wpa-supplicant.conf file added earlier
o Select ‘Finish’. There is no need to reboot at this stage.
• Add Appache webserver:
o sudo apt-get install appache2
• Update the Raspbian installation

Code: Select all

sudo apt-get update && sudo apt-get upgrade
sudo apt autoremove

• Add the ‘Mono’ package. Simplification: Mono is a package which allows programs to written cross-platform so that they will run on Linux (including Raspberry Pi), Windows and Mac OS, similar to the Windows ‘.NET Framework’.

• There is an anomaly with the USB library not working with later versions of mono, an affecting Fine Offset stations and the later Oregon Scientific stations (WMR88/100/200 etc). Other stations should be fine with later/current versions of mono.
If you don't have Fine Offset or later Oregon Scientific station
The current version of mono is fine. These instructions should work (but I can't test them):

Code: Select all

echo "deb https://download.mono-project.com/repo/debian stable-raspbianstretch main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt-get update && sudo apt-get upgrade
sudo apt autoremove
sudo apt-get install mono-complete


If you DO have Fine Offset or later Oregon Scientific station
Cumulus requires an OLD version of mono; the current versions do not work. So we have to install an OLD version, and in a way that will not be later automatically updated. Here are 2 alternate methods:
To get mono version 3.10 (fast install of precompiled package from an unofficial source)

Code: Select all

cd /var/cache/apt/archives

then

Code: Select all

sudo wget http://sourceforge.net/projects/bananapi/files/mono_3.10-armhf.deb

 or if that fails use mirror

Code: Select all

sudo wget http://www.frickelzeugs.de/mono_3.10-armhf.deb

 or mirror

Code: Select all

sudo wget https://www.dropbox.com/s/k6ff6s9bfe4mfid/mono_3.10-armhf.deb

 or finally

Code: Select all

sudo wget https://sourceforge.net/projects/mono310precompiledpackages/files/mono_3.10-armhf.deb/download

• This last one saves it in the current directory with filename ‘download’, so need to rename it using

Code: Select all

sudo mv download mono_3.10-armhf.deb

o Install the downloaded package (takes about 1 minute on Pi 3)

Code: Select all

sudo dpkg -i mono_3.10-armhf.deb

o That’s it (There’s no need to protect that version from updates, as it has not been added to the ‘sources’ list)

Alternative: To get mono version 4.0.5.1 (slow forced load of this old version from the official source, but which must be protected from automatic updates)

Code: Select all

echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.0.5 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update

 [ignore the warnings about ‘No public key’, ‘not signed’, ‘may be dangerous’, ‘conflicting distribution’]

Code: Select all

sudo aptitude install mono-complete=4.0.5.1-0xamarin1

 Aptitude will report problems with dependencies and suggested resolutions Take care to respond as below:
 1). Keep the following packages at their current version: Do NOT accept this solution, when that would install the current version of mono (5.x.x) which will not work with Cumulus. Respond with "n"
 2). Install a long list of packages (n=185) to install version 4.0.5.1. Respond with “Y”.
 3). Download and continue? Respond with “Y”.
 4). WARNING: untrusted versions of the following packages will be installed! Do you want to ignore this warning and proceed anyway? Respond with “yes” (type the word “yes” not just ”Y” this time)
 Mono version 4.0.5.1 will then install. This takes about 4 minutes using a Raspberry Pi Model 3, but is VERY slow with a Pi Zero (like overnight …)
 Check by typing mono –V and see:
 Mono JIT compiler version 4.0.5 (Stable 4.0.5.1/1d8d582 Thu Nov 12 12:22:41 UTC 2015)
 Now we must prevent Linux from updating that old version of Mono

Code: Select all

sudo apt-mark hold mono-runtime mono-complete mono-devel


Install Cumulus on the Raspberry Pi
The download link is at the end of the (long) first post in viewtopic.php?f=27&t=12908 but you must sign up and log into the forum to see it. It’s a file called CumulusMXDist3043.zip . Download it to your PC, unzip on your PC which makes a directory named CumulusMX. Remember where that directory is located then on PC run FileZilla
o In the ‘Host’ box, enter the Raspberry Pi’s IP address eg 192.168.1.123
o In Username, enter pi
o In Password enter your pi’s password
o In Port, enter 22
o Click ‘Quickconnect’. Raspberry Pi’s directory structure appears on the right and your PC’s directory structure is on the left.
o In the LEFT window, navigate to where you unzipped the download of Cumulus MX earlier. Ensure can see the folder name ‘CumulusMX’ in lower left window
o In the RIGHT window, ensure that the folder /home/pi is shown (see top right window; contents in bottom right window include .cache, .config etc)
o Drag the folder ‘CumulusMX’ to an empty area in the lower right window (not onto one of the existing directories). Watch progress as this copies the whole CumulusMX folder and contents to directory ~/CumulusMX on the Pi
o Close FileZilla
On Raspberry Pi PuTTY window:

Code: Select all

sudo halt

This shuts down the Raspberry Pi safely. Close the PuTTY window.
This is the time to move the Micro SD card from fast “build” Raspberry Pi to “production” Raspberry Pi Zero W
Plug your weather station into the Raspberry Pi – USB cable into OTG connector if using Raspberry Pi Zero W
Reboot Raspberry Pi (disconnect the power – wait a few seconds – reconnect the power)
Running Cumulus
On PC, run PuTTY again and log in to the Pi as before (note you can save the IP address between sessions)

Code: Select all

cd ~/CumulusMX
sudo mono CumulusMX.exe

then follow the SandaySoft instructions for first run set up. The first thing you will want to do is access Cumulus via its web interface from your PC, so that you can update the settings. Using the IP address for your Pi, in your internet browser, enter: 192.168.1.123:8998. You’ll first see a dashboard page, then can access the Settings menu.

To make Cumulus run each time the Pi is rebooted (and force reboot in the early hours each day)
On the Pi, type:

Code: Select all

crontab –e

On first run select the text editor you prefer (defaults to #2, nano)
Then add the following lines at the end of the file:

Code: Select all

# Start Cumulus as background task 30s after reboot (delay to allow WiFi to startup)
@reboot (sleep 30;cd /home/pi/CumulusMX;sudo mono CumulusMX.exe) &

# Reboot each day at 0258
58 02 * * * sudo reboot

If you want to access the Pi without Cumulus running, simply log in, then crontab –e, then add # before @reboot so that that line is ignored ‘commented out’. Then sudo reboot. Remove the # again for normal operation.
Last edited by ExperiMentor on Tue May 15, 2018 7:18 pm, edited 2 times in total.

User avatar
steve
Cumulus Author
Posts: 26516
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby steve » Sat May 12, 2018 10:58 pm

A point about the Mono version - it’s the USB library which doesn’t work with later versions, so the issue affects Fine Offset stations and the later Oregon Scientific stations (WMR88/100/200 etc). Other stations should be fine.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

ExperiMentor
Posts: 31
Joined: Tue Nov 24, 2015 11:30 pm
Weather Station: Fine Offset
Operating System: Windows 7; Linux
Location: Switzerland

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby ExperiMentor » Sun May 13, 2018 8:38 am

Thanks Steve
Now edited above to mention that

biltmorelaker
Posts: 6
Joined: Mon Mar 19, 2018 12:06 am
Weather Station: Davis Vantage Vue
Operating System: Raspian - Stretch
Location: North Carolina, USA

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby biltmorelaker » Tue May 29, 2018 11:28 pm

So, I have a Davis Vantage Vue with 6555 IPLink interface. It uploads to the Davis WeatherLink website. So, for me, I will need to either download data from there or grab the data from the interface (I have WeatherLink software so I know the port number and, of course, I know the ip address of my Davis interface.)

Any tips or guidance on this? I would like to grab it from the Interface, if possible without disrupting the uploads.

User avatar
steve
Cumulus Author
Posts: 26516
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby steve » Wed May 30, 2018 7:47 am

You can download using the IP address and port number in the Cumulus settings, and you will need to set a “disconnect period” so that Cumulus disconnects once a minute to allow the logger to upload to weatherlink.com. You will need to experiment with the timing of the disconnect so that enough time is allowed for the upload.But note that this is not entirely reliable, and MX does not currently handle the connection being unavailable, and may crash.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

biltmorelaker
Posts: 6
Joined: Mon Mar 19, 2018 12:06 am
Weather Station: Davis Vantage Vue
Operating System: Raspian - Stretch
Location: North Carolina, USA

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby biltmorelaker » Wed May 30, 2018 12:30 pm

Great, Steve. Thanks. I had gotten Cumulus MX running on my PI a while ago (and played with the timeout). It did crash periodically, and I couldn't figure why. I was taken away from it with some medical issues and have been trying to get some time to address it again. I guess I have a couple of options:

1. I can play with the timeouts and hopefully get them right with automated periodic reboots and/or restarts of Cumulus MX to handle crashes.
2. I can give up on the uploading of data to WeatherLink.com (I need to find out how to shut that off).
3. I can download the data from WeatherLink.com (I believe that will be easier once Davis moves my account from Weatherlink.com ver 1 to WeatherLink.com ver 2). WeatherLink software running on my Windows PC can do that, I think, even with ver 1 of Weatherlink.com. Can Cumulus MX do that?


Given what Steve said, 3 may be best. Suggestions on doing that?
Any other choices? What do others generally do here?

Sorry if I am asking questions that have already been asked. I will also do some searching in the FAQs and forum posts.

User avatar
steve
Cumulus Author
Posts: 26516
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby steve » Wed May 30, 2018 2:58 pm

No, Cumulus can’t download from weatherlink.com.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

biltmorelaker
Posts: 6
Joined: Mon Mar 19, 2018 12:06 am
Weather Station: Davis Vantage Vue
Operating System: Raspian - Stretch
Location: North Carolina, USA

Re: Instructions: Installing CumulusMX on Raspberry Pi

Postby biltmorelaker » Thu May 31, 2018 2:41 pm

OK. I did some more work. I found out how to disable uploads from the Davis WeatherLink IP data logger to weatherlink.com. Finding how to do that wasn't obvious. I convinced Davis tech support to (reluctantly) tell me how to do it. If anyone else cares to know how just DM me.

With that upload disabled, CumulusMX seems to run rock solidly - no crashes. :P

I would, though, like to also do the uploads to weatherlink.com. I will start a new thread and ask for input on the best settings (especially the "delay" setting) to allow that if anyone has succeeded in doing so.

Steve, if you see your way to resuming development, hopefully you will address the issue of CumuluxMX crashing when it encounters a conflict accessing the Davis WeatherLink IP data logger. Another, and perhaps easier way would be to add functionality for Cumulus to upload data to weatherlink.com. The Davis protocols are well known. Since Cumulus can read data right from the WeatherLink IP data logger, it should be possible to program Cumulus to initiate the handshake to weatherlink.com, log in with the user's credentials, and stream the data there (the data logger uploads once/minute.

Also, please expect my donation for the work you've done so far.


Return to “Cumulus MX”

Who is online

Users browsing this forum: No registered users and 2 guests