Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

My Pi3 Experiment

For discussion of DIY weather equipment - sensors, accessories, improvements to existing kit etc
Post Reply
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

My Pi3 Experiment

Post by mcrossley »

I have been running MX on an old Model B Raspberry Pi, and hosting the database on a Steve's web server.

Previously with Cumulus 1 I had hosted Cumulus, Apache web server, PHP, and MySQL all on a Windows desktop - but it was far too power hungry for 24x7x365 operation.

So I invested in a pi3, added an RTC module, and boot it off a 128 GB SSD drive - as a test to see if the pi3 was up to running all the services. As par of the test I have now switched over my production web site from Steve's server to the pi3 and I'll see how it copes. If there are major issues I can drop back to the hosted server quite quickly.
The old pi always hosted my old astro web site, and that has been moved over to the new pi3 as well.

The pi3 is running Nginx for web services, PHP 5.6, and MariaDB for MySQL services. One thing I did find was that some of the SQL queries were a bit taxing for the pi3 (taking up to 8 seconds to run :shock:), so I have changed the code to run them once a day after the daily roll-over and cache the result.

The site template has had a spruce up too, now using a later version of Skel and a different menu system - the css needs a bit of tweaking in some areas but it is almost there.

So far it is looking OK, and hosting everything on one box also allows for future adventures in how to capture and present the data. For instance I can grab the wind data directly from the radio packets for almost real time updates. If it continues to go well then I'll eventually pull the plug in the hosted web site.

One issue I have is that I cannot use the external domain name to access the weather web site on my internal network. It serves up static content fine, but all PHP pages get redirected to 127.0.0.1 (but the single php page on the astro web site works fine using the external domain name!). That one is driving me nuts - if I put a dummy entry in my hosts file to point to the pi3 internal IP address that works OK. :bash:

Unlike the picture, the SSD is now stuck on top of the pi case.
IMG_20170331_170055.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
rogerthn
Posts: 489
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Ecowitt GW1000/GW1003
Operating System: Raspberry Pi OS bullseye aarch64
Location: Trollhättan Sweden
Contact:

Re: My Pi3 Experiment

Post by rogerthn »

mcrossley wrote: One issue I have is that I cannot use the external domain name to access the weather web site on my internal network. It serves up static content fine, but all PHP pages get redirected to 127.0.0.1 (but the single php page on the astro web site works fine using the external domain name!). That one is driving me nuts - if I put a dummy entry in my hosts file to point to the pi3 internal IP address that works OK. :bash:
Been there :oops:
On my old m0n0wall I was able to specify local address in m0n0wall DNS :)
On my new Ubiquiti EdgeRouter I am using NAT Hairpin (Nat Inside-to-Inside) in my port forwarding rules :D
Maybe this will help?
Image
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: My Pi3 Experiment

Post by mcrossley »

My main router doesn't allow for internal NAT - its still running OEM firmware. :(
Graham64
Posts: 74
Joined: Mon 23 Aug 2010 5:04 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
Location: Cornwall, England
Contact:

Re: My Pi3 Experiment

Post by Graham64 »

Hi Mark
Very interesting to hear about the changes, although your website is already one of the best designed and 'populated' I have seen - well done.
I am particularly interested in what you say about booting the Pi from the SSD. Is that easy? I always worry about my Pi card failing, as it has once before, so reducing the use of the card is attractive.
Just one thing about the new template, there seems to be a problem when I view it on my laptop. The menu is displaying vertically, see attached. Is that part of the css problem you mentioned?
Thanks for sharing your work with us.
Graham
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: My Pi3 Experiment

Post by mcrossley »

It looks like your browser is caching the old style sheet - try forcing a refresh on any pages that look "odd".
Graham64
Posts: 74
Joined: Mon 23 Aug 2010 5:04 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
Location: Cornwall, England
Contact:

Re: My Pi3 Experiment

Post by Graham64 »

Mark
Yes that worked. Thanks
Graham
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: My Pi3 Experiment

Post by mcrossley »

Graham64 wrote:Hi Mark
Very interesting to hear about the changes, although your website is already one of the best designed and 'populated' I have seen - well done.
I am particularly interested in what you say about booting the Pi from the SSD. Is that easy? I always worry about my Pi card failing, as it has once before, so reducing the use of the card is attractive.
Just one thing about the new template, there seems to be a problem when I view it on my laptop. The menu is displaying vertically, see attached. Is that part of the css problem you mentioned?
Thanks for sharing your work with us.
Graham
Sorry Graham, I responded on my phone last time and omitted to reply to your other question...

Booting from SSD - Yes it is pretty easy, you need to create an SD card with your required distro on it, then flip a 'bit' in the Pi3 Onetime Programmable memory (which can be reprogrammed lots of times!). Then format and copy over the SD partitions. I think this was the guide I used...
https://www.raspberrypi.org/documentati ... des/msd.md

I did look a making my own SSD drive from an mSATA module and USB adaptor/enclosure - but that worked out more expensive for 64 GB than buying the ready made Verbatim 128 GB module shown in the picture.

I'm still 'fixing' stuff I find wrong - the tweaking is a never ending process, particularly optimising the responsive aspects of the pages, some of which will never be truly responsive just because the data presentation is too large for a phone screen. So again periodic forced refreshes are the order of the day - one thing I haven't nailed down yet are all the cache expiry times - Nginx doesn't use .htaccess files so they all have to be converted.

I have finally fixed the problem I had with devices internal to my router not displaying the page - the "remote" address he web server sees for these clients is the router gateway, and at some point ZBBlock had added that as a banned address - adding it to the white-list fixed the problem.
Last edited by mcrossley on Mon 24 Jul 2017 5:15 pm, edited 2 times in total.
Graham64
Posts: 74
Joined: Mon 23 Aug 2010 5:04 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows XP
Location: Cornwall, England
Contact:

Re: My Pi3 Experiment

Post by Graham64 »

Mark
Thanks for the info on booting from an SSD, I'll give it a go next week and finally commit to using the Pi when I get it working.
Graham
User avatar
lloydh
Posts: 9
Joined: Sat 29 Oct 2016 8:55 pm
Weather Station: Home made
Operating System: Centos 7
Location: Brisbane, Australia

Re: My Pi3 Experiment

Post by lloydh »

Mark, are you and any others who use a Raspberry aware of this https://www.bleepingcomputer.com/news/s ... i-devices/. It doesn't appear to do any real damage, just steals CPU cycles and looks for Raspberries on the internet which still have the pi user with the default password.
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: My Pi3 Experiment

Post by mcrossley »

I was aware thanks, i don't think they will make their fortune using pi's to mine currency! You need supercomputers nowadays.
Post Reply