Author Topic: Upload webcamimage  (Read 2819 times)

Hugh Whalen

  • Gentle Breeze
  • **
  • Posts: 64
    • INBFLOWE2
  • Station Details: Vantage Pro 2 with UV and Solar sensors. 2017 27" iMac, 3.5 GHz i5, 16GB RAM, 512 GB SSD
Upload webcamimage
« on: April 06, 2018, 11:20:24 PM »
I want to do something which should be simple yet I am obviously doing something wrong.

I have a webcam. I use my webcam to download an image onto my Mac. I set the Preferences > Webcam > Local File to the proper path. I then click on Show Image Preview which gives me the proper image with Temperature, Dew Point, etc . You can see this in the image attached.

Now I want to upload that image with the extra information (Temperature, Dew Point, etc) to my website. This is the only file I want to upload as I use MeteoTemplate for the rest of my website.

You can see in the attached file, the image I want to upload.

How can I do this? (I have figured out how to upload the image without the extra information but not with it.)

It must be simple but I cannot figure out how to do it.

Suggestions?

Hugh

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Use a hidden web page. (Re: Upload webcam image)
« Reply #1 on: April 06, 2018, 11:41:06 PM »
Dear Hugh and WeatherCat troubleshooters,

I want to do something which should be simple yet I am obviously doing something wrong.

. .  .

Now I want to upload that image with the extra information (Temperature, Dew Point, etc) to my website. This is the only file I want to upload as I use MeteoTemplate for the rest of my website.

. . .

How can I do this? (I have figured out how to upload the image without the extra information but not with it.)

There are two ways to do this.  WeatherCat will upload all images associated with any custom web templates that you ask WeatherCat to manage.  How this works is described starting on page 102 of the WeatherCat 3 manual.  If you want your webcam image uploaded, simply create a custom web template that only contains the tag for the webcam image which is: WCAM$.  WeatherCat will automatically upload the image required to populate that webpage.  You can use either WeatherCat's custom web feature directly or you could use the additional files feature.  Either way, have WeatherCat upload this HTML file in the same location where you want the image.  Then ignore the HTML file and use the image that will now be on your server as you want it.

Another possible way is to use an external tool like Yummy software's FTP watcher to monitor when this webcam image file is updated and have it do the FTP upload independently of WeatherCat.

Let us know if this is sufficient to solve your problem or if some of the details aren't clear.

Cheers, Edouard  [cheers1]

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Upload webcamimage
« Reply #2 on: April 07, 2018, 01:19:49 AM »
Edouard has given you the details. If you're using WC3, you also have two additional videos you can use: MOVIES$ and DAILY_MOVIE$. The first replaces the old tags that put the hourly vid onto your web space. The latter is a time-lapse with the whole day.

Here's the whole html for getting the vid(s) up to your web space:
Code: [Select]
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Testing Web Camera Uploading</title>
</head>
<body>

<!-- Uploads the hourly mp4 file called "WeatherCat1hrMovie.mp4" -->
MOVIE$

<!-- Uploads the a time-lapse mp4 file called "WeatherCatDailyMovie.mp4" -->
DAILY_MOVIE$

</body>
</html>
Actually, you don't really need the <head></head> stuff or the comments, of course... Put this file in the "Additional Files" list and set a time like 60 minutes to upload the video(s) once an hour. I use 20 minutes so I don't have to wait more than that if the actual upload occurred just after this additional file last uploaded. We can't, yet, set a particular time for these files to upload. As far as I know, the 'timer' starts when the change to the prefs are saved.

To actually display the video on your site, your page needs the following html:
Code: [Select]
<video class="mp4-size" autoplay controls>
    <source src="http://www.mid-southweather.com/WeatherCat1hrMovie.mp4" type="video/mp4">
        Your older browser does not support the video tag.
</video>
If your viewers are using a non-html5 browser, they'll see that last bit of text and might encourage them to update their XP browser! [lol]

Hope that helps.
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Hugh Whalen

  • Gentle Breeze
  • **
  • Posts: 64
    • INBFLOWE2
  • Station Details: Vantage Pro 2 with UV and Solar sensors. 2017 27" iMac, 3.5 GHz i5, 16GB RAM, 512 GB SSD
Re: Upload webcamimage
« Reply #3 on: April 07, 2018, 12:37:14 PM »
It is now working. Thank you very much!

Now, if it would just stop snowing ... [snowflake]

Hugh

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Upload webcamimage
« Reply #4 on: April 07, 2018, 01:45:49 PM »
"Now, if it would just stop snowing..." So you don't appreciate our gift of weather?! We throughly test it before sending it east! Blame it on the Jet Stream, or the Gulf Stream, or poorly located North Atlantic islands. [rolleyes2] cmu:-)
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Hugh Whalen

  • Gentle Breeze
  • **
  • Posts: 64
    • INBFLOWE2
  • Station Details: Vantage Pro 2 with UV and Solar sensors. 2017 27" iMac, 3.5 GHz i5, 16GB RAM, 512 GB SSD
Re: Upload webcamimage
« Reply #5 on: April 07, 2018, 03:37:50 PM »
I just came back from two weeks in Florida (Tampa, Homestead, and Key West). If you could send some of that weather, I would appreciate it more.

  [sun2]

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Upload webcamimage
« Reply #6 on: April 07, 2018, 03:45:44 PM »
I'll get right on that! We could use some of it right here! Freezing rain, sleet, snow are forecast just a few miles north of the Memphis area today! At least our forecasters are keeping it north just a bit, we fire them if it snows more than a few centimeters... in the same month!!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system