Generic Camera Component is your friend!

So I posted about this in the Gitter chatroom and got a pretty solid response so I thought I would share this here as well. First, some screenshots of the completed setup.


ANIMATED DOPPLER WEATHER


LIVE TRAFFIC CAMS AND LIVE TRAFFIC MAP


RESOURCES

  1. Traffic Land - Used to grab any live traffic cameras in your region
  2. Static Map Maker - I use the Mapbox setup.
  3. WU Regional Doppler - Click on the animate button on the top left.

DOPPLER EXAMPLE

camera:
  - platform: generic
    still_image_url: 'https://icons.wxug.com/data/weather-maps/radar/united-states/prescott-arizona-region-current-radar-animation.gif'
    name: WU Doppler Weather

AZ TRAFFIC CAMERA EXAMPLE

camera:
  - platform: generic
    still_image_url: 'http://vods.az511.com/adot_020.jpg'
    name: 7th St Traffic Camera

Would love to see other creative uses of the camera component!

7 Likes

Nice :wink: use it here to get an eye all the time on my favorite ski resort :wink:

2 Likes

Might I ask how you got traffic information?

Be advised that your TrafficLand cameras are going to stop working after the tokens expire. This is not a new thing for me and I discovered this a long time ago.

TrafficLand manages cams for a number of states and puts expiring tokens in so that they can protect their revenue stream. If you can grab cameras that are managed and controlled by your department of transportation, you’ll have much better results.

Sometimes news outlets traffic cameras will work as well - when I used to live in Pennsylvania, I had a mix of DOT and Local news channel cams available. They still work too.

2 Likes

@itchaboy do you mean the traffic map? I signed up for Mapbox free to get an API key, then I went to Static Map Maker and used their online tool to configure a map. Once that was done, I just grabbed the url they generate and popped it into my generic camera declaration.

Hope that helps.

1 Like

@rpitera For my state, the DOT website had listed public traffic cameras which claim to have an expiration but the direct link to the image feed hasn’t expired for me after months of usage now.

Same thing with PennDOT. If they don’t use an outside contractor to serve/manage the cameras then you’ll be fine.

Unfortunately now I am in New Jersey and the state uses TrafficLand. The cameras are down more than they are up and when they are up, the URL works for about an hour. Then it expires.

Ouch. That would frustrate me personally as I tend to only use the traffic tab when I’m like 10 sec from jumping in my car and driving somewhere. Not about to sit there and diagnose a problem.

1 Like

Traffic cams are the one thing missing from my setup that I have been unable to resolve since I started. I’m glad that others have them working but insanely jealous!! LOL

I have a card with Google travel times for the usual places I go to as a compromise, but damn I wish I could get the cams…

1 Like

Thanks! Appreciate it

1 Like

I like this approach, but it sure would be nice to have parameters in the generic camera component to rate-limit and time-bracket the image URL accesses. I guess I could do that via timed automations to trigger shell commands (wget/curl the remote image to a local file) but it would be so much more straightforward to just have it here in this component.

I don’t need a new traffic map every ten seconds, and I probably don’t need it at all between 11pm and 5am, so it would be nice not to hammer the servers unnecessarily.

3 Likes

Great post!

If anyone wants them, here are some New York State related cameras:

These are cameras for the NYS Thruway, some are repeated on the 511NY.org site

This is a really long 2000~ camera list of cameras around NYS roadways

If you look at one of cameras on the 511ny.org site, and right click to get the Image Address you will get something like: https://www.511ny.org/map/Cctv/2ml09170n--30#1500341050894

camera:
  - platform: generic
    still_image_url: https://www.511ny.org/map/Cctv/5161268--18#1499926002978
    name: I-87 Between Exits 4 and 2 (Looking South)
3 Likes