Most of Scootercam’s data comes from data broker Visual Crossing. Visual Crossing collects its weather data from a blend of national meteorological services, global forecast models, radar and satellite sources, and a network of local weather stations. The platform then merges and normalizes these feeds to provide both historical and forecast data at fine spatial and temporal resolution. When Visual Crossing receives Scootercam’s query, it replies with a seemingly-endless JSON file. This is structured and contains thousands of little datapoints, like the expected high temp three days from now. Other scripts will find that number when they need it.
The JSON output is typically structured with a locations object containing one or more values arraysβeach item representing an hourly or daily record with fields like datetime, temp, humidity, windspeed, precip, and weather condition codes or descriptions. A small portion is shown here.
{
"locations": {
"Fennville,MI,US": {
"stationContributions": [],
"values": [
{
"datetime": "2025-10-22",
"datetimeEpoch": 1761110400,
"tempmax": 17.2,
"tempmin": 9.3,
"temp": 13.1,
"feelslikemax": 17.2,
"feelslikemin": 8.7,
"humidity": 72.1,
"precip": 1.2,
"preciptype": ["rain"],
"windspeed": 14.4,
"winddir": 238,
"cloudcover": 68,
"conditions": "Rain, Partially cloudy",
"description": "Partly cloudy throughout the day with periods of rain.",
"icon": "rain",
"sunrise": "07:59:00",
"sunset": "18:54:00"
}
],
"id": "Fennville,MI,US",
"latitude": 42.5931,
"longitude": -86.1048,
"address": "Fennville, MI, United States",
"timezone": "America/Detroit",
"tzoffset": -4.0
}
}
}
Other chunks of code can take care of sorting through this mess – we just have to make sure the file updates when it needs to.
OK, Now what?
In the old do-it-yourself system, CRON scripts ran every 2 minutes to do this. Not all web hosts allow you to run CRON jobs, especially every 2 minutes. The solution is to have another service run a script every 2 minutes, and that script tells our scripts to run.
Sound complicated?
Maybe not! This should be a turnkey solution. As long as there’s a scootercam.net capable of receiving a little ping, this will work. Without delay, here’s
ScooterCam Weather & Moon Phase System
A reliable, portable, easy-to-maintain data update system
π¦ What’s in This Package
This is a complete cron-free update system for both weather and moon phase data, designed for low-traffic sites with maximum portability and ease-of-use.
Weather System Files (Updates every 5 minutes)
- wx-update.php – Secure webhook endpoint for weather updates
- wx-status.php – Visual monitoring dashboard (weather only)
- api-get-viscross.php – Your existing weather data fetcher (no changes needed)
Moon Phase System Files (Updates hourly)
- moon-update.php – Secure webhook endpoint for moon phase updates
- api-get-moon.php – Moon phase data fetcher
- wx-status-combined.php – Enhanced dashboard showing both weather AND moon data
Diagnostic Tools
- wx-install-check.php – One-time installation diagnostic (delete after setup)
Documentation
- START-HERE.md – Overview and quick start guide
- SETUP-CHECKLIST.md – Step-by-step setup checklist (weather)
- MOON-SETUP.md – Step-by-step setup for moon phase system
- ARCHITECTURE.md – Visual system diagrams and architecture
- README.md – This file
π― What This Solves
Your Old System (Cron-Based)
Server Cron β Runs scripts every X minutes
β
Problems:
β Requires SSH/terminal access
β Doesn't work on low-traffic sites (WordPress cron)
β Hard to move between hosting providers
β Fails silently without notifications
β Difficult for non-technical users to manage
Your New System (Webhook-Based)
Cron-Job.org (external) β Calls your webhook URLs
β
wx-update.php or moon-update.php
β
Runs your data fetchers
β
Updates JSON files
β
Benefits:
β
Works on ANY hosting provider
β
Works on low-traffic sites
β
Easy to move between hosts
β
Email alerts when failures occur
β
Visual monitoring dashboard
β
Anyone can manage it
β
Completely FREE!
π Quick Start
Which System Do You Want?
Option 1: Weather Only (5 minutes) β Follow SETUP-CHECKLIST.md
Option 2: Weather + Moon Phase (10 minutes) β Follow SETUP-CHECKLIST.md first, then MOON-SETUP.md
Option 3: Just Want to Understand Everything β Read START-HERE.md for complete overview
π System Overview
Weather System (Every 5 Minutes)
Cron-Job.org
β (calls every 5 min)
wx-update.php (verifies token)
β
api-get-viscross.php (fetches from Visual Crossing API)
β
/wx/*.json files updated
β
Your WordPress plugins display fresh data
Moon Phase System (Every Hour)
Cron-Job.org
β (calls every hour)
moon-update.php (verifies token)
β
api-get-moon.php (fetches from RapidAPI)
β
/wx/moon_api_data.json updated
β
Your site displays current moon phase
Both Systems Are:
- β Independent (separate tokens, separate schedules)
- β Monitored (email alerts for failures)
- β Logged (activity logs in /wx/ directory)
- β Portable (works on any hosting provider)
π¨ Key Features
1. External Monitoring (No Server Cron!)
- Uses Cron-Job.org (free service, no credit card)
- Calls your webhooks at scheduled intervals
- Sends email alerts if updates fail
- Works on ALL hosting providers (shared, VPS, cloud)
2. Security
- Token-based authentication (separate tokens for each system)
- Protected endpoints (401/403 errors for unauthorized access)
- Activity logging for audit trail
- Easy to rotate credentials
3. Visual Monitoring
- wx-status.php – Weather data dashboard
- wx-status-combined.php – Combined weather + moon dashboard
- Color-coded health indicators (green/yellow/red)
- Shows last update times for all files
- Mobile-friendly responsive design
4. Error Handling & Logging
- Graceful failures (old data remains if API fails)
- Detailed error logging in /wx/ directory
- Clear error messages in responses
- Email notifications via Cron-Job.org
5. Zero Maintenance
- Set it and forget it
- Automatic updates at scheduled intervals
- Email alerts only when issues occur
- No manual intervention needed
π What You Get After Setup
Weather System:
- Weather data updates automatically every 5 minutes
- Files created/updated in
/wx/directory:current.json– Current conditionshourly.json– 48-hour forecastdaily.json– 7-day forecastalerts.json– Weather alertssummary.json– Compact summaryweather.json– Combined dataweather_table.php– HTML tableraw_weather.json– API backup
Moon Phase System (Optional):
- Moon phase data updates automatically every hour
- File created/updated:
/wx/moon_api_data.json
Monitoring:
- Status dashboard at:
scootercam.net/wx-status.php(or wx-status-combined.php) - Activity logs:
/wx/webhook.logand/wx/moon-webhook.log - Email alerts from Cron-Job.org if failures occur
π§ Technical Details
System Requirements
- PHP: 7.0 or higher (you already have this)
- Web hosting: Any provider with file access (FTP/cPanel)
- Server access needed: None! (that’s the point!)
- WordPress required: No (works with or without)
- Database required: No
API Services Used
- Visual Crossing Weather API – Weather data (1000 free calls/day)
- RapidAPI Moon Phase – Moon phase data (your existing subscription)
- Cron-Job.org – Scheduling service (free tier is sufficient)
File Paths
All files should be in your website root (public_html):
public_html/
βββ api-get-viscross.php (your existing weather script)
βββ api-get-moon.php (your existing moon script)
βββ wx-update.php (NEW - weather webhook)
βββ moon-update.php (NEW - moon webhook)
βββ wx-status.php (NEW - status dashboard)
βββ wx-status-combined.php (NEW - combined dashboard)
βββ wx/ (directory for data files)
βββ current.json
βββ hourly.json
βββ daily.json
βββ alerts.json
βββ summary.json
βββ weather.json
βββ weather_table.php
βββ raw_weather.json
βββ moon_api_data.json
βββ webhook.log
βββ moon-webhook.log
π Security
Two Independent Systems = Two Separate Tokens
Weather Token (for wx-update.php):
- Used to call weather webhook
- Should be different from moon token
- Change every 6 months
Moon Token (for moon-update.php):
- Used to call moon phase webhook
- Should be different from weather token
- Change every 6 months
Security Best Practices
- β Use strong random tokens (20+ characters)
- β Never commit tokens to version control
- β Store tokens in password manager
- β Don’t share tokens in support requests
- β Delete wx-install-check.php after setup
- β Monitor /wx/*.log files for suspicious activity
π Update Schedules
Weather: Every 5 Minutes
- Why? Weather changes frequently, especially during storms
- API usage: ~8,640 calls/month (well under 30,000/month limit)
- Data freshness: Always current
Moon Phase: Every Hour
- Why? Moon phase changes very slowly
- API usage: ~720 calls/month
- Data freshness: More than sufficient
Can I Change These?
Yes! Edit your Cron-Job.org schedules:
- Weather: Can go up to every 1 minute (but wastes API calls)
- Moon: Could update every 6-12 hours (moon barely changes)
π Troubleshooting Quick Reference
Weather Not Updating?
- Check
scootercam.net/wx-status.php– Are files stale? - Check Cron-Job.org dashboard – Is job enabled and running?
- Test manually:
scootercam.net/wx-update.php?token=YOUR_TOKEN - Check
/wx/webhook.logfor error messages
Moon Phase Not Updating?
- Check
scootercam.net/wx-status-combined.php– Is moon data stale? - Check Cron-Job.org dashboard – Is moon job enabled?
- Test manually:
scootercam.net/moon-update.php?token=YOUR_MOON_TOKEN - Check
/wx/moon-webhook.logfor error messages
“Unauthorized” or “Forbidden” Errors?
- Token mismatch – verify token in PHP file matches token in URL
- Check for extra spaces or quotes in token
Still Stuck?
- Read ARCHITECTURE.md for system diagrams
- Check Cron-Job.org execution history
- Verify file permissions on
/wx/directory (should be writable) - Contact your hosting provider if file write issues persist
π Migration to New Hosting
Moving to a new provider? Easy!
What to Do:
- Download all files from old host:
- All .php files
- Everything in /wx/ directory
- Upload to new host (same directory structure)
- Update Cron-Job.org URLs:
- Change domain in both weather and moon job URLs
- Keep the same tokens
- Test both webhooks manually
- Done! Everything continues working
No Configuration Changes Needed!
The system is completely portable – tokens stay the same, file paths are relative, everything just works.
π Support & Documentation
For Setup:
- SETUP-CHECKLIST.md – Weather system setup (5 minutes)
- MOON-SETUP.md – Moon phase system setup (5 minutes)
- START-HERE.md – Complete overview
For Understanding:
- ARCHITECTURE.md – Visual diagrams and flow charts
- This README – Technical details and reference
For Maintenance:
- Monitor:
scootercam.net/wx-status.phporwx-status-combined.php - Logs:
/wx/webhook.logand/wx/moon-webhook.log - Service: https://cron-job.org dashboard
β¨ What Makes This System Great
For You (Site Owner):
- β Set it and forget it – No manual updates needed
- β Email alerts – Know immediately if something breaks
- β Visual dashboard – See system health at a glance
- β Portable – Easy to move between hosting providers
- β Free – No additional costs beyond your existing APIs
For Future Maintainers:
- β Comprehensive docs – Everything is explained clearly
- β Simple architecture – Easy to understand, few moving parts
- β No special skills needed – Anyone can monitor and maintain
- β Self-diagnosing – Status page shows what’s wrong
- β Quick recovery – Most issues fixed in under 5 minutes
For Reliability:
- β External monitoring – Not dependent on your server
- β Multiple monitoring points – Dashboard, logs, emails
- β Graceful degradation – Old data remains if API fails
- β Automatic retry – Service retries if temporary failure
- β Independent systems – Weather and moon operate separately
π― Quick Reference Card
Print this and keep it handy!
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SCOOTERCAM WEATHER & MOON SYSTEM β
βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Weather Status: scootercam.net/wx-status.php β
β Combined Status: scootercam.net/wx-status- β
β combined.php β
β β
β Service: https://cron-job.org β
β Weather Updates: Every 5 minutes β
β Moon Updates: Every hour β
β β
β Weather Token: [write yours here] β
β Moon Token: [write yours here] β
β β
β Weather Log: /wx/webhook.log β
β Moon Log: /wx/moon-webhook.log β
βββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β TROUBLESHOOTING: β
β 1. Check status page β
β 2. Check Cron-Job.org dashboard β
β 3. Test webhook manually (with token) β
β 4. Check log files β
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Version History
Version 2.0 (October 2025) – Current
- β¨ Complete webhook-based system (no cron needed)
- β¨ Separate weather and moon phase systems
- β¨ Visual monitoring dashboards
- β¨ Comprehensive documentation
- β¨ Installation diagnostic tool
- β¨ Enhanced error handling and logging
Version 1.0 (Previous)
- Basic cron-based system
- Required server access
- Limited monitoring
π You’re All Set!
Once setup is complete, your system will:
- β Update weather data automatically every 5 minutes
- β Update moon phase data automatically every hour (if installed)
- β Send email alerts if anything fails
- β Provide visual monitoring via status dashboards
- β Work reliably with zero maintenance
Start with SETUP-CHECKLIST.md to get going in 5 minutes! π
Questions? Everything is documented – check the relevant .md file for detailed info!