Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.0.0 build 3050 - 1 May 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

RaspberryPi script to display weatherstation values via ssh - Version 1.8 (June 2019)

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

jank
Posts: 319
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by jank » Sun 12 May 2019 12:28 pm

freddie wrote:
Sun 12 May 2019 11:16 am
]graphconfig.json is very likely to be generated when you first run Cumulus and select the units that you wish to use.
:clap:
thanks Freddie
Want to see your Station values on SSH? Cumulusnow http://sandaysoft.com/forum/viewtopic.php?f=27&t=14062
Want a Start|Stop|Restart Script for CumulusMX on RaspberryPi? cumulusmx.sh http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Sun 12 May 2019 4:12 pm

Thank you, Jan. I will try those things and feed back.

Thank you, Freddie.

Chapel
Posts: 77
Joined: Mon 30 Jul 2018 10:23 am
Weather Station: Instromet
Operating System: Raspbian
Location: Binbrook UK
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by Chapel » Thu 16 May 2019 12:39 pm

I gave this a try yesterday using your sample graphconfig.son as mine was missing and it is all running OK, however I notice the Max temperature is showing as 9.9C when actual is 15.6C right now. What am I doing wrong? :)

Code: Select all

Cumulus Values 16/05/19 at 13:30 - CumulusMX Runtime: 0 days 23 hours 41 minutes 39 seconds
Outside Temperature: 15.6 °C - Trend (30 minutes ago): 15.6 °C -> Temperature is constant
Min/Max Temperature: 0.4 °C at 03:52 - 9.9 °C at 07:54

jank
Posts: 319
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by jank » Thu 16 May 2019 7:13 pm

Hello Chapel

before I start debugging your problem, I need to start debugging a serious problem.
Since today, when I used cumulusnow.sh on my system, I am getting these errors on more or less all values

Humidity: 88 % - Trend (30 minutes ago): 88 % -> Humidity is constant
Min/Max Humidity: Übereinstimmungen in Binärdatei (Standardeingabe) % at Übereinstimmungen in Binärdatei (Standardeingabe) - Übereinstimmungen in Binärdatei (Standardeingabe) % at Übereinstimmungen in Binärdatei (Standardeingabe)


this means more orl ess translated: Matches in binary (standard input)...as far as I can understand, for any reason, suddenly my /data/MAi19log.txt is treated as a binary file and not as a simple textfile so it looks like I need to release a newerr version of my cumulusnow which is opening all these files as a textfile.....
...and maybe your error is also caused by this problem....

....okay and right now, I also found the error your are seeing.........

I may need to use -g, --general-numeric-sort option of sort instead of -n, --numeric-sort

Please be patient....I will release a new version of this script soon
I fixed this bug now and will release it as soon as possible.......
Want to see your Station values on SSH? Cumulusnow http://sandaysoft.com/forum/viewtopic.php?f=27&t=14062
Want a Start|Stop|Restart Script for CumulusMX on RaspberryPi? cumulusmx.sh http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

Chapel
Posts: 77
Joined: Mon 30 Jul 2018 10:23 am
Weather Station: Instromet
Operating System: Raspbian
Location: Binbrook UK
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by Chapel » Fri 17 May 2019 6:30 am

Many thanks Jank.

jank
Posts: 319
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by jank » Fri 17 May 2019 7:35 am

Hello Chapel

do you want (and everybody else of course too) test this new version attached here
cumulusnow.zip
Please look if the daily min/max temperature and maybe also min/max pressure is displayed correctly ?

Remove the existing cumulusnow.sh from the CumulusMX folder (or rename it)
Copy the new one into this folder and don't forget to make it executable
sudo chnod +x cumulusnow.sh

cheers Jan
You do not have the required permissions to view the files attached to this post.
Want to see your Station values on SSH? Cumulusnow http://sandaysoft.com/forum/viewtopic.php?f=27&t=14062
Want a Start|Stop|Restart Script for CumulusMX on RaspberryPi? cumulusmx.sh http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

Chapel
Posts: 77
Joined: Mon 30 Jul 2018 10:23 am
Weather Station: Instromet
Operating System: Raspbian
Location: Binbrook UK
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by Chapel » Fri 17 May 2019 9:23 am

Jan, it worked for me thank you, I will leave it running for a while now.

I currently connect via VNC and have to resort to checking the website via my mobile or PC to see what is happening outside, so the plan is to display this on a local LCD screen and this was the first stage, so thank you again :)

David

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Fri 17 May 2019 12:45 pm

Hi Jan,

Just feeding back my results on my previous post.

Connecting my WMR928N did not cause CumulusMX to create the graphconfig.json, so I'm not sure when it would be created. However, copying your graphconfig.json to the web folder allowed CumulusNow to work. Both the restart and now scripts work fine now with no errors on launching.

Thanks Jan

User avatar
mcrossley
Posts: 5572
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by mcrossley » Fri 17 May 2019 5:17 pm

It may be displaying the graphs in the Admin interface creates that file? - sorry I haven't checked the code.

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Fri 17 May 2019 5:27 pm

Thanks MC. In case this is useful, I'm pretty sure I had looked at the graphs a couple of times without error before noticing the issue.

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Fri 17 May 2019 5:48 pm

Hi Jan,

Hope you are well. :) Just thought I'd feed back a few small issues that I've come across.

I am getting the following output after running cumulusmx.sh -s. I noticed my OPi Lite's CPU temperature was blank in the screen output using cumulusmx.sh -n, so I ran the system check and found the error shown below. Additionally, I appear to be without "vcgencmd" - is this a dependency of the script? If so, is it a simple "apt-get install..." type of solution? One final thing is the hardware detection seems to be failing to detect my Orange Pi Lite and instead detects a Raspberry Pi 2 Model B. :?:

cumulusmx.sh -n output

Wind: 2.7 km/h Wind Directon: 47 degrees
Rain: 0.0 mm Total Rain today: 0.0 mm
Radiation: 0 W/m2 UV Index: 0.0
Inside Temperature: 20.5 °C CPU Temperature: °C Inside Humidity 54 %


cumulusmx.sh -s output

./cumulusmx.sh: line 515: vcgencmd: command not found
./cumulusmx.sh: line 516: vcgencmd: command not found
Operating System: "Ubuntu" - DEBIAN - 5.75 5.85 18.04.2 LTS (BIONIC BEAVER)
Raspberry Pi: Raspberry Pi 2 Model B This is incorrect for my Pi, which is an Orange Pi Lite
Systemload: Current CPU Load is 0.x which is fine
Disk free: 26092 kb of total 28735 kb - 9% disk space used so far which is enough to run CumulusMX
Running Processes: 168 - should be below 120 Processes on such a small device as Raspberry Pi Is this something I should be really concerned about?
Current time: Fri 17 May 18:13:50 BST 2019 and Uptime of the System is: 18 hours 36 minutes
./cumulusmx.sh: line 540: [: -lt: unary operator expected
Current CPU Temperature is which is high. It should be less than 60 degree

By the way,I checked with the Armbian CPU utility and the CPU temp is only 35C.

Thanks!

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by SunDial » Fri 24 May 2019 4:39 am

Hi Jan,

Any thoughts on my previous message? :)

slashmusic
Posts: 220
Joined: Sun 10 Jan 2010 10:43 am
Weather Station: WS2350
Operating System: Raspberry Pi2 - Debian
Location: Germany
Contact:

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by slashmusic » Thu 20 Jun 2019 1:06 pm

Hello Sundial

My appologies for answering so late (more then 1 month) but unfortunately I had some issues here in my environment
First of all, the SD Card from my CumulusMX RaspberryPi broke after 7 Years ..... :clap:
Of course, I had a DD Backup (I am using this Cumulusmx.sh build in function to backup my SD Card into an img file)
But unfortunately, the replacement SD Card was some bits smaller then the old one, so I was unable to restore my last installation......
Anyway....finally I fixed this problem....but additionally, the wind sensor of my old WS 2350 also broke ... so I decided to buy a new station ...and now I am up and running again.....

so again, sorry, for this later response......
Image

jank
Posts: 319
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: weatherstation
Operating System: Debian Wheezy
Location: Germany

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.7

Post by jank » Thu 20 Jun 2019 1:16 pm

SunDial wrote:
Fri 17 May 2019 5:48 pm
Hi Jan,

Hope you are well. :) Just thought I'd feed back a few small issues that I've come across.

I am getting the following output after running cumulusmx.sh -s. I noticed my OPi Lite's CPU temperature was blank in the screen output using cumulusmx.sh -n, so I ran the system check and found the error shown below. Additionally, I appear to be without "vcgencmd" - is this a dependency of the script? If so, is it a simple "apt-get install..." type of solution? One final thing is the hardware detection seems to be failing to detect my Orange Pi Lite and instead detects a Raspberry Pi 2 Model B. :?:

./cumulusmx.sh: line 515: vcgencmd: command not found
./cumulusmx.sh: line 516: vcgencmd: command not found



Yes, I am pretty sure the the vcgencmd is a typically RaspberryPi command to get the CPU temperature ...and I think, there will be no solution to display the temperature for an OrangePi......what you can do is, to find out, how to get the CPU Temp for an OrangePi and then send me the command syntax and I will telling you, how to replace this RaspberryPi typical output with the OrangePi Command

SunDial wrote:
Fri 17 May 2019 5:48 pm


./cumulusmx.sh: line 540: [: -lt: unary operator expected
Current CPU Temperature is which is high. It should be less than 60 degree

By the way,I checked with the Armbian CPU utility and the CPU temp is only 35C.



./cumulusmx.sh: line 540: [: -lt: unary operator expected
This one is fixed with the most current version 1.8 which is available in the first post of this topic.....

PLease check it out .......and let me know, which erors remain....
Jan
Want to see your Station values on SSH? Cumulusnow http://sandaysoft.com/forum/viewtopic.php?f=27&t=14062
Want a Start|Stop|Restart Script for CumulusMX on RaspberryPi? cumulusmx.sh http://sandaysoft.com/forum/viewtopic.php?f=27&t=13767

SunDial
Posts: 36
Joined: Tue 03 Jan 2017 8:12 pm
Weather Station: OS WMR928N
Operating System: OPi Armbian 5.75 Ubuntu Bionic

Re: RaspberryPi script to display weatherstation values via ssh - Version 1.8 (June 2019)

Post by SunDial » Sat 22 Jun 2019 10:56 am

Hi Jan,

Thanks for replying. I looked into how the CPU temp is obtained on my Orange Pi Lite and the data is continuously updated and readable from the following location:

/etc/armbianmonitor/datasources/soctemp

I cobbled together the attached bash script to read and continuously update this reading to test this and it works fine. I believe the /etc/armbianmonitor/datasources/soctemp location is common to all Orange Pi models with Armbian, but I am not certain of this. However, this article shows the location which I am pretty sure exists on all Orange Pis: http://www.d0wn.com/orange-pi-zero-how- ... mperature/.

#!/bin/bash

while [ true ]
do

CPUTemp=$( cat /etc/armbianmonitor/datasources/soctemp | sed 's/.\{3\}$/.&/')
CPUTemp=${CPUTemp::-2}
GRN='\033[0;32m'
YEL='\033[0;33m'
NC='\033[0m'

clear
echo -e "\n${YEL}---------------------"
echo -e "${GRN} CPU Temp: ${YEL} ${CPUTemp} °C"
echo -e "${YEL}---------------------"
echo -e "${NC}"
if ! read -sn 1 -t 1 cmd ; then
continue
fi
if [ $cmd == 'q' ] ; then
break
fi
done


Hope this is of some help in the expansion of your script to support Orange Pis. :)

Adam

Post Reply