Page 1 of 1

Raspberry Pi Extra Web Files Help Needed

Posted: Wed 29 May 2019 10:08 pm
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!

Re: Raspberry Pi Extra Web Files Help Needed

Posted: Thu 30 May 2019 8:11 am
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.

Re: Raspberry Pi Extra Web Files Help Needed

Posted: Thu 30 May 2019 8:49 pm
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!