Author Topic: How to configure webcam on Meteobridge  (Read 5313 times)

0 Members and 1 Guest are viewing this topic.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
How to configure webcam on Meteobridge
« on: March 04, 2020, 02:16:59 PM »
This tread with a few following messages existed originally in a different thread. This thread was spun off and split from the original thread because this discussion went off topic. The original thread is at this link ...but really you don't really need to go there as its a different topic:
https://www.wxforum.net/index.php?topic=38907.0

Basically the background is this. mstan asked how to use the Meteobridge with his webcam. Then the following discussions took place.

Several [online services allow for uploading your webcam image]....

AWEKAS
MetOffice WOW
WeatherCloud
and WU

I feed them all my webcam with my Meteobridge. I really like the overlay weather text feature on the image.
I fed my previous webcam to WU, but I can't get WU to accept the FTP feed from my new camera, which is why I was looking for a different site to upload it to. According to FileZilla, WU is accepting my username but rejects my password.

I hadn't heard of the sites you listed, I will check them out. Thank you

Galfert I have a Meteobridge and send my data to the locations you listed but I can't figure out how to send my webcam which is a hikvision 2032. Can you provide any info or screen shots on your setup. Also Windy is accepting webcams now. Thanks.

You have to add you camera to the Meteobridge. There are several ways to do this and it depends on the capabilities of your camera. I have a Dahua clone (Q-See) camera. The method I use with this syntax probably will not work for your camera. But if you find the information on how to talk to your camera then you can use the proper syntax for your brand/model.

 [ You are not allowed to view attachments ]

The Syntax I use for my Dahua clone is this:
https://admin:MyCamsPW@192.168.1.220/cgi-bin/snapshot.cgi?channel=8&loginuse=admin&loginpas=admin

Now my image is coming from an NVR that has many cameras. Therefore the image is not coming directly from a camera. But If I had a stand alone Dahua it would be pretty similar except I could ignore the ?channel=8 part of the syntax. Also of note is that in my case channel 0 is really channel 1. Which means that in my case since I'm pulling channel 8 it is really channel 9 on my NVR.

For Hikvision use this as a staring point. There are probably other sources of information as this may not be 100% guaranteed for your exact model. This though gives you an idea of how it works:
https://www.ispyconnect.com/man.aspx?n=hikvision

There is like 16 pages of syntax to sift through in that link and find the correct one for your Hikvision. I would put my bet on this one though which is the same as Dahua. But it needs to be tested.
cgi-bin/snapshot.cgi?loginuse=[USERNAME]&loginpas=[PASSWORD]

Which translates to this as an example:
http://admin:admin@192.168.1.20/cgi-bin/snapshot.cgi?loginuse=admin&loginpas=admin
« Last Edit: March 05, 2020, 06:17:01 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #1 on: March 04, 2020, 02:20:28 PM »
The next step after the camera is acquired in the MB is to send the image to the meteobridge.com free hosting service. Where you will later use the resulting hosting location as the address of your camera for all the various services you want your camera to show up on.

 [ You are not allowed to view attachments ]
click on those two camera icons to get the corresponding hosting link (with and without text)

You can use the Overlay Text option if you want. There are several ways to format that overlay and you can read more about that syntax at Meteobridge online wiki
https://www.meteobridge.com/wiki/index.php/Weather_Cam_Image_Handling

In my case I'm using the following Overlay Text:
-resize 852x480 -fill black -draw "fill-opacity 0.7 rectangle 0 460 852 480" -pointsize 12 -fill orange -draw "text 5 475 '[YYYY]-[MM]-[DD] [hh]:[mm]'" -fill white -draw "text 110 475 'Temp: [th0temp-act=F.1:--] °F    Humidity: [th0hum-act.0:--] %    Pressure: [thb0seapress-act=inhg.2:--] inHg    Wind Chill: [wind0chill-act=F.1:--]°F    Wind: [wind0avgwind-act=mph.1:--] mph    Gust: [wind0wind-max5=mph.1:--] mph    Rain today: [rain0total-sumday=in.2:--] in'"
« Last Edit: March 04, 2020, 02:31:27 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #2 on: March 04, 2020, 03:13:11 PM »
Ok I got It! It works perfect! Thanks soo much! I had missed that second step sending the image to meteobridge. I used your resize info the data all shows up in a line in the bottom but only up to the wind mph from the gust after it gets cut off.  Do you have a screen shot of your image?. Now the next step is how to send the image to the various sites. Some allow for a direct build it upload such as WU and windy but I could never get it to work.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #3 on: March 04, 2020, 03:17:54 PM »
The resize (and rectangle size) is probably something you have to play with depending on the resolution of your camera. Different cameras will require different tweaking. Mine doesn't cut off. I remember having to experiment to get it right.

 [ You are not allowed to view attachments ]
« Last Edit: March 04, 2020, 03:23:21 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #4 on: March 04, 2020, 03:26:34 PM »
Now the next step is how to send the image to the various sites. Some allow for a direct build it upload such as WU and windy but I could never get it to work.

You just provide them with the Meteobridge.com URL to your camera. Your choice if to use the one with the overlay text or the one without.
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #5 on: March 04, 2020, 03:31:08 PM »
Wow the weather much nicer in FL lol. Yes your image is wider. What size do you start with and then after resize end up with?. Also most sites want a image of a certain size ect. Thanks!

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #6 on: March 04, 2020, 03:44:56 PM »
1712 x 967 is the size of my original jpg. The only way I know that is by putting the direct camera URL (the one with the camera IP and it's username/password) into the browser and then downloading the resulting image. Then looking at the resulting file and seeing the file properties.

Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline ixlr8

  • Member
  • *
  • Posts: 42
Re: How configure webcam on Meteobridge
« Reply #7 on: March 04, 2020, 04:23:10 PM »
galfert- thank you for these instructions, it will save me some time setting things up when my Weatherbridge (Metrobridge) arrives.

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #8 on: March 05, 2020, 08:57:45 AM »
1712 x 967 is the size of my original jpg. The only way I know that is by putting the direct camera URL (the one with the camera IP and it's username/password) into the browser and then downloading the resulting image. Then looking at the resulting file and seeing the file properties.

Galfert here is link to my weather cam I still don't have the size right tho. Thanks again for your help!

https://admin.meteobridge.com/cam/8d10b91b84f4fb5267a1a8ae7f6c4798/camplus.jpg
Modify message

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #9 on: March 05, 2020, 09:05:23 AM »
Looks like you are using 4:3 aspect ratio camera (often called NTSC). My camera is a 16:9 aspect ratio (wide screen HDTV)

My original image dimensions are 1712 x 967. If you divide 1712/967 = 1.77 which is 16:9 aspect ratio.
Therefore when I resized to 852 x 480 it is because then I'm maintaining that HDTV aspect ratio (852/480 = 1.77)
The data rectangle that I created with coordinate points 0 460 852 480 correspond to my overall dimensions.

In your case to resize a 4:3 aspect ratio image you can choose any size you want as long as the resulting aspect ratio maintains the 4:3 dimensions.
4/3 = 1.33
I recommend that you resize to 640 x 480 which is a 4:3 aspect ratio dimension (640/480 = 1.33)
Then your data rectangle can have the following coordinate points (the diagonal corners of the data rectangle):
0 460 640 480
Those 4 numbers correspond to the resized image at coordinate points (0,460) and (640,480). Top left and bottom right of the data rectangle.

You might want to play with the data rectangle placement to get it to look best. I think the only number you have to play with is the second which is the one that defines how low or how high the top part of the data rectangle starts at.
For example maybe 0 465 640 480 looks better.
« Last Edit: March 08, 2020, 12:55:42 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #10 on: March 05, 2020, 09:26:59 AM »
If it still doesn't fit then there is too much text. You may then choose to reduce the amount of information shown, like maybe you take out Wind Chill temperature, or you reduce the -pointsize to something smaller than 12. But that will make the text smaller and harder to read. Up to you which of these two things to do. Another alternative is to make the data rectangle bigger (taller) and then display two lines of text. It is obvious how to make the data rectangle taller but I don't know how to display two lines of text ...nor if it is possible...I think it probably is possible [edit: it is possible]. You can dig further into the Meteobridge image manipulation examples or read about the advanced image manipulation syntax at the following link:
http://www.imagemagick.org/Usage/
« Last Edit: March 05, 2020, 09:35:53 AM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #11 on: March 05, 2020, 09:30:29 AM »
Ok this is what I have it set at now and all the text still does not all fit. You can check the same link.

-resize 640x480 -fill black -draw "fill-opacity 0.7 rectangle 0 460 640 480" -pointsize 12 -fill orange -draw "text 5 475 '[YYYY]-[MM]-[DD] [hh]:[mm]'" -fill white -draw "text 110 475 'Temp: [th0temp-act=F.1:--] °F    Humidity: [th0hum-act.0:--] %    Pressure: [thb0seapress-act=inhg.2:--] inHg    Wind Chill: [wind0chill-act=F.1:--]°F    Wind: [wind0avgwind-act=mph.1:--] mph    Gust: [wind0wind-max5=mph.1:--] mph    Rain today: [rain0total-sumday=in.2:--] in'"

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #12 on: March 05, 2020, 09:38:16 AM »
Yep....too much text. You need to do one of the following:

- remove a some text (like Wind Chill)
- reduce the size of the text
- figure out how to display multiple lines of text (possibly needing to make the data rectangle larger also)
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #13 on: March 05, 2020, 09:40:43 AM »
I just though of something else you can do. You can crop the image (by image manipulation syntax in the Meteobridge) and make a widescreen out of your image. This means you lose some part of the image in order to make it widescreen. It will also act like a zoom in. But I don't know how to crop the image. I'm certain that this is possible. Just one other thing to dig into the documentation and to figure out.
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #14 on: March 05, 2020, 09:45:59 AM »
Ok there are a few options, I could remove the time since the cam displays it as well, I would like to figure how to make two lines tho. I'll have to see about crop and zoom as well. Thanks again!

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #15 on: March 05, 2020, 09:47:16 AM »
Besides removing the date/time, you can also abbreviate the text so that the line take up less space.

Temp: Hum: Pres: Wind: Rain:
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #16 on: March 05, 2020, 09:49:59 AM »
or buy an HD camera  :lol:
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #17 on: March 05, 2020, 10:13:06 AM »
or buy an HD camera  :lol:

Haha your a funny one. lol. You do have a point tho I could, the cam I have now is a Hikvision 2032 I think its 3mp Its a common one used for weather cams that's why I got it most sites you send a image to don't want a high res image from what I understand I never knew about aspect ratio ect. It has a decent picture tho. If I upgraded I still would want a IP cam any suggestions? Also I set up another device to upload my cam to WU via URL lets see if it works.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #18 on: March 05, 2020, 04:55:33 PM »
I figured out a way to create a second line. I have tried to send a line break and it won't work probably because I'm not doing it right. The documentation says you need to send a \n but the backslash gets removed when I save these settings. I tried every which way from putting it in quotes and other methods and nothing.

So I took a different approach to the solution. I decided to just format the text as two separate lines. Now I can add more sensors like my PM2.5.

-resize 852x480 -fill black -draw "fill-opacity 0.7 rectangle 0 440 852 480" -pointsize 12 -fill orange -draw "text 5 455 '[YYYY]-[MM]-[DD] [hh]:[mm]'" -fill white -draw "text 110 455 'Temp: [th0temp-act=F.1:--] °F    Humidity: [th0hum-act.0:--] %    Pressure: [thb0seapress-act=inhg.2:--] inHg    Wind Chill: [wind0chill-act=F.1:--]°F    Wind: [wind0avgwind-act=mph.1:--] mph    Gust: [wind0wind-max5=mph.1:--] mph'" -fill white -draw "text 110 475 'Rain today: [rain0total-sumday=in.2:--] in'"

 [ You are not allowed to view attachments ]
« Last Edit: March 05, 2020, 04:59:12 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #19 on: March 05, 2020, 05:15:53 PM »
Hey Good Work! Check out mine I changed it but I need to change where the second line starts.

https://admin.meteobridge.com/cam/8d10b91b84f4fb5267a1a8ae7f6c4798/camplus.jpg

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #20 on: March 05, 2020, 05:24:16 PM »
Now I've got my PM2.5 data showing.

 [ You are not allowed to view attachments ]

-resize 852x480 -fill black -draw "fill-opacity 0.7 rectangle 0 440 852 480" -pointsize 12 -fill orange -draw "text 5 455 '[YYYY]-[MM]-[DD] [hh]:[mm]'" -fill white -draw "text 110 455 'Temp: [th0temp-act=F.1:--] °F    Humidity: [th0hum-act.0:--] %    Pressure: [thb0seapress-act=inhg.2:--] inHg    Wind Chill: [wind0chill-act=F.1:--]°F    Wind: [wind0avgwind-act=mph.1:--] mph    Gust: [wind0wind-max5=mph.1:--] mph'" -fill white -draw "text 110 475 'Rain today: [rain0total-sumday=in.2:--] in    Air Quality PM2.5: [air0pm-max5=.0] μg/m3'"
« Last Edit: March 05, 2020, 05:26:51 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How configure webcam on Meteobridge
« Reply #21 on: March 05, 2020, 05:25:43 PM »
Looks Perfect! You still have room!

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How to configure webcam on Meteobridge
« Reply #22 on: March 05, 2020, 05:54:30 PM »
I didn't like the PM2.5: text followed by the air quality number. Too many numbers together and hard to pick out the actual air quality reading. 

So I changed it to:
PM2.5 Air Quality: [air0pm-max5=.0] μg/m3

Now it is more legible.
I also changed the ug/m3 to μg/m3 to use the proper micro gram symbol.

 [ You are not allowed to view attachments ]

Now I'm ready for the lightning sensor since I've made lots of room....

-resize 852x480 -fill black -draw "fill-opacity 0.7 rectangle 0 440 852 480" -pointsize 12 -fill orange -draw "text 5 455 '[YYYY]-[MM]-[DD] [hh]:[mm]'" -fill white -draw "text 110 455 'Temp: [th0temp-act=F.1:--] °F    Humidity: [th0hum-act.0:--] %    Pressure: [thb0seapress-act=inhg.2:--] inHg    Wind Chill: [wind0chill-act=F.1:--]°F    Wind: [wind0avgwind-act=mph.1:--] mph    Gust: [wind0wind-max5=mph.1:--] mph'" -fill white -draw "text 110 475 'Rain today: [rain0total-sumday=in.2:--] in    PM2.5 Air Quality: [air0pm-max5=.0] μg/m3'"
« Last Edit: March 05, 2020, 06:17:11 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: How configure webcam on Meteobridge
« Reply #23 on: March 07, 2020, 04:35:45 PM »
Hey Good Work! Check out mine I changed it but I need to change where the second line starts.

https://admin.meteobridge.com/cam/8d10b91b84f4fb5267a1a8ae7f6c4798/camplus.jpg

Well???? Wat ya waitin' for?
« Last Edit: March 07, 2020, 06:01:11 PM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline mstan

  • Senior Member
  • **
  • Posts: 54
Re: How to configure webcam on Meteobridge
« Reply #24 on: March 07, 2020, 05:10:29 PM »
OK pita. lol  :lol: Check my work!

 

anything