GithubHelp home page GithubHelp logo

nstrelow / ha_philips_android_tv Goto Github PK

View Code? Open in Web Editor NEW
109.0 109.0 28.0 116 KB

Home Assistant custom component for the newer (2016+) Philips Android TVs

Python 100.00%
home-automation homeassistant philips-tv tv

ha_philips_android_tv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha_philips_android_tv's Issues

Wake from sleep with favourite_channels_only: true doesn't work but wake from standby does

On my 55PUS7303/12, if I add favorite_channels_only: true, then the TV will not switch on from sleep mode, whereas it will from standby mode.

Guessing it takes some time for the TV to populate this info and we ask a little too early.

Error info:
2019-06-18 13:21:21 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.philips_55pus7703_12 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 220, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 377, in async_device_update await self.hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper result = method(*args, **kwargs) File "/config/custom_components/philips_android_tv/media_player.py", line 243, in update self._tv.update() File "/config/custom_components/philips_android_tv/media_player.py", line 342, in update self.get_favorite_channels() File "/config/custom_components/philips_android_tv/media_player.py", line 416, in get_favorite_channels _LOGGER.warn("Favorites not supported for this TV", path) NameError: name 'path' is not defined

Tv state idle

Hi.
Is there chance to get state "on" when using netflix? It's always idle.

Entity does not go in Off state when turned off

From the latest update on this integration my Philips 32PFS6402/12 does not show "Off" state:

image

The TV turns off and on from home assistant but when turned off it does show only "unavailable" state. Before it was working correctly.

[Request] Read current Active Application or Source/Input used?

Would it be possible to read the current application or source/input being used by the (Android) TV?
Currently it shows only TV/Radio channels but not the source/input or application like Netflix/YouTube being used/played.

I would like to trigger actions based on the current application/source/input but that seems not possible?

0.110 Beta - Warning message

In case you weren't already aware of changes being made in future releases, I get a warning in the logs: "2020-05-19 08:58:49 WARNING (MainThread) [homeassistant.components.media_player] MediaPlayerDevice is deprecated, modify PhilipsTV to extend MediaPlayerEntity"
Appreciate it's only a warning not an error, so this is more of an FYI than an issue (at the moment :) )

Cannot pair the TV... Sh**load of errormessages

I'm trying to pair my 65PUS6412 TV thru Windows 10.
Installed Python 3.9 (latest version) and MS Visual studio build tools 2019
When I open de command prompt and execute the command : pip3 install -r requirements.txt, this is whats reported (mostly red).
Can someone help me?

C:\philips>pip3 install -r requirements.txt
Collecting pycrypto==2.6.1
Using cached pycrypto-2.6.1.tar.gz (446 kB)
Collecting requests==2.13.0
Using cached requests-2.13.0-py2.py3-none-any.whl (584 kB)
Using legacy 'setup.py install' for pycrypto, since package 'wheel' is not installed.
Installing collected packages: pycrypto, requests
Running setup.py install for pycrypto ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\jeffr\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Jeffr\AppData\Local\Temp\pip-install-kc4xmecc\pycrypto\setup.py'"'"'; file='"'"'C:\Users\Jeffr\AppData\Local\Temp\pip-install-kc4xmecc\pycrypto\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Jeffr\AppData\Local\Temp\pip-record-lgo3gm3g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jeffr\appdata\local\programs\python\python39\Include\pycrypto'
cwd: C:\Users\Jeffr\AppData\Local\Temp\pip-install-kc4xmecc\pycrypto
Complete output (183 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\Crypto
copying lib\Crypto\pct_warnings.py -> build\lib.win-amd64-3.9\Crypto
copying lib\Crypto_init_.py -> build\lib.win-amd64-3.9\Crypto
creating build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\hashalgo.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\HMAC.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\MD2.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\MD4.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\MD5.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\RIPEMD.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\SHA.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\SHA224.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\SHA256.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\SHA384.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash\SHA512.py -> build\lib.win-amd64-3.9\Crypto\Hash
copying lib\Crypto\Hash_init_.py -> build\lib.win-amd64-3.9\Crypto\Hash
creating build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\AES.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\ARC2.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\ARC4.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\blockalgo.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\Blowfish.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\CAST.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\DES.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\DES3.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_OAEP.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\PKCS1_v1_5.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher\XOR.py -> build\lib.win-amd64-3.9\Crypto\Cipher
copying lib\Crypto\Cipher_init_.py -> build\lib.win-amd64-3.9\Crypto\Cipher
creating build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\asn1.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\Counter.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\number.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\py3compat.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\randpool.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\RFC1751.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util\winrandom.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util_number_new.py -> build\lib.win-amd64-3.9\Crypto\Util
copying lib\Crypto\Util_init_.py -> build\lib.win-amd64-3.9\Crypto\Util
creating build\lib.win-amd64-3.9\Crypto\Random
copying lib\Crypto\Random\random.py -> build\lib.win-amd64-3.9\Crypto\Random
copying lib\Crypto\Random_UserFriendlyRNG.py -> build\lib.win-amd64-3.9\Crypto\Random
copying lib\Crypto\Random_init_.py -> build\lib.win-amd64-3.9\Crypto\Random
creating build\lib.win-amd64-3.9\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaAccumulator.py -> build\lib.win-amd64-3.9\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\FortunaGenerator.py -> build\lib.win-amd64-3.9\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna\SHAd256.py -> build\lib.win-amd64-3.9\Crypto\Random\Fortuna
copying lib\Crypto\Random\Fortuna_init_.py -> build\lib.win-amd64-3.9\Crypto\Random\Fortuna
creating build\lib.win-amd64-3.9\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\fallback.py -> build\lib.win-amd64-3.9\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\nt.py -> build\lib.win-amd64-3.9\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\posix.py -> build\lib.win-amd64-3.9\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG\rng_base.py -> build\lib.win-amd64-3.9\Crypto\Random\OSRNG
copying lib\Crypto\Random\OSRNG_init_.py -> build\lib.win-amd64-3.9\Crypto\Random\OSRNG
creating build\lib.win-amd64-3.9\Crypto\SelfTest
copying lib\Crypto\SelfTest\st_common.py -> build\lib.win-amd64-3.9\Crypto\SelfTest
copying lib\Crypto\SelfTest_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\common.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_AES.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC2.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_ARC4.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_Blowfish.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_CAST.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_DES3.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_15.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_pkcs1_oaep.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher\test_XOR.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
copying lib\Crypto\SelfTest\Cipher_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Cipher
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\common.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_HMAC.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD2.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD4.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_MD5.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_RIPEMD.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA224.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA256.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA384.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash\test_SHA512.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
copying lib\Crypto\SelfTest\Hash_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Hash
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_AllOrNothing.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_chaffing.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_KDF.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol\test_rfc1751.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Protocol
copying lib\Crypto\SelfTest\Protocol_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Protocol
creating build\lib.win-amd64-3.9\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_DSA.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_ElGamal.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_importKey.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey\test_RSA.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\PublicKey
copying lib\Crypto\SelfTest\PublicKey_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\PublicKey
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_random.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test_rpoolcompat.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random\test__UserFriendlyRNG.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random
copying lib\Crypto\SelfTest\Random_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaAccumulator.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_FortunaGenerator.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\Fortuna
copying lib\Crypto\SelfTest\Random\Fortuna\test_SHAd256.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\Fortuna copying lib\Crypto\SelfTest\Random\Fortuna_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\Fortuna
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_fallback.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_generic.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_nt.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_posix.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG\test_winrandom.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
copying lib\Crypto\SelfTest\Random\OSRNG_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Random\OSRNG
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_asn1.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_Counter.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_number.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util\test_winrandom.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Util
copying lib\Crypto\SelfTest\Util_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Util
creating build\lib.win-amd64-3.9\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_15.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature\test_pkcs1_pss.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Signature
copying lib\Crypto\SelfTest\Signature_init_.py -> build\lib.win-amd64-3.9\Crypto\SelfTest\Signature
creating build\lib.win-amd64-3.9\Crypto\Protocol
copying lib\Crypto\Protocol\AllOrNothing.py -> build\lib.win-amd64-3.9\Crypto\Protocol
copying lib\Crypto\Protocol\Chaffing.py -> build\lib.win-amd64-3.9\Crypto\Protocol
copying lib\Crypto\Protocol\KDF.py -> build\lib.win-amd64-3.9\Crypto\Protocol
copying lib\Crypto\Protocol_init_.py -> build\lib.win-amd64-3.9\Crypto\Protocol
creating build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey\DSA.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey\ElGamal.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey\pubkey.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey\RSA.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey_DSA.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey_RSA.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey_slowmath.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
copying lib\Crypto\PublicKey_init_.py -> build\lib.win-amd64-3.9\Crypto\PublicKey
creating build\lib.win-amd64-3.9\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_PSS.py -> build\lib.win-amd64-3.9\Crypto\Signature
copying lib\Crypto\Signature\PKCS1_v1_5.py -> build\lib.win-amd64-3.9\Crypto\Signature
copying lib\Crypto\Signature_init_.py -> build\lib.win-amd64-3.9\Crypto\Signature
Skipping optional fixer: buffer
Skipping optional fixer: idioms
Skipping optional fixer: set_literal
Skipping optional fixer: ws_comma
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -Ic:\users\jeffr\appdata\local\programs\python\python39\include -Ic:\users\jeffr\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcsrc/winrand.c /Fobuild\temp.win-amd64-3.9\Release\src/winrand.obj
winrand.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier 'intmax_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(28): error C2061: syntax error: identifier 'rem'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(28): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(29): error C2059: syntax error: '}'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(31): error C2061: syntax error: identifier 'imaxdiv_t'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(31): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(41): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(42): error C2146: syntax error: missing ')' before identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(42): error C2061: syntax error: identifier '_Number'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(42): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(43): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(46): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2146: syntax error: missing ')' before identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2061: syntax error: identifier '_Numerator'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2059: syntax error: ';'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(47): error C2059: syntax error: ','
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(49): error C2059: syntax error: ')'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(51): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(57): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(64): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(70): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(77): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(83): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(90): error C2143: syntax error: missing '{' before '__cdecl'
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\inttypes.h(96): error C2143: syntax error: missing '{' before '__cdecl'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\jeffr\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Jeffr\AppData\Local\Temp\pip-install-kc4xmecc\pycrypto\setup.py'"'"'; file='"'"'C:\Users\Jeffr\AppData\Local\Temp\pip-install-kc4xmecc\pycrypto\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Jeffr\AppData\Local\Temp\pip-record-lgo3gm3g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\jeffr\appdata\local\programs\python\python39\Include\pycrypto' Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the 'c:\users\jeffr\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.

Tests mit neuer FAV-Option

File "/config/custom_components/philips_android_tv/media_player.py", line 45, in
DEFAULT_FAV = false
NameError: name 'false' is not defined

ImportError: cannot import name 'MediaPlayerEntity'

Hi

After update, component doesn't work with Home Assistant 0.109.6...
Is there a simple way to make it work again?

Thanks

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 777, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 279, in get_platform
f"{self.pkg_path}.{platform_name}"
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/philips_android_tv/media_player.py", line 9, in
from homeassistant.components.media_player import (
ImportError: cannot import name 'MediaPlayerEntity' from 'homeassistant.components.media_player' (/usr/src/homeassistant/homeassistant/components/media_player/init.py)

I have a error pycrypto

Hello

I am trying to install this integration and when I write "pip3 install -r requirements.txt" it appear this error

ERROR: homeassistant-cli 0.9.1 has requirement requests<3,>=2.22.0, but you'll have requests 2.13.0 which is incompatible.

What can I do?

Thanks

Sources not available

Sources like HDMI are not available to switch to. I can see all Channels and all installed Apps. I have the 43PUS6412.

Please let me know if any more information is needed or how I can resolve this issue.

Make compatibility database of TVs

I imagine a database of TV models, where we note which APIs work and which don't.

And also gather /system calls from different (and same models). Maybe we can derive what functions are available and and disable certain unsupported API calls.

To better gather data of many TVs, it would be useful to have a website one can add his /system call, and which functions do not work.

Select Source not working anymore

HI All,

i have a button with the following.

- color: auto color_type: card icon: 'mdi:netflix' name: Netflix tap_action: action: call-service service: media_player.select_source service_data: entity_id: media_player.tv source: Netflix type: 'custom:button-card'

but this doesnt seem to work anymore, when i select netflix from within the media control card this is working fine.

I am also not able to select the source when going to developer tools -> services.

so i am confused if this ever worked, or hasnt worked at all.

Thanks.

doesn't install from HACS

So it appears in the store, but on INSTALL it onlys says : "Starting installation" in the logs, and nothing more, no other error displayed, but it's not installing further, nothing added in custom_components, and still the "INSTALL" available from hacs

Integration will stop working with home assistant 2021.6

From logs:

No 'version' key in the manifest file for custom integration 'philips_android_tv'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'philips_android_tv'

Feature request: send any key

Someone found a list of supported commands https://community.home-assistant.io/t/philips-android-tv-component/17749/12

Standby
Back
Find
RedColour
GreenColour
YellowColour
BlueColour
Home
VolumeUp
VolumeDown
Mute
Options
Dot
Digit0
Digit1
Digit2
Digit3
Digit4
Digit5
Digit6
Digit7
Digit8
Digit9
Info
CursorUp
CursorDown
CursorLeft
CursorRight
Confirm
Next
Previous
Adjust
WatchTV
Viewmode
Teletext
Subtitle
ChannelStepUp
ChannelStepDown
Source
AmbilightOnOff
PlayPause
Pause
FastForward
Stop
Rewind
Record
Online

(EDIT: some other project seems to maintain a list of commands: https://github.com/eslavnov/pylips/blob/master/available_commands.json )

I see this ha_philips_android_tv custom component has a send_key method. Would it be possible to expose this method as a service with a string parameter? Or as a list of strings (so the buttons would be sent in sequence)? Then this component could be used together with a custom lovelace card, such as https://github.com/marrobHD/tv-card

How to open udp port 1925?

I have model 55pus7956/60. But port 1925(1926) closed.
Does this model not compatible with HA? Or is there an alternative solution?

Sorry for stupid questions)

Installation

The installation steps here does not make any sense.
This is also rendered in HACS.

I will remove this repository from HACS if the README are not reworked.

Two feature requests (Disable emoji's and HDMI source)

Hello, first of all thanks for your time and effort in this plug-in, it works great.

I would like to request two features:

  • Possibility to disable emoji's and just show "on", "off", "unavailable".
  • When you're using a HDMI port of the TV, it show's "N/A - N/A". It would be great if there was HDMI support (so that it shows HDMI1 instead of N/A), with also the possibility to change the HDMI input source.

Thanks in advance.

Error in 2021.3 version of HA

After installing Home Assistant 2021.3, I get the following error:
WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'philips_android_tv'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'philips_android_tv'

Could this be fixed?

Can't get tv source and playing status

I'd like to migrate from androidtv integration to ha_philips_android_tv to be closest to my 50PUS7354. So I install the ha_plilips_android_tv via HACS and add this the configuration below :

- platform: philips_android_tv
  name: Télé 2
  host: !secret philips_tv
  mac: !secret philips_tv_mac
  username: !secret philips_tv_username
  password: !secret philips_tv_password

After restarting, it looks like the integration can't update tv informations (source, play_status) and then all conditional actions not working as expected (play/pause/next_track/previous_track). No informations in logs...

This is the result when I'm playing media :

First lovelace's card show my TV with androidtv integration and second show the same TV with philips_android_tv integration

Capture d’écran 2021-01-26 à 15 46 57

Current status : on | Expected status : playing
Current source : 📺 N/A | Expected status : 📱 YouTube

Capture d’écran 2021-01-26 à 15 46 57

Only changing volume working like a charm.

Stop calls to unsupported APIs after they failed a number of times

Currently some TVs just do not support certain functions.

With the newest changes, we catch the JSON errors and log to the code.

Even better would be to stop calling the API alltogether after it failed a number of times.

Best example is issue #15 , where /channeldb/tv/channelLists/all apparently throws an internal server error. It would be good to avoid those repeated calls to a non working API route.

Even better would be a compatability matrix of TVs and functions.

cannot import name 'MediaPlayerEntity'`

When I configure philips_android_tv and restart the HASS server I get this error:

from homeassistant.components.media_player import (ImportError: cannot import name 'MediaPlayerEntity'

I'm running Home Assistant 0.103.6

Any help?

PUS7304 -The one- doesn't properly report state

Stealing the error mentioned in the feature request topic since I have the same issue.

I use the Philips Andoid TV component with a Philips PUS7304. Nearly everything works smoothly except detection of the ON and OFF state of the TV. While the TV is actually OFF, this is detected properly in Home Assistant.

However, when the TV is ON, there is some fluctuation between ON and OFF - see screenshot

160878dfc6df82088f09f68e295196a04287e5d4

even though the TV is ON continuously.

Moreover, it seems that whenever the TV state erroneously is detected as OFF there is also an error in the log file - see below.

2020-01-30 21:35:54 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 811, in state_attributes
    for attr in ATTR_TO_PROPERTY
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 812, in <dictcomp>
    if getattr(self, attr) is not None
  File "/home/homeassistant/.homeassistant/custom_components/philips_android_tv/media_player.py", line 125, in volume_level
    return self._volume / self._max_volume
TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'

One of the things I want to do by including the TV into Home Assistant is an automation that automatically dims the room when the TV is playing, i.e. ON, and returns the room to regular brightness when the TV is switched OFF. With the intermittent ON and OFF states my Lights continuously change their brightness level.

Any advice is much appreciated.

I don't see the logs above. But I see these errors:

[TV Living room:8009] Failed to connect to service TPM191E-4786f0000cca2e260ea85bad5a5ebe88._googlecast._tcp.local., retrying in 5.0s
7:34 PM /usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py (ERROR)
[TV Living room:8009] Error communicating with socket, resetting connection
7:34 PM /usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py (WARNING)
[TV Living room:8009] Error reading from socket.
7:34 PM /usr/local/lib/python3.7/site-packages/pychromecast/socket_client.py (ERROR)

This is what I see in Lovelace when watching Netflix
image

image

State doesn't change en some errors

Hello,

I get this error, and it`s not possible to get a state. I use my tv only with Chromecast and don't use the television options. In a previous version (don't know exactly which version) everything did work.

Update for media_player.philips_tv fails
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
await self.async_device_update()
File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 377, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/util/init.py", line 224, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/philips_android_tv/media_player.py", line 244, in update
self._tv.update()
File "/config/custom_components/philips_android_tv/media_player.py", line 336, in update
self.get_channels()
File "/config/custom_components/philips_android_tv/media_player.py", line 379, in get_channels
r = self._get_req('channeldb/tv/channelLists/all')
File "/config/custom_components/philips_android_tv/media_player.py", line 302, in _get_req
return json.loads(resp.text)
File "/usr/local/lib/python3.7/json/init.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

State doesn't change in on or of

Since updating the file mediaplayer.py the state of my TV won't change anymore.
Do more people have that issue?

Regards,

Djordy

Login attempt failed notification from the TV

Hi and thank you for developing the plugin. It doesn't work very well for me, but the Philips' mobile app doesn't work well for me either. I have 49pus7181 2016 Android TV and I am using the latest version of hass.io. My hassio instance is working behind an apache reverse proxy with https certificate and FQDN but access through the local ip 192.168.x.x is also possible. I have also two factor authentication enabled.

The problem that I am experiencing are constant notifications from home assistant with the following text

Login attempt failed
Login attempt or request with invalid authentication from 192.168.3.122

The IP is the IP of my TV and I get these notifications every few minutes only when the TV is turned on.

Do you have any idea what is happening?

Connection refused

I'm not able to get a username/password :(
I installed the reqs on my mac. I'm trying it in a Philips 65pus6121

Do you have any idea or pointing direction? Is there something missing on my TV? I have EasyLink disabled.

Starting pairing request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/util/connection.py", line 83, in create_connection
    raise err
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 284, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connection.py", line 150, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10f213d50>: Failed to establish a new connection: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/connectionpool.py", line 649, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.7/site-packages/requests/packages/urllib3/util/retry.py", line 376, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.178.12', port=1926): Max retries exceeded with url: /6/pair/request (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10f213d50>: Failed to establish a new connection: [Errno 61] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "philips.py", line 123, in <module>
    main()
  File "philips.py", line 90, in main
    pair(config)
  File "philips.py", line 41, in pair
    r = requests.post("https://" + config['address'] + ":1926/6/pair/request", json=data, verify=False)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 110, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.178.12', port=1926): Max retries exceeded with url: /6/pair/request (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10f213d50>: Failed to establish a new connection: [Errno 61] Connection refused'))

Request: Scope channel list by favoriteList?

I'm using this component with some success but there is one thing that annoys me:
In sources, it lists all TV/radio channels the TV receives. As I don't subscribe to payTV channels and don't watch a lot of other channels, I have created a favorite list on the TV that scopes this down to something like 48 channels out of 434 total.

The full TV channel list with the channel names get's pulled via https://tvip:1926/6/channeldb/tv/channelLists/all and the favorite list can be gotten via https://tvip:1926/6/channeldb/tv/favoriteLists/1 - unfortunately the favoriteLists/1 API endpoint only contains the ccid and preset and not the channel name.

As I'm unfortunately not a developer, I'm asking if it would be possible to extend the custom component to (optionally) scope the sources list down to only those channels (match via ccid) that are part of a favorite list (= favoriteLists/1 or optionally configure # of favoriteLists and iterate through /2, ... /x).

Thank you!

Didn't know where else to put it so I created an "issue". Thank you for this beautiful component! Works perfectly with my 2018 Philips TV!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.