Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera notifications only 4:3 #513

Closed
olbjan opened this issue Dec 9, 2019 · 3 comments · Fixed by #650
Closed

Camera notifications only 4:3 #513

olbjan opened this issue Dec 9, 2019 · 3 comments · Fixed by #650

Comments

@olbjan
Copy link
Contributor

olbjan commented Dec 9, 2019

Camera notifications of cameras streaming 16:9 content is rendered as 4:3. This aesthetic issue is I believe ever since the start of notifications.

@Tangston311
Copy link

Seeing the same issue here - I have a 640x360 MJPEG stream that's getting distorted (initially posted here: https://community.home-assistant.io/t/distorted-camera-feed-in-ios-notification/174380

Undistored View:
14416fe89d13e17c1a1312089372c689ffc40a46

View in iOS Notification:
b413b070dd376614e33cc7560d8eb097d931ff83

My camera setup:

camera:
  - platform: mjpeg
    mjpeg_url: http://<#ipaddress>:<#port>/wps-cgi/mjpg/video.cgi?camera=1&resolution=640x360&username=#####&password=#####
    name: Porch

My config:

- alias: Front Door Sensor Tripped
  trigger:
    - platform: state
      entity_id: sensor.zone_001
      to: 'Violated'
  condition:
    condition: or
    conditions:
      - condition: state
        entity_id: alarm_control_panel.alarm_com
        state: 'armed_away'
      - condition: state
        entity_id: alarm_control_panel.alarm_com
        state: 'armed_home'
  action:
    service: notify.mobile_app_iphone
    data:
      message: "Front Door Sensor Tripped!"
      data:
        attachment:
          content-type: jpeg
        push:
          sound:
            name: "Update.caf"
            critical: 1
            volume: 1.0
          category: camera
        entity_id: camera.porch

@Bit-River
Copy link

Situation remedied for desktop browser & android app by removing

stream:

from configuration.yaml - while keeping cameras with the camera_view: live in ui-lovelace.yaml

With this change made, there has not been one re-occurrence.

Not sure what equivalent changes can be made for this iOS issue, but if you have the stream integration I would comment it out & restart to see if it fixes things.

Cameras stream at same speed for me with this option removed.

@binarybucks
Copy link

Not using the stream component. Notification images are disorted like @Tangston311 has shown with MQTT or generic camera components (still_image_url only).

robbiet480 pushed a commit that referenced this issue Jun 15, 2020
- Adjusts the constraints on the preview image view while it vends so it isn't stretched. Fixes #513 / #167.
- Adds a sample .apns which can be used to trigger a Camera notification more easily.

Looking through the server code, it looks like we can also grab an HLS stream, which is what the frontend is using for previewing the camera. Refs #596. Created a ticket remember this as #649.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants