Closed diplix closed 6 years ago
Yeah, I discovered that, too. It should be fixed with https://github.com/JeffLIrion/homeassistant_native_firetv/commit/08b32eea024e7d998c623b067f271ad2fb31a8be and https://github.com/JeffLIrion/python-firetv/commit/b7dc1da7962369c8c54b2f6c1345ccd812df1ab9.
thanks, but still not working (not finding the custom adb-repo):
tv:~ ix$ pip install --upgrade git+git://github.com/JeffLIrion/python-firetv.git@master --target /Users/ix/.homeassistant/deps/
Collecting git+git://github.com/JeffLIrion/python-firetv.git@master
Cloning git://github.com/JeffLIrion/python-firetv.git (to revision master) to /private/var/folders/qj/5j933pm14pdg5wt3f7_2pggh0000gn/T/pip-req-build-3kybyx_s
Collecting adb==1.3.0.dev (from firetv==1.0.5.dev0)
Could not find a version that satisfies the requirement adb==1.3.0.dev (from firetv==1.0.5.dev0) (from versions: 1.1.1, 1.2.0, 1.3.0)
No matching distribution found for adb==1.3.0.dev (from firetv==1.0.5.dev0)
Are you using the most recent firetv.py file? I listed adb before firetv so that adb==1.3.0.dev is already installed when it goes to install firetv==1.0.5.dev.
now it’s the most recent version again, but still (again?) same error as initially (this is the homeassitant.log output):
2018-08-23 09:51:55 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package https://github.com/JeffLIrion/python-firetv/zipball/master#firetv==1.0.5.dev: Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/qj/5j933pm14pdg5wt3f7_2pggh0000gn/T/pip-install-rot5iwwc/M2Crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/qj/5j933pm14pdg5wt3f7_2pggh0000gn/T/pip-record-en42penv/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=" failed with error code 1 in /private/var/folders/qj/5j933pm14pdg5wt3f7_2pggh0000gn/T/pip-install-rot5iwwc/M2Crypto/
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
2018-08-23 09:51:55 ERROR (MainThread) [homeassistant.requirements] Not initializing media_player.firetv because could not install requirement https://github.com/JeffLIrion/python-firetv/zipball/master#firetv==1.0.5.dev
2018-08-23 09:51:55 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform media_player.firetv: Could not install all requirements.
although, this might be related to a m2crypto-compilation problem on os x. the firetv-related errors seem to be gone.
after installing m2crypto manually, there are no more dependency errors when starting HA. however there’s also no firetv detected. failing silently. i’ll close this and investige further later.
M2Crypto has caused setup issues for several people, myself included. And even when it gets installed, it doesn't seem to work correctly. That's why I switched over to RSA instead. The question is, why is it trying to install M2Crypto in the first place?
it seems to be a dependency of python adb or a dependency thereof.
Please try adding 'pycryptodome==3.6.6'
to the REQUIREMENTS
list in firetv.py before the firetv and adb entries and let me know if that fixes it.
ok, that seemed to have worked. however, there’s still an initialisation error in homeassistant.log
2018-08-23 12:54:47 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform firetv
Traceback (most recent call last):
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/adb/adb_protocol.py", line 226, in Unpack
cls.format, message)
struct.error: unpack requires a buffer of 24 bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/ix/.homeassistant/custom_components/media_player/firetv.py", line 53, in setup_platform
device = FireTVDevice(host, name, adbkey)
File "/Users/ix/.homeassistant/custom_components/media_player/firetv.py", line 91, in __init__
self._firetv = FireTV(host, adbkey)
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/firetv/__init__.py", line 105, in __init__
self.connect()
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/firetv/__init__.py", line 120, in connect
self._adb = adb_commands.AdbCommands().ConnectDevice(serial=self.host)
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/adb/adb_commands.py", line 142, in ConnectDevice
self._Connect(**kwargs)
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/adb/adb_commands.py", line 173, in _Connect
conn_str = self.protocol_handler.Connect(self._handle, banner=banner, **kwargs)
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/adb/adb_protocol.py", line 314, in Connect
cmd, arg0, arg1, banner = cls.Read(usb, [b'CNXN', b'AUTH'])
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/adb/adb_protocol.py", line 243, in Read
cmd, arg0, arg1, data_length, data_checksum = cls.Unpack(msg)
File "/Users/ix/.homeassistant/deps/lib/python/site-packages/adb/adb_protocol.py", line 228, in Unpack
raise ValueError('Unable to unpack ADB command.', cls.format, message, e)
ValueError: ('Unable to unpack ADB command.', b'<6I', b'', error('unpack requires a buffer of 24 bytes',))
must have been my bad, since anopther instance of fire-tv on a pi had started itself and occupied the adb. now everything seems to be working ok. tnx for your help and your component.
I added pycryptodome to the REQUIREMENTS in https://github.com/JeffLIrion/homeassistant_native_firetv/commit/c79a8717fc80f6b6dcc4d5e11375767db3edad89. Thanks for your help!
pip does not seem to like the line
install_requires=['https://github.com/JeffLIrion/python-adb/zipball/master#adb==1.3.0.dev'],