twrecked / hass-aarlo

Asynchronous Arlo Component for Home Assistant
GNU Lesser General Public License v3.0
399 stars 79 forks source link

Stream not working on any cameras #151

Open CarterBrehm opened 4 years ago

CarterBrehm commented 4 years ago

I have v0.6.8 of this integration installed through HACS in a virtualenv and while all of the sensors and snapshots work fine when I use the lovelace card the stream shows up but doesn't actually move at all, while the log reports errors:

2020-01-18 13:21:01 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: No dts in packet
2020-01-18 13:21:16 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream: No dts in packet
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.
2020-01-18 13:22:49 WARNING (MainThread) [asyncio] socket.send() raised exception.

Occasionally, I also get a 2020-01-18 13:28:00 WARNING (ArloEventStream) [pyaarlo] general exception must be str, not NoneType which doesn't seem to be related to any action I take. I've followed the streaming instructions in the bottom of the readme, here are the relevant parts of my config:

stream:

camera:
  - platform: aarlo
    ffmpeg_arguments: '-pred 1 -q:v 2'

aarlo:
  username: !secret arlo_email
  password: !secret arlo_password
  packet_dump: False
  db_motion_time: 30
  db_ding_time: 10
  recent_time: 10
  last_format: '%-I:%M %p'
  no_media_upload: True
  mode_api: auto
  refresh_devices_every: 0
  http_connections: 5
  http_max_size: 10
  host: https://my.arlo.com

Let me know if I need to raise my logging level or anything.

ssilence5 commented 4 years ago

@twrecked You caught me there. Let me walk through what happens on the web portal.

Playback doesn't work at all on the Arlo portal for most browsers. I have linked this to the fact that the format is in HEVC (Arlo Pro 3 is 2K). I did get it to work in either Edge or IE, can't remember which.

Live streaming works fine in the Arlo portal with both Video and Audio.

One other note, I must not have had my volume up on my computer, because Live Streaming in HASS has both Audio and Video. Playback is still audio only (however playback works fine on my iPhone using the Home Assistant app). I believe this still links back to most modern browsers don't support HEVC.

twrecked commented 4 years ago

@ssilence5 See this, somebody tweaked a setting and got their library to work.

Kras-s-savchiK commented 4 years ago

Sorry, but I don't understood something: Right now Video work, but without audio.

In Configuration im add line: user_agent: linux and right now I have this: aarlo: username: ** password: refresh_devices_every: 2 stream_timeout: 240 user_agent: linux**

Also im added line play_direct: true to aarlo-glance cards. and there I have this: **battery_id: sensor.entrance_camera_battery entity: camera.aarlo_door image_click: play play_direct: true name: Door show:

But this is don't work Also im try to delete stream: null But video and audio don't work again what im doing wrong?

twrecked commented 4 years ago

@Kras-s-savchiK what kind of cameras do you have?

I can't really tell from you config what is wrong because the indentation is funny. Can you try re-posting with back ticks - see here - for formatting.

Kras-s-savchiK commented 4 years ago

Im use Arlo Pro 2

In Configuration im add line:

user_agent: linux

and right now I have this:

aarlo:
username: ***
password: ***
refresh_devices_every: 2
stream_timeout: 240
user_agent: linux

Also im added line

play_direct: true

to aarlo-glance cards. and there I have this:

battery_id: sensor.entrance_camera_battery
entity: camera.aarlo_door
image_click: play
play_direct: true
name: Door
show:
  - snapshot
  - battery_level
  - signal_strength
  - captured_today
stream: null
top_date: false
top_status: false
top_title: false
type: 'custom:aarlo-glance'

But this is don't work Also im try to delete

stream: null

But video and audio don't work again

Thanks for answering

twrecked commented 4 years ago

Thanks.

The stream: null doesn't do anything and will be ignored, the rest of your config looks good. Are the entity_id and battery_id correct, if you don't explicitly rename the devices Aarlo gives you you don't need to specify the battery_id.

I have those cameras and they are working for me. Can you capture some debug? I want to make sure the stream is starting.

What OS and browser are you using?

logger:
  default: info
  logs:
    custom_components.aarlo: debug
    custom_components.aarlo.camera: debug
    pyaarlo: debug

Start your stream and look in homeassistant.log for startUserStream and url=https:XXX. Look if there are any errors around that.

Kras-s-savchiK commented 4 years ago

Im using Safari (Mac and iPhone/iPad) and iOS App Already in config.yaml I have

media_player:
  - platform: aarlo

ffmpeg: 

stream:

Maybe, them broke to play video and sound?

Kras-s-savchiK commented 4 years ago

Im using Safari (Mac and iPhone/iPad) and iOS App Already in config.yaml I have

media_player:
  - platform: aarlo

ffmpeg: 

stream:

Maybe, them broke to play video and sound?

I find some issue - I just push on 3 point in right upper corner and do reload resources

And I delete user_agent: linux and right now my cameras playing, but without sound. (

twrecked commented 4 years ago

Can you check here and see if it lines up with your experience. I don't have a Mac so can't readily test that.