Public city cameras

sensor:
  - {platform: rest, name: Cam TLV Sheraton, update_inverval: {minutes: 3}, value_template: '{{value_json.data[0]._id}}', resource: 'http://api.deckchair.com/v1/camera/542292d45d880f297389bda3/images'}

camera:
  - {platform: generic, name: NY Broadway, still_image_url: 'http://archives.earthcam.com/archives5/ecnetwork/us/ny/nyc/tsmpr/archive10/live2.jpg', scan_interval: 3600}
  - {platform: generic, name: NY Duffy Square, still_image_url: 'http://archives.earthcam.com/archives5/ecnetwork/us/ny/nyc/tsmpr/archive3/live2.jpg', scan_interval: 3600}
  - {platform: generic, name: TLV Beach, still_image_url: 'http://api.deckchair.com/v1/viewer/image/{{ states("sensor.Cam_TLV_Sheraton") }}', limit_refetch_to_url_change: 1}
  - {platform: ffmpeg, name: JRS Wall, input: 'http://il28.cast-tv.com:1935/23595_LIVE_Kotel_Live/_definst_//23595_LIVE_Kotel_Live/playlist.m3u8'}

Configuration
sensor: ##### Tokens

  - platform: rest
    name: Cam token TLV
    update_inverval:
      minutes: 3
    value_template: "{{value_json.data[0]._id}}"
    resource: http://api.deckchair.com/v1/camera/542292d45d880f297389bda3/images

  - platform: command_line
    name: Cam token Caesarea
    scan_interval: 3600
    command: curl -sL http://g0.ipcamlive.com/player/player.php?alias=freegullsouth | sed -n "s/.*streamid = '\(.*\)'.*/\1/p"

  ### Not relevant until https://community.home-assistant.io/t/32370
  # - platform: command_line
  #   name: Cam token Marina
  #   scan_interval: 3600
  #   command: curl -sL https://balticlivecam.com/wp-admin/admin-ajax.php?action=auth_token&id=4487 | sed -n 's/.*token=\(.*\)".*/\1/p'


camera:

  ########## NY http://www.earthcam.com/usa/newyork/timessquare

  ### Live

  - platform: ffmpeg
    name: NY Time Square
    input: http://video3.earthcam.com/fecnetwork/hdtimes10.flv/playlist.m3u8
  - platform: ffmpeg
    name: NY Street
    input: http://video3.earthcam.com/fecnetwork/9974.flv/playlist.m3u8
  - platform: ffmpeg
    name: NY South
    input: http://video3.earthcam.com/fecnetwork/4017timessquare.flv/playlist.m3u8

  ### Static

  - platform: generic
    name: NY Pedestrian Plaza
    still_image_url: http://archives.earthcam.com/archives5/ecnetwork/us/ny/nyc/tsmpr/archive2/live2.jpg
    scan_interval: 3600
  - platform: generic
    name: NY Duffy Square
    still_image_url: http://archives.earthcam.com/archives5/ecnetwork/us/ny/nyc/tsmpr/archive3/live2.jpg
    scan_interval: 3600
  - platform: generic
    name: NY Bowtie
    still_image_url: http://archives.earthcam.com/archives5/ecnetwork/us/ny/nyc/tsmpr/archive4/live2.jpg
    scan_interval: 3600
  - platform: generic
    name: NY Broadway
    still_image_url: http://archives.earthcam.com/archives5/ecnetwork/us/ny/nyc/tsmpr/archive10/live2.jpg
    scan_interval: 3600



  ######### Tel Aviv

  - platform: generic
    name: TLV Beach # src http://www.sheratontelaviv.com/webcam https://www.lookr.com/lookout/1491387551
    still_image_url: http://api.deckchair.com/v1/viewer/image/{{ states("sensor.Cam_token_TLV") }}
    limit_refetch_to_url_change: 1
  - platform: ffmpeg
    name: TLV Burse # src https://myearthcam.com/webcamtelaviv
    input: http://video1.earthcam.com/myearthcam/fc2f68ee24fb42d153d9872a2600576b.flv/playlist.m3u8
  - platform: generic
    name: TLV Charles Clore Park # src http://www.windalert.co.il/מצלמת-תל-אביב-דולפינריום
    still_image_url: http://www.windalert.co.il/cameras/ofir.9.jpg
    scan_interval: 600
  - platform: generic
    name: TLV Beach Hilton Outdated # src http://www.windalert.co.il/מצלמת-תל-אביב-הילטון
    still_image_url: http://www.windalert.co.il/cameras/levyam.9.jpg
  - platform: ffmpeg
    name: TLV Beach Dolphinarium Flag # src http://streamer.co.il/liveshow-dolphinarium.php
    input: https://cams.cdn-surfline.com/wsc-east/il-dolphbeachcam.stream/playlist.m3u8
  - platform: generic
    name: TLV Marina North # src http://www.windalert.co.il/מצלמת-תל-אביב-מרינה
    still_image_url: http://www.windalert.co.il/cameras/ben.9.jpg
  - platform: generic
    name: TLV Marina North Outdated # src https://balticlivecam.com/cameras/israel/tel-aviv/tel-aviv-marina/
    still_image_url: https://thumbs.balticlivecam.com/blc/Israel2.png
    scan_interval: 1800

  - platform: ffmpeg
    name: TLV Beach Dolphinarium # src http://streamer.co.il/liveshow-telaviv.php?lang=en
    input: http://server1.reali-tech.com:1935/live/dolphin.stream/playlist.m3u8
    ### -q:v [1-31] stands for VBR, bigger = lower quality. By default CBR is used: -b:v 200K https://goo.gl/mqmYXm
      ### 1 is rarely needed as it wastes space https://goo.gl/K2Uoq7
      ### 2 is visually lossless, oubling the value results in half the bitrate
    ### -vf drawtext stands for rewriting the wrong timestamp on a source stream
    extra_arguments: -q:v 7 -vf "drawtext=fontfile=/Library/Fonts/Arial.ttf:text=%{localtime}:fontsize=30:fontcolor=white:x=(w-text_w):y=0:box=1:boxcolor=0x00000000@1"

  ### Impossible until https://community.home-assistant.io/t/32370
  # - platform: ffmpeg
  #   name: TLV Marina # src https://balticlivecam.com/cameras/israel/tel-aviv/tel-aviv/
  #   input: https://edge01.balticlivecam.com/blc/Israel1/index.m3u8?token={{ states("sensor.Cam_token_Marina") }}
  - platform: generic # Fallback
    name: TLV Marina # src https://balticlivecam.com/cameras/israel/tel-aviv/tel-aviv/
    still_image_url: https://thumbs.balticlivecam.com/blc/Israel1.png
    update_inverval:
      minutes: 20




  ######### Jerusalem

  - platform: ffmpeg
    name: JRS Wall # src https://www.thekotel.org/kotel/kotel_cameras/
    input: http://il28.cast-tv.com:1935/23595_LIVE_Kotel_Live/_definst_//23595_LIVE_Kotel_Live/playlist.m3u8
  - platform: generic
    name: JRS Wall Still # src http://www.aish.com/w/e/ https://webcams.travel/webcam/1169377033
    still_image_url: http://www.aish3.com/wall/thewallbig17g.jpg
    scan_interval: 600
  - platform: generic
    name: JRS Center # src http://02ws.co.il/station.php?section=webCamera.jpg https://webcams.travel/webcam/1389696018
    still_image_url: http://02ws.co.il/images/webCamera.jpg
  - platform: generic
    name: JRS North # src http://02ws.co.il/station.php?section=webCamera.jpg https://webcams.travel/webcam/1389696188i
    still_image_url: http://02ws.co.il/images/webCameraB.jpg
  - platform: ffmpeg
    name: JRS Wall Moving # src http://www.aish.com/w/
    input: https://video3.earthcam.com/fecnetwork/7949.flv/playlist.m3u8
  - platform: ffmpeg
    name: JRS Wall Front # src https://www.thekotel.org/kotel/kotel_cameras/
    input: http://il28.cast-tv.com:1935/23595_LIVE_Kotel_Live1/_definst_//23595_LIVE_Kotel_Live1/playlist.m3u8
  - platform: ffmpeg
    name: JRS Wall dunno # src https://www.thekotel.org/kotel/kotel_cameras/
    input: http://il28.cast-tv.com:1935/23595_LIVE_Kotel_LIVE2/_definst_//23595_LIVE_Kotel_LIVE2/playlist.m3u8
  - platform: ffmpeg
    name: JRS Zion Square # src http://www.zionsquarecam.com/
    input: http://dcunilive11-lh.akamaihd.net/i/dclive_1@150263/master.m3u8?hdnea=st=1510606258~exp=1510606378~acl=/i/dclive_1@150263*~hmac=49f0ee25ab35ad35281033887d26cf043215b59f89cbc096f5db82f3bbb17046



  ########## Israel

  - platform: generic
    # It is possible to get HD picture with a token https://www.webcams.travel/api/ or an additional sensor
    name: IL Bat Yam Still # src https://webcams.travel/webcam/1462097618 # Stream http://server1.reali-tech.com:1935/live/batyam20/playlist.m3u8
    still_image_url: https://images.webcams.travel/original/1462097618i
    scan_interval: 600
  - platform: generic
    name: IL Galilee # src https://webcams.travel/webcam/1427389963 # Stream http://server1.reali-tech.com:1935/live/gev.stream/playlist.m3u8
    still_image_url: https://images.webcams.travel/original/1427389963i
    scan_interval: 600
  - platform: generic
    name: IL Ashkelon # src http://www.windalert.co.il/מצלמת-אשקלון-מרינה https://webcams.travel/webcam/1483686259
    still_image_url: http://www.windalert.co.il/cameras/ashkelon.9.jpg
  - platform: generic
    name: IL Caesarea # src http://wind.co.il/מזג-אויר/שידור-חי/ # Stream http://s17.ipcamlive.com/streams/1159fd8ea07e2531f/stream.m3u8
    still_image_url: http://s17.ipcamlive.com/streams/{{ states("sensor.Cam_token_Caesarea") }}/snapshot.jpg

  - platform: mjpeg
    name: IL Haifa # src + PTZ https://www.seaschool.co.il/camera1.php + http://youtu.be/7QNeVjlfMOQ
    mjpeg_url: http://37.142.41.42:38777/axis-cgi/mjpg/video.cgi?compression=70
  - platform: mjpeg
    name: IL Bat Yam # src http://www.boardshop.co.il/cam/pc_php/bs_by_pc.php
    mjpeg_url: http://82.81.235.100/axis-cgi/mjpg/video.cgi
  - platform: mjpeg
    name: IL Natanya # src http://www.boardshop.co.il/cam/pc_php/bs_n_pc.php
    mjpeg_url: http://82.81.235.103/axis-cgi/mjpg/video.cgi

  - platform: ffmpeg
    name: IL Tsfat # src https://www.weather2day.co.il/zefat-webcam/
    input: https://58486fd64e293.streamlock.net:4443/w2d/zefat.stream/playlist.m3u8
Automation to take a batch shot once a day
homeassistant: 
  ...
  whitelist_external_dirs: ['/Data/cams',]

automation:
  - alias: Time Square today
    trigger: {platform: time, at: '15:00'}
    action:
      service: camera.snapshot
      # data_template:  # O_o https://github.com/home-assistant/home-assistant/issues/10586
      data:
        entity_id: camera.ny_broadway, camera.ny_bowtie
        filename: /Data/cams/{{ now().strftime("%Y-%m-%d %H.%M.%S") }} {{ entity_id.name }}.jpg

Notes:

3 Likes

Pretty awesome! Thanks for that tip with Deckchair.com didn’t know how to go with them :slight_smile:

I’m finding that video plays very fast for a few seconds, then stops for 10 seconds and then repeats. I’ve tried a ton of options but I still can’t figure this out. Any ideas?

are you using picture entity cards?

Is it possible to put a camera icon on the HA map that can be clicked to open a feed like this?

Hello.
I have a rpi camera and an locally HLS stream (m3u8 file and cycle ts h264 parts) created with ffmpeg without CPU ussage (only GPU) as show in:

Seems that there are poor documentation on how to treat with HLS streams in HA, and I have seen this old post…

Could you help me how to make HA frontend could show a local generated HLS stream? with your card or with new picture in 0.92?

Thanks, and sorry for the bump.

Apologies for replying to an old thread, but I am trying to work with an ipcamlive.com camera feed. I see the sensor config retrieves a token, but I’m not clear how you’re using it to extract the feed.

Can you provide more info on how you implemented an ipcamlive.com camera in your homeassistant installation?

I have a public beach cam I want to include on my dashboard. To date, I’ve been able to hack out a snapshot image that refreshes every 5-10 seconds, but I’d like to display the live feed.

hi @mu3 (and anyone else watching this thread) - lovely work.

I too would like to get in some of my local city cameras into HASS. But im stumbling with reverse engineering the HTML. For instance, here’s my local beach webcam: Webcam Wanda - Sutherland Shire Council

the in-browser player seems to be some java player… any ideas how to reverse engineer that?

just playing forward a useful tool that can solve my above problem (in some cases anyway). I posted my problem over on stack exchange and was pointed toward a tool called yt-dlp. See how to extract a still image from a city public webcam feed.... can ffmpeg do this? - Stack Overflow

then my camera entity is simply defined as (using the URL that yt-dlp uncovers):

camera:
  - platform: ffmpeg
    name: cam_public_cronulla
    input: 'https://cams.cdn-surfline.com/cdn-au/au-cronullawanda/chunklist.m3u8'

This is a m3u8 player for Homeassistant, try it.