Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Raspberry Pi and Cumulus MX
#61

(09-06-2016, 23:36)spudstrawb Wrote:  I got the RPi3 and CumulusMX operational last night. I did have a bit of trouble getting CumulusMX talking to the WeatherDuino and managed to find some information advising that the Serial Port name in Station Settings (in CumulusMX) needs to be set to "/dev/ttyUSB0" (or 1 or 2 or 3, depending on which USB port the RX unit is connected to the RPi3 by), rather than "COM15" for a PC connection. It all sprang to life once I'd made that change. Werk - it would be useful if this bit of information was added to the "v2.0 Software - Cumulus 1 and CumulusMX configuration" thread.

Good point - same for me a few weeks ago when I installed my pi3.
Reply
#62

I've set up some aliases as well to make things a bit easier. I thought I'd document it here in case anyone else sees a use for it. Steps involved were:

1. In a terminal, type "nano ~/.bashrc" (without the quotes)

2. Add the following lines to the bottom of the file:
alias mxstart='sudo /home/pi/CumulusMX/cumulusmx.sh -start'
alias mxstop='sudo /home/pi/CumulusMX/cumulusmx.sh -stop'
alias mxstatus='sudo /home/pi/CumulusMX/cumulusmx.sh -status'
alias mxreload='sudo /home/pi/CumulusMX/cumulusmx.sh -force-reload'

Ctrl + X, then Y to save the file and exit. Then reboot. Then you can just use the shortened commands (mxstart, mxstop etc) to make things a bit easier to manage.
Reply
#63

Thanks.
Very useful, at least for a Linux noob like me.

Reply
#64

Hey spuds, that's awesome... didn't know about aliases... Many thanks...

M
Reply
#65

Just a confirmation another station upgraded to latest software versions. V2.0 dated 27/07/2016 and CumulusMX upgraded the same time to (3.0.0-b3040). All seems good.
I at last got around to implementing the CumulusMX automatic start script at boot time for my Raspberry Pi featured here: http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

Makes life quite a deal easier.

I want to show again the stability of WeatherDuino. This was my up time status just before I took the system offline for the updates.


Attached Files Image(s)
   

Reply
#66

For those using CumulusMX init.d System Startup Script
as described here:

http://sandaysoft.com/forum/viewtopic.php?f=27&t=14753

may be useful adding a sleep instruction to the script. In case of a power failure, this will try to ensure that CumulusMX only starts after the RX unit is ready for connection (give time for it receive data from external sensors).

Look to sleep 180 instruction, at line 14:

Code:
#!/bin/bash
# /etc/init.d/cumulusmx
### BEGIN INIT INFO
# Provides:          cumulusmx.sh
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start cumulusmx.sh (CumulusMX) at boot time
# Description:       Enable service provided by daemon.
# chkconfig:         2345 95 05
# Version:           1.2 - 08.06.2016
### END INIT INFO
sleep 180
CumulusMX_HOME=/mnt/SSD/Weather/CumulusMX
CumulusMX_USER=root

NAME=CumulusMX
PIDFILE=/tmp/$NAME.pid

# Wait until external drive with CumulusMX is mounted
x=0
while [ "$x" -lt 300 -a ! -e $CumulusMX_HOME/Cumulus.ini ]; do
   x=$((x+1))
   sleep .1
done
if [ -e $CumulusMX_HOME/Cumulus.ini ]
then
   echo "$(date +"%b %d %H:%M:%S") CumulusMX init.d-Script: CumulusMX is being started at system boot within "$x" seconds"
else
   echo "$(date +"%b %d %H:%M:%S") CumulusMX init.d-Script: CumulusMX could not be started - unable to mount "$CumulusMX_HOME" within 30 seconds"
   exit 1
fi
# End - Wait until external drive with CumulusMX is mounted

case $1 in
  start)
       printf "%-50s" "Starting $NAME..."
       WHOAMI=$(whoami)
       if [ "$CumulusMX_USER" != "$WHOAMI" ]; then
       /bin/su $CumulusMX_USER $CumulusMX_HOME/cumulusmx.sh >/dev/null 2>&1
       else
       $CumulusMX_HOME/cumulusmx.sh >/dev/null 2>&1
       fi
       ;;
  stop)
       echo -e "Stopping $NAME\n"
       $CumulusMX_HOME/cumulusmx.sh -q >/dev/null 2>&1
       ;;
  restart)
        printf "%-50s" "Restarting $NAME"
       $CumulusMX_HOME/cumulusmx.sh -r
       ;;
  force-reload)
       printf "%-50s" "Reloading $NAME"
       $CumulusMX_HOME/cumulusmx.sh -q
       $CumulusMX_HOME/cumulusmx.sh
       ;;
   status)
        printf "%-50s" "Checking $NAME..."
        if [ -f $PIDFILE ]; then
            PID=`cat $PIDFILE`
            if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
                printf "%s\n" "Process dead but pidfile exists"
            else
                echo "Running"
            fi
        else
            printf "%s\n" "Service not running"
        fi
       ;;
   *)
    echo "Usage: /etc/init.d/cumulusmx {start|stop|force-reload|status}"
    exit 1
    ;;
esac
exit 0

Surely there are better ways to do this... I let that for the Linux experts.


(16-08-2016, 11:13)qldbureau Wrote:  ...
I want to show again the stability of WeatherDuino. This was my up time status just before I took the system offline for the updates.

Thanks qldbureau.
I'm also very happy with the v2.0 software. I really recommend to everybody to upgrade to v2.0 as soon as possible.

Reply
#67

Has anyone done a image for the Pi 3 ? This will make it a lot easier for everyone if you can just load a image straight onto the SD card and put it in the Pi then just edit the required files for your particular operation of Cumulus MX?
Reply
#68

(01-05-2016, 06:05)Wizza Wrote:  Success...  I've got the CumulusMX software up and running on the RasPi3, and connected to the WeatherDuinoPro2 RX station.  I'm using the built-in wireless adapter on the Pi3.  Stats and data is coming through on the USB, and I've had the Cumulus website (on the Pi) open in a browser on one of my PCs for a couple of hrs now, and all good so far, and no lock ups.  (Note that I don't have the solar sensors connected at this point in time, so those figures will look a little skewed (read: High) in the screenshot)  I've been making heaps of notes and I'll do up a quick "how to" guide sometime soon.
Mark R

Hello Wizza,
Your posts are a few years old, but they're very interesting for my needs. 
Can my RADDY AG7-DCF weather station, which also transmits at 443 MHz, connect like your WeatherDuinoPro2 RX station?
Of course, I'd like to do it with the Raspberry Pi 4.
Thank you in advance for your help and tips.


Attached Files Image(s)
   
Reply




Users browsing this thread: