How to get a HP10 webcam photo on my website

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