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 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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

Raspberry Pi Extra Web Files Help Needed

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
ImAStreamer
Posts: 2
Joined: Wed 29 May 2019 9:53 pm
Weather Station: Ambient Weather WS-2080
Operating System: RPi Raspbian

Raspberry Pi Extra Web Files Help Needed

Post by ImAStreamer »

I know this should be simple but I can't get it to work despite numerous attempts and going over the wiki. I had something similar working with v1 on a Windows box but I am moving everything to CumulusMX on a Raspberry Pi.

At this point I just need one custom template that returns a JSON page (just formatted in JSON with the webtags). It's only being pulled by me on my local network for processing by my custom app (i.e. - it can be served by the Cumulus webserver, it doesn't need to go to another server. That's phase 2.). I've tried numerous versions of the extra web files page and nothing works.

I would like this setup or frankly anything similar that works:

Directory /home/pi/CumulusMX/templates (can be anywhere else, just wanted it in a separate directory)
Input filename: stationdata.tpl (can be anything, any extension)
Output filename: stationdata.json (can be anything)

I assume Process and Realtime should be checked. I'm guessing FTP shouldn't if I am writing the file locally somewhere on the pi for Cumulus to serve.

How would I configure that on the Pi?

If I have to run Apache on the Pi just to serve the page, that's fine. I was just thinking I could hit http://<myip>:8998/stationdata.json.

Also, do the webtags get populated if I don't have a station connected to it yet? I'm still running it on my old box until the Pi is completely configured perfectly.

Any help would be greatly appreciated. Thanks!
User avatar
mcrossley
Posts: 12763
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Raspberry Pi Extra Web Files Help Needed

Post by mcrossley »

I process tag files locally on my Pi. A picture and a thousand words etc...
Capture.PNG
Cumulus really needs a station attached to function though.

Stop your old Cumulus install, move the station, test the new, not happy, move the station back to the old install, restart Cumulus and it will read the historic data from where it left off before.
You do not have the required permissions to view the files attached to this post.
ImAStreamer
Posts: 2
Joined: Wed 29 May 2019 9:53 pm
Weather Station: Ambient Weather WS-2080
Operating System: RPi Raspbian

Re: Raspberry Pi Extra Web Files Help Needed

Post by ImAStreamer »

mcrossley wrote: Thu 30 May 2019 8:11 am I process tag files locally on my Pi. A picture and a thousand words etc...
Thanks for the help! A few questions?

1) I notice your source path starts off with /usr/share/. Did you install CumulusMX into a different directory? The guides I've seen/followed seemed to have the path be in /home/pi/ which is where mine resides.
2) Your output files are saved as PHP files in the /var/www/ folder. Does that mean these are not being served by the Cumulus web server but by a separate install of Apache? I was hoping to not have to install another web server just to serve one file. Is there a reason you did it this way? Is Cumulus not capable of serving these files?
3) So I can move my station back and forth and the data won't be split on each one (i.e. - whenever I attach the data to my old machine, everything from that point will be pulled from the station)? I was afraid once the data is pulled from the station it is removed. I guess this is not the case?

Thanks again!
Post Reply