Open m0urs opened 2 years ago
In my setup it seems that modes are wrong in HA, if I use MQTT backend in aarlo. If I revert to SSE it seems to work.
Thanks. I was not aware of the "backend" parameter in PyArlo. Just tried to switch from ""mqtt" to "sse" and will try for some time to see if this improves something.
I can confirm that changing the backend from "mqtt" to "sse" solved the issues for me. It seems now reliable again.
I really don't think this issue should be closed. Because if I switch to "sse" backend, I cannot get livestream from HA. That works with "mqtt"... So it would be very nice to get this fixed. The backend switching was just meant to be a clue to where the bug might be
@m0urs could you please reopen the issue?? It is still a bug
Reopened because the issue still seems to exist if the backend is set to "mqtt". For me with "sse" backend it is working correctly.
Is live streaming working for you when using sse? Because I can only get live streaming when using mqtt, and that's why I would reslly like to get this mode-issue solved
I cannot tell you. I am only using pyArlo to control the states of my cameras from within my FHEM home automation environment. E.g. switch them off if I open the door to the garden etc.
Will do today or tomorrow 👍
Not working log. Backend set to "sse" https://pastebin.com/5wQjkYW5
Thanks, I got that. Can you attach one where it works?
edit: can you also paste in your config? Or tell me what the user_agent
is. And can you tell me what you are trying to stream on to.
and can you add the lovelace card configuration.
Thanks!
edit #2; I think I'm seeing something similar here, I think they changed the protocol; I'll look some more. It still works with direct streaming.
I just tried to make a log of a working stream. I cannot make any live stream work through Home Assistant now. I get the same error in the log with invalid data:
2022-07-31 21:48:25 DEBUG (ArloEventStream) [pyaarlo] mqtt: connected=0 2022-07-31 21:48:25 DEBUG (ArloEventStream) [pyaarlo] topcs= [] 2022-07-31 21:48:26 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.aarlo_carport] Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsps://arlostreaming01-z1-prod.wowza.arlo.com:443/vzmodulelive/59U17C7MB102A_EDITED_BY_ME?egressToken=542522EDITED_BY_ME&userAgent=iOS&cameraId=59U17EDITED_BY_ME&txnId=be!d17afd9EDITED_BY_ME
My feeling is Arlo has changed their backend tto remove RTSP support - they don't need it any more since they swapped to mpeg-dash.
If you use the aarlo lovelace card you can try direct
viewing, that still works for me here.
I have direct stream. It just doesn't work when the backend is sse:
entity: camera.aarlo_indkorsel
image_click: stream
image_view: direct
name: Alrum
show:
- motion
- sound
- snapshot
- battery_level
- signal_strength
- captured_today
- image_date
top_date: false
top_status: false
top_title: false
type: custom:aarlo-glance
You traces are showing it's not using direct; see the piece userAgent=iOS
in the stream open request, it would use linux
if it was trying direct. And the stream worker won't be starting.
Can you try saving that config and trying once based off this example configuration, your current config looks like a mix of old style and new style and I wonder if that is confusing it.
edit: expand link
It worked... \o/ Thanks
Since a few weeks I do have again the problem, that my script is no longer correctly reading the current mode of my camera and my lights. After the first connect to Arlo, the modes are read correctly. If I then change the mode via the script, the mode is changed correctly also, but then, if I try to reread the current mode, it does not reflect the current one but still the old one.
It looks rather similar to this older issue https://github.com/twrecked/pyaarlo/issues/77.
Basically what my script is doing:
The above does work correctly. If I check with the Arlo app, the mode is set to the correct value.
This does not work. The "status" is still the one it had after the initial connect to Arlo and the initial reading of the state.
I enclose a debug file which has the following timestamps:
I am logging in with the following parameters:
arlo = pyaarlo.PyArlo(username=username, password=password,tfa_source='imap', tfa_type='email', tfa_host=tfa_host, tfa_username=tfa_username, tfa_password=tfa_password, synchronous_mode=False, refresh_devices_every=1,reconnect_every=90, stream_timeout=180, request_timeout=120, user_agent='arlo', verbose_debug=True)
Could you please have a look, if you can see, why this is no longer working? I did not change anything on my side and it worked a few months this way.
Thanks a lot.
UPDATE:
It seems that even setting the modes are most of the time working, but not always ...
[Uploading debug-encrypted.log…]()