Closed dhanzseros closed 2 years ago
You need to update your python to 3.8
Hey!
I have updated it. But it does not work. The log says:
2022-05-10 23:20:52,451] [INFO ] No SSL context specified.
[2022-05-10 23:20:52,451] [INFO ] Network interface MAC Address: 78:e3:b5:fc:0a:51
Traceback (most recent call last):
File "hisensetv.py", line 6, in
Can you help me? I tried with SSL but it drops another error:
[2022-05-10 23:21:52,506] [INFO ] Unverified SSL context created.
[2022-05-10 23:21:52,506] [INFO ] Network interface MAC Address: 78:e3:b5:fc:0a:51
Traceback (most recent call last):
File "hisensetv.py", line 6, in
If your TV is new(ish) within the last 24 months it likely needs the SSL config enabled. However you need to ensure you have downloaded the certificates from herehttps://github.com/MrAsterisco/hisensetv/tree/master/cert and uploaded them to your homebridge device and then reference the path. More than likely your ssl handshake failure is due to not referencing the certificate paths, although I can't confirm that without seeing your config.
there was a bit of discussion about it in Issue #3 that we solved that might help, or given you have the same issue as Issue #28 perhaps you should start there.
Hey,
Thank you for your reply! Yes I am using cert files and enabled the SSL in the config before. I am going to read the issues you showed my above, one of them I have read already.
By the way this TV is a 2022 model. I have paired with my mobile app. And it works with Node red/MQTT connection/Homekit bridge :)
The config for this plugin: { "ifname": "enp30s0", "devices": [ { "id": "Nappali", "name": "HiSense", "ipaddress": "192.168.10.99", "macaddress": "A0:62:FB:E5:7B:44", "sslmode": "custom", "sslcertificate": "/home/hdavid/hi_keys/rcm_certchain_pem.cer", "sslprivatekey": "/home/hdavid/hi_keys/rcm_pem_privkey.pkcs8" } ], "platform": "HiSenseTV" }
Thanks!
Before you use the plugin, you’ll need to get the pin code by running this from command line
python3.8 hisensetv.py <TV_IP_ADDRESS> --authorize --ifname <NETWORK_INTERFACE_NAME> --certfile /pathtoFile --keyfile /pathtoFile
If this fails, can you change authorize to get state (two words) and post a screenshot or output from command line?
Hey,
I tried this command and it worked, the TV showed the 4 digit number, I wrote it into the plugin and no error. After that I tried to add into homekit, I have added but it does not work, it does not answer. The get state this shows:
Is it a problem the Hisense setup code is the same as my hombridge code?
And in homebridge log there is only one error line all the time: [HiSenseTV] An error occurred while fetching inputs: TypeError: Cannot read property 'join' of null
can you enable debug logging in homebridge? from settings, tick this box and restart the service
can you also confirm you've installed paho-mqtt and netifaces?
pip3 install paho-mqtt
pip3 install netifaces
I have installed this but it shows python3.5 instead of 3.8. Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.5/dist-packages
So after that I have installed with this: pip3.8 install paho-mqtt and so on... Here you can find the command lines:
root@Debian:/home/hdavid# pip3 install paho-mqtt Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.5/dist-packages root@Debian:/home/hdavid# pip3.8 install paho-mqtt Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.8/site-packages (1.6.1) WARNING: You are using pip version 19.2.3, however version 22.0.4 is available. You should consider upgrading via the 'pip install --upgrade pip' command. root@Debian:/home/hdavid# pip install --upgrade pip DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages (20.3.4) root@Debian:/home/hdavid# pip3.8 install paho-mqtt Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.8/site-packages (1.6.1) WARNING: You are using pip version 19.2.3, however version 22.0.4 is available. You should consider upgrading via the 'pip install --upgrade pip' command. root@Debian:/home/hdavid# python3 -V Python 3.5.3 root@Debian:/home/hdavid# python3.8 -V Python 3.8.2 root@Debian:/home/hdavid#
So maybe the python causes the problem?
In debug mode theres an error what it looks like: "An error occurred while connecting to TV: Error: connect EHOSTUNREACH 192.168.10.99:36669" But I can telnet into the tv without any problem...
@dhanzseros have you tried to telnet
from the same machine that's running Homebridge? Also, is Homebridge running on a different user, by any chance? Do you have a firewall turned on?
Anyway, this is not an issue of the plugin itself: for some reason, your Homebridge instance is unable to reach your TV.
Hey!
I am trying for a day to work this plugin, but I can not pair my TV with Debian. When I run this: python3.5 hisensetv.py 192.168.10.99 --authorize --ifname enp30s0 --no-ssl
TV type: Hisense 55a7gq
I always get this syntax error:
Logs:
Traceback (most recent call last): File "hisensetv.py", line 3, in
from hisensetv import main
File "/usr/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 52
f"you must be connected to call {func.name}"
^
SyntaxError: invalid syntax
Environment: