MrAsterisco / homebridge-hisense-tv

A Homebridge plugin to control RemoteNow-compatible HiSense TVs.
MIT License
18 stars 8 forks source link

Can see Hisense TV but no input sources appear, cant adjust volume or change channel #21

Closed woodgieboodgie closed 2 years ago

woodgieboodgie commented 2 years ago

Describe The Bug: Television joins via Homekit nicely. Button appears, can switch TV on.

To Reproduce: Tried to disable SSL, didnt work. Added 'custom' and progressed but no inputs.

Expected behavior: Wanted to see the input sources appear

Logs: Received Python command error: Error: [2021-09-14 20:56:40,992] [INFO ] SSL context created with cert file (/home/pi/rcm_certchain_pem.cer) and private key (/home/pi/rcm_pem_privkey.pkcs8) Traceback (most recent call last): File "/usr/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv.py", line 6, in main.main() File "/usr/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 128, in main with tv: File "/usr/lib/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 137, in enter self._mqtt_client.connect(self.hostname, self.port) File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 941, in connect return self.reconnect() File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1104, in reconnect sock.do_handshake() File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:


Show your Homebridge config.json here, remove any sensitive information.
{
            "ifname": "eth0",
            "devices": [
                {
                    "id": "HiSenseTV",
                    "name": "HiSense",
                    "ipaddress": "192.168.0.197",
                    "macaddress": "removed",
                    "sslmode": "custom",
                    "sslcertificate": "/home/pi/rcm_certchain_pem.cer",
                    "sslprivatekey": "/home/pi/rcm_pem_privkey.pkcs8"
                }
            ],
            "platform": "HiSenseTV"
        }```

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Environment:**
Pi 

* **Plugin Version**:
* **Homebridge Version**: <!-- homebridge -V -->1.3.4
* **Node.js Version**: <!-- node -v -->14.6.1
* **NPM Version**: <!-- npm -v -->6.14.2
* **Operating System**: <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker / hb-service --> Raspbian

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
woodgieboodgie commented 2 years ago

Hi, have still not had any luck and using Hisense 40S4, which operates with RemoteNow native app, but I cant seem to get the TV to display a pin, and receive the error below as they havent successfully paired.

An error occurred while fetching inputs: TypeError: Cannot read property 'join' of null

MrAsterisco commented 2 years ago

@woodgieboodgie thanks for reporting this!

An error occurred while fetching inputs: TypeError: Cannot read property 'join' of null

This error is always reported when the TV and your Homebridge device aren't paired.

ConnectionResetError: [Errno 104] Connection reset by peer

This error means that the SSL certificates you're trying to use are not valid for the TV model. Unfortunately, there's not much we can do on the plugin side here. You'd have to find a way to get those certificates from the TV or the RemoteNOW app. I'd be happy to help on this quest, but I wouldn't even know where to start.

The reason why turning on works is because it uses the Wake-On-Lan magic packet, which doesn't require authentication nor SSL.

Closing as this is, unfortunately, not a plugin issue.