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

beta: arlo talkback (basestation only) #475

Merged
merged 28 commits into from
Jan 11, 2023
Merged

Conversation

bjia56
Copy link
Collaborator

@bjia56 bjia56 commented Dec 21, 2022

No description provided.

self.provider.arlo.NotifyPushToTalkCandidate(self.arlo_basestation, self.arlo_device, session_id, candidate.candidate)
try:
while not self.rtc_answered:
await asyncio.sleep(0.01)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sketchy change here imo would use a future or something instead.

@bjia56 bjia56 marked this pull request as ready for review December 25, 2022 04:01
@bjia56 bjia56 changed the title wip: arlo talkback beta: arlo talkback Dec 25, 2022
@AndrewAdventure
Copy link

Plugin failed to load.

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 25, 2022 via email

@AndrewAdventure
Copy link

Homebridge/pi4

server version: 0.4.6
plugin version: @scrypted/arlo 0.4.1
python version: python3.9
requirements.txt (outdated)
paho-mqtt==1.6.1
sseclient==0.0.22
aiortc==1.3.2
requests
--no-binary=cffi
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at pypa/pip#11453
Collecting paho-mqtt==1.6.1
Using cached paho_mqtt-1.6.1-py3-none-any.whl
Collecting sseclient==0.0.22
Using cached sseclient-0.0.22-py3-none-any.whl
Collecting aiortc==1.3.2
Using cached aiortc-1.3.2.tar.gz (1.2 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r /server/volume/plugins/@scrypted/arlo/pythonpython3.9-Linux-armv7l/requirements.txt (line 4)) (2.25.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from sseclient==0.0.22->-r /server/volume/plugins/@scrypted/arlo/pythonpython3.9-Linux-armv7l/requirements.txt (line 2)) (1.16.0)
Collecting pylibsrtp>=0.5.6
Using cached pylibsrtp-0.7.1.tar.gz (10 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting aioice<0.8.0,>=0.7.5
Using cached aioice-0.7.6-py3-none-any.whl (23 kB)
Collecting cryptography>=2.2
Using cached cryptography-38.0.4.tar.gz (599 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting av<10.0.0,>=9.0.0
Using cached av-9.2.0.tar.gz (2.4 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [9 lines of output]
Package libavdevice was not found in the pkg-config search path.
Perhaps you should add the directory containing libavdevice.pc' to the PKG_CONFIG_PATH environment variable No package 'libavdevice' found Package libavfilter was not found in the pkg-config search path. Perhaps you should add the directory containing libavfilter.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libavfilter' found
pkg-config could not find libraries ['avformat', 'avcodec', 'avdevice', 'avutil', 'avfilter', 'swscale', 'swresample']
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
pip install result 1

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 25, 2022 via email

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 25, 2022 via email

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 25, 2022 via email

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 25, 2022 via email

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 26, 2022

@AndrewAdventure I did a bit of testing locally, though on a different container architecture. Can you please try one more time running this in the Terminal:

apt install libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev libopus-dev libvpx-dev pkg-config

and let me know what the output is on the plugin console if it fails? Thanks for your help on this troubleshooting.

@AndrewAdventure
Copy link

Hi. Please see attached after running in terminal:

server version: 0.4.6
plugin version: @scrypted/arlo 0.4.1
python version: python3.9
requirements.txt (outdated)
paho-mqtt==1.6.1
sseclient==0.0.22
aiortc==1.3.2
requests
--no-binary=cffi
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at pypa/pip#11453
Collecting paho-mqtt==1.6.1
Using cached paho_mqtt-1.6.1-py3-none-any.whl
Collecting sseclient==0.0.22
Using cached sseclient-0.0.22-py3-none-any.whl
Collecting aiortc==1.3.2
Using cached aiortc-1.3.2.tar.gz (1.2 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r /server/volume/plugins/@scrypted/arlo/pythonpython3.9-Linux-armv7l/requirements.txt (line 4)) (2.25.1)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from sseclient==0.0.22->-r /server/volume/plugins/@scrypted/arlo/pythonpython3.9-Linux-armv7l/requirements.txt (line 2)) (1.16.0)
Collecting aioice<0.8.0,>=0.7.5
Using cached aioice-0.7.6-py3-none-any.whl (23 kB)
Collecting av<10.0.0,>=9.0.0
Using cached av-9.2.0-cp39-cp39-linux_armv7l.whl
Collecting google-crc32c>=1.1
Using cached google_crc32c-1.5.0-py3-none-any.whl
Collecting cffi>=1.0.0
Using cached cffi-1.15.1.tar.gz (508 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting pyee>=9.0.0
Using cached pyee-9.0.4-py2.py3-none-any.whl (14 kB)
Collecting pylibsrtp>=0.5.6
Using cached pylibsrtp-0.7.1.tar.gz (10 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting cryptography>=2.2
Using cached cryptography-38.0.4.tar.gz (599 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting netifaces
Using cached netifaces-0.11.0-cp39-cp39-linux_armv7l.whl
Collecting dnspython>=2.0.0
Using cached dnspython-2.2.1-py3-none-any.whl (269 kB)
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.9/dist-packages (from pyee>=9.0.0->aiortc==1.3.2->-r /server/volume/plugins/@scrypted/arlo/pythonpython3.9-Linux-armv7l/requirements.txt (line 3)) (4.4.0)
Building wheels for collected packages: aiortc, cryptography, pylibsrtp
Building wheel for aiortc (pyproject.toml): started
Building wheel for aiortc (pyproject.toml): finished with status 'done'
Created wheel for aiortc: filename=aiortc-1.3.2-cp39-cp39-linux_armv7l.whl size=131951 sha256=e9bf084fcf4a472b8e2f120f029d3b5c4ca81240d4603d159bcd518c726fc727
Stored in directory: /root/.cache/pip/wheels/d1/04/da/30ae77f3b7ad2f2b549fe7f3a70f19b8a9e873392a52ca3c6f
Building wheel for cryptography (pyproject.toml): started
Building wheel for cryptography (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

× Building wheel for cryptography (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [191 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-39
creating build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/init.py -> build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/about.py -> build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/fernet.py -> build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/exceptions.py -> build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/utils.py -> build/lib.linux-armv7l-cpython-39/cryptography
creating build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/base.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/general_name.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/extensions.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/name.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/oid.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/ocsp.py -> build/lib.linux-armv7l-cpython-39/cryptography/x509
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat
copying src/cryptography/hazmat/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/types.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/init.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '' found under directory 'vectors'
warning: no previously-included files matching '
' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'mypy.ini'
warning: no previously-included files matching '*' found under directory '.circleci'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
/tmp/pip-build-env-ti8x3kl8/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'cryptography.hazmat.bindings._rust' as data is deprecated, please list it in packages.
!!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
  
      'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
  
      Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
  
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
  
  
  !!
  
    check.warn(importable)
  copying src/cryptography/py.typed -> build/lib.linux-armv7l-cpython-39/cryptography
  copying src/cryptography/hazmat/bindings/_openssl.pyi -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings
  creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
  running build_ext
  running build_rust
  
      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
      2) Read https://cryptography.io/en/latest/installation/ for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq/
      4) Ensure you have a recent Rust toolchain installed:
         https://cryptography.io/en/latest/installation/#rust
  
      Python: 3.9.2
      platform: Linux-5.15.76-v7l+-armv7l-with-glibc2.31
      pip: n/a
      setuptools: 65.6.3
      setuptools_rust: 1.5.2
      rustc: n/a
      =============================DEBUG ASSISTANCE=============================
  
  error: can't find Rust compiler
  
  If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
  
  To update pip, run:
  
      pip install --upgrade pip
  
  and then retry package installation.
  
  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
  
  This package requires Rust >=1.48.0.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Building wheel for pylibsrtp (pyproject.toml): started
Building wheel for pylibsrtp (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error

× Building wheel for pylibsrtp (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-39
creating build/lib.linux-armv7l-cpython-39/pylibsrtp
copying src/pylibsrtp/about.py -> build/lib.linux-armv7l-cpython-39/pylibsrtp
copying src/pylibsrtp/init.py -> build/lib.linux-armv7l-cpython-39/pylibsrtp
copying src/pylibsrtp/py.typed -> build/lib.linux-armv7l-cpython-39/pylibsrtp
running build_ext
generating cffi module 'build/temp.linux-armv7l-cpython-39/pylibsrtp._binding.c'
creating build/temp.linux-armv7l-cpython-39
building 'pylibsrtp._binding' extension
creating build/temp.linux-armv7l-cpython-39/build
creating build/temp.linux-armv7l-cpython-39/build/temp.linux-armv7l-cpython-39
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.9 -c build/temp.linux-armv7l-cpython-39/pylibsrtp._binding.c -o build/temp.linux-armv7l-cpython-39/build/temp.linux-armv7l-cpython-39/pylibsrtp._binding.o
build/temp.linux-armv7l-cpython-39/pylibsrtp._binding.c:569:10: fatal error: srtp2/srtp.h: No such file or directory
569 | #include <srtp2/srtp.h>
| ^~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pylibsrtp
Successfully built aiortc
Failed to build cryptography pylibsrtp
ERROR: Could not build wheels for cryptography, pylibsrtp, which is required to install pyproject.toml-based projects
pip install result 1
Screenshot 2022-12-26 at 11 31 27

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 26, 2022 via email

@koush
Copy link
Owner

koush commented Dec 27, 2022

Before we go further down this path, I should say that I'm not too keen on adding all these dependencies to the Scrypted image. My intuition thinks this will become (and already is) a support headache on arm7 and other platforms (Mac and windows haven't been looked at yet), as OS, python, and aiortc versions get bumped.
Is libav a hard dependency in aiortc? Or is it only used/loaded when transcoding is necessary? You had said its as a convenience function. If it's a hard dependency, I'd consider seeing if you can monkey patch libav dependency out at runtime (so it doesn't fail to load) and then use ffmpeg instead for the rtp packet generation.
FFmpeg -> rtp is the method I use throughout scrypted and is quite reliable. There are prebuilt static binaries provided on every platform/arch. And also why the the MediaObjects are convertible to FFmpeg input arguments. This also allows users to build/provide their own ffmpeg via an environment variable.

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 27, 2022 via email

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 27, 2022 via email

@koush
Copy link
Owner

koush commented Dec 27, 2022

I've found that aiortc itself also has a binary dependency, so if we're targeting no extra local libraries then I'll go back to the drawing board and find another library to replace aiortc.

I'll investigate the webrtc plugin issues further at some point, if there's a way to conditionally use talkback without breaking existing installs (seems unlikely since pip will fail), could try that. Does requirements.txt support optional dependencies?

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 27, 2022

From some initial hacking I'm able to get several of aiortc's binary dependencies mocked out, though this requires we pin to my fork of aiortc. The only one remaining that looks to be in-use is cryptography, which requires cffi to compile against local OpenSSL since none of the cryptography versions provide armv7l wheels. That particular compilation works fine on my armv7l pi while running in the scrypted container without any extra apt packages. Since that dependency is very version-permissive, I'm going to pin armv7l to one that builds without a Rust compiler, and pull in the latest for all other platforms (since there are many more wheels available for the latest).

Next I'll take a look at using system ffmpeg to generate the rtp packets.

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 27, 2022

Spent a little bit of time researching what it'll take to get things working with aiortc. It looks like there's some very tight coupling with PyAV (e.g. how MediaStreamTracks manipulate data), and code paths that are expecting binary-compiled audio codecs (e.g. opus). One option is to go in and reimplement all the referenced PyAV internals, but at this point I'm not sure if it's worth the extra hackery to get it working.

@koush
Copy link
Owner

koush commented Dec 27, 2022

Yes, this all rings a bell from my initial implementation of webrtc (which used aiortc). I think I ended up bypassing the encoders somehow via a monkey patch to some internal state that allowed me to feed it packets directly. This was a while ago though, so I can't recall exactly what I did. Let me see if I still have that prototype.

@koush
Copy link
Owner

koush commented Dec 27, 2022

Found it:

https://gist.github.com/koush/81c9972de021bbb8c78112de9c3744f0#file-dummy-py-L180

I created dummy tracks with monkey patched pass through encoder.

At the time, this worked on armv7 too. I think because the requirements.txt is/was late bind.

@bjia56
Copy link
Collaborator Author

bjia56 commented Dec 27, 2022

Cool, I'll take a closer look at that gist and see if I can put something together as a short term solution. Am also thinking that longer term it's worth rewriting arlo plugin in TypeScript. I think I have a good understanding of how arlo's messaging works nowadays to do that.

@koush
Copy link
Owner

koush commented Dec 28, 2022

Cool, I'll take a closer look at that gist and see if I can put something together as a short term solution. Am also thinking that longer term it's worth rewriting arlo plugin in TypeScript. I think I have a good understanding of how arlo's messaging works nowadays to do that.

Just when I was thinking about improving some of the python plugin support :)

I think the main issue with the rewrite would be the inability to use webrtc for 2 way audio. Everything else ought to be straightforward.

@bjia56 bjia56 marked this pull request as draft December 31, 2022 03:13
@bjia56
Copy link
Collaborator Author

bjia56 commented Jan 7, 2023

@AndrewAdventure can you please see if 0.4.4 fixes your install issue?

@AndrewAdventure
Copy link

Hi. Not using Arlo any more, moved to Ring now. Sorry but the trouble.

@bjia56 bjia56 changed the title beta: arlo talkback beta: arlo talkback (basestation only) Jan 11, 2023
@bjia56 bjia56 marked this pull request as ready for review January 11, 2023 04:21
@bjia56
Copy link
Collaborator Author

bjia56 commented Jan 11, 2023

I fixed the armv7l install issues and cleaned up the package referencing by now using a custom PyPI index I've got set up at https://bjia56.github.io/scrypted-python-wheels/ (repo at https://github.com/bjia56/scrypted-python-wheels). pip should now be able to find wheels in the new index if not present in the main PyPI.

There's some more work needed to get non-basestation arlo devices working (it'll use SIP for signaling), but I think the current progress is ready for a review/merge.

@koush koush merged commit 217007a into koush:main Jan 11, 2023
nberardi pushed a commit to nberardi/scrypted that referenced this pull request Feb 24, 2023
* initial research

* experimental

* sdp seems to work, stopIntercom is broken

* converting to separate rtc device

* standalone rtc speaker implemented but not working

* minor cleanup

* webrtc troubleshooting and improvements

* wait for sdp response before sending candidates

* logging changes, rtc troubleshooting

* use a future

* restore aiortc and run RTC in a background thread

* documentation

* documentation

* typo

* comments + simplify background coroutine calls

* simplify future

* only enable intercom for basestation cameras

* bump 0.4.0

* backward compatible headers

* bump 0.4.1

* pin cryptography to latest without rust

* monkey patch binary deps and pin cryptography for armv7l

* hacks to use ffmpeg but fails due to dependency on pylibsrtp

* revert back to 0.4.2

* 0.4.3 fix for M1 Macs

* use pre-built armv7l wheels

* publish 0.4.4

* use custom pypi index for armv7l wheels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants