How to get a HP10 webcam photo on my website

Sorry I am going to de-rail this topic, but keep it relavent too, How do I get my current picture from the HP10 (Ecowitt server) downloaded (preferably using Weather Display, or a PHP call from my webserver) The whole issue of making a animation for me is not such a big thing as I have software and scripts to do that. I am sure getting the image from the Ecowitt server is probably very straight forwards but for the life of me right now I am missing it :slight_smile:

Thanks I know I am probably being very dense. but I do appreciate the answers :slight_smile:

Marcus

Hi!

Just use http://hp10-ipaddress/capture to download the current picture.

Oliver

1 Like

Hi Marcus,

Local LAN solution:
As said before by olicat and myself, if you have WD running in the same local network, you already have the best solution to get the latest HP10-picture.
Locally you can see and load the image using http://local-hp10-ipaddress/capture
AFAIK most weather-programs can fetch a webcam image if there is an URL available.
I myself use Meteobridge for that, check here TEST TEST Home Weather Station (ecoLcl version).


If there is no recent weather-program in the same LAN as the HP10, it is less simple.
Solution 1: Your hosted webserver needs to load a picture from your home-network.
Steps to take:

  1. Open a port f.i. 5050 in your router which points to the HP10-device.
  2. Use a small cron-script on your website to load the image and save it somewhere on your website.
  3. The script uses an URL similar to the LAN one, f.i. http://111.222.333.444:5050/capture
  4. The router will replace the external IP:port part with the local IP:80 → and forward the request to your HP-10 which will sent back the image to the script on your webserver.
  5. Use an allowed age of 5 minutes for the image or more to not access your home network too often.
  6. Adept the PWS-settings to point to the saved image.

Solution 2:
Load the image from the ecowitt server. For that you have to get an API key and write a more complex script which should

  1. Fetch the “weather-data” of your HP10 as documented by Ecowitt. That data contains the URL to latest image
  2. Then fetch the image and store it on your webserver.
  3. Use an allowed age of 5 minutes for the image or more to not access your home network too often.
  4. Adept the PWS-settings to point to the saved image.

Succes,
Wim