MrAsterisco / homebridge-hisense-tv

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

SSL handshake error on u9g #26

Closed gjlamb closed 4 months ago

gjlamb commented 2 years ago

I'm by no means an experienced linux user but have been trying to get my new tv connected for a few hours to no avail.

Log 30/12/2021, 12:45:06 pmHisense Tv Remotenow BridgeHiSenseTVERRORAn error occurred while fetching inputs: TypeError: Cannot read properties of null (reading 'join')

Hoobs/Homebridge installed on Raspberry Pi4 Can't connect to set nossl hoobs@hoobs:/usr/local/bin $ hisensetv 192.168.0.42 --no-ssl Traceback (most recent call last): File "/usr/local/bin/hisensetv", line 10, in sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/hisensetv/main.py", line 108, in main with tv: File "/usr/local/lib/python3.7/dist-packages/hisensetv/init.py", line 125, in enter raise HisenseTvTimeoutError(f"failed to connect in {self.timeout:.3f}s") hisensetv.HisenseTvTimeoutError: failed to connect in 10.000s

Same handshake failure when using the Hisense cmd and via python

hoobs@hoobs:/usr/local/bin $ hisensetv 192.168.0.42 --authorize Traceback (most recent call last): File "/usr/local/bin/hisensetv", line 10, in sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/hisensetv/main.py", line 108, in main with tv: File "/usr/local/lib/python3.7/dist-packages/hisensetv/init.py", line 117, in enter self._mqtt_client.connect(self.hostname, self.port) File "/home/hoobs/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/home/hoobs/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1073, in reconnect sock.do_handshake() File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)

hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.7 hisensetv.py 192.168.0.42 --authorize --ifname wlan0 [2021-12-30 12:53:43,538] [INFO ] Unverified SSL context created. Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 128, in main with tv: File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 137, in enter self._mqtt_client.connect(self.hostname, self.port) File "/home/hoobs/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/home/hoobs/.local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1073, in reconnect sock.do_handshake() File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1056)

hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.7 hisensetv.py 192.168.0.42 --authorize --ifname wlan0 --no-ssl [2021-12-30 12:54:24,480] [INFO ] No SSL context specified. Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 128, in main with tv: File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 145, in enter raise HisenseTvTimeoutError(f"failed to connect in {self.timeout:.3f}s") hisensetv.HisenseTvTimeoutError: failed to connect in 10.000s

gjlamb commented 2 years ago

Managed to get python3.8 and pip running and still getting ssl error

hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.8 hisensetv.py 192.168.0.42 --authorize --ifname wlan0 [2021-12-30 17:36:19,607] [INFO ] Unverified SSL context created. Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 128, in main with tv: File "/var/lib/hoobs/hisensetvremotenowbridge/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.8/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1073, in reconnect sock.do_handshake() File "/usr/local/lib/python3.8/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1123)

gjlamb commented 2 years ago

I've reset my TV to factory settings as I was having other issues with juddering. Tried setting up again getting a few different results. Still get ssl handshake error as above with same command.

Tried --no-ssl and received below. hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.8 hisensetv.py 192.168.0.42 --authorize --ifname wlan0 --no-ssl [2022-01-02 14:33:27,329] [INFO ] No SSL context specified. Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 128, in main with tv: File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/init.py", line 145, in enter raise HisenseTvTimeoutError(f"failed to connect in {self.timeout:.3f}s") hisensetv.HisenseTvTimeoutError: failed to connect in 10.000s

Tried from my terminal app on my iPad, exactly same command but different result. Still ssh to home bridge/hoobs Raspberry Pi 2022-01-02 14:34:23,624] [INFO ] Unverified SSL context created. Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 128, in main with tv: File "/var/lib/hoobs/hisensetvremotenowbridge/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.8/site-packages/paho/mqtt/client.py", line 914, in connect return self.reconnect() File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source) File "/usr/local/lib/python3.8/socket.py", line 787, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

gjlamb commented 2 years ago

FYI Hisense RemoteView app works fine with the tv.

gjlamb commented 2 years ago

Tried keys from https://github.com/d3nd3/Hisense-mqtt-keyfiles Got the following error. I’m able to use these keys and mqtt explorer to connect to TV

hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ python hisensetv.py 192.168.0.42 --authorize --ifname wlan0 --certfile /home/hoobs/hisense/certs/cert.cer --keyfile /home/hoobs/hisense/certs/key.pkcs8 -v Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 119, in main ssl_context.load_cert_chain(certfile=args.certfile, keyfile=args.keyfile) ssl.SSLError: [SSL] PEM lib (_ssl.c:3824)

MrAsterisco commented 2 years ago

Hey @gjlamb ! Thanks for all the detailed logs.

Looking at the last one, it seems like the Python SSL library is unable to read the keys you specified. The error ssl.SSLError: [SSL] PEM lib (_ssl.c:3824) seems to be related to a wrong private key provided (see this StackOverflow question). Could you please double-check that all files are in the correct path and format and have read permissions for the user that is running Homebridge?

Unfortunately, as I reported multiple times on this repo, when I built this plugin I didn't know what Hoobs was. I discovered it while trying to debug a few issues that arose while trying to use this plugin with it... But I still don't have one and I can't really debug the plugin on it.

I'm happy to help you debugging this as much as I can, of course, but you'll have to get your hands dirty, unfortunately.

gjlamb commented 2 years ago

I had my fingers crossed so hard for it to be that simple.

hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ chmod 777 /tmp/cert.cer hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ chmod 777 /tmp/key.pkcs8 hoobs@hoobs:/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin $ python3.8 hisensetv.py 192.168.0.42 --authorize --ifname wlan0 --certfile /tmp/cert.cer --keyfile /tmp/key.pkcs8 Traceback (most recent call last): File "hisensetv.py", line 6, in main.main() File "/var/lib/hoobs/hisensetvremotenowbridge/node_modules/homebridge-hisense-tv-remotenow/bin/hisensetv/main.py", line 119, in main ssl_context.load_cert_chain(certfile=args.certfile, keyfile=args.keyfile) ssl.SSLError: [SSL] PEM lib (_ssl.c:4022)

The cert and key I’m using works with mqtt explorer. It should be fine to user here with the python script shouldn’t they? They are not the certs from the tv

gjlamb commented 2 years ago

Not sure if these python scripts require actual certs from the tv or not? As mentioned, I got some certs from GitHub that seem to connect fine with MQTT-Explorer to the tv. Would it be the same case for your (and newAM) python scripts to require certificates from the TV? certificates retrieved from openssl s_client -host 192.168.0.42 -port 36669 -prexit -showcerts

ryanshand commented 2 years ago

No, I didn’t need them from the TV

Sent from my iPhone

On 5 Jan 2022, at 1:36 pm, gjlamb @.***> wrote:

 Not sure if these python scripts require actual certs from the tv or not? As mentioned, I got some certs from GitHub that seem to connect fine with MQTT-Explorer to the tv. Would it be the same case for your (and newAM) python scripts to require certificates from the TV? certificates retrieved from openssl s_client -host 192.168.0.42 -port 36669 -prexit -showcerts

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.

gjlamb commented 2 years ago

No, I didn’t need them from the TV

Prob something different with my model then. Can’t understand why certs work in MQTT-Explorer but not on scripts

MrAsterisco commented 2 years ago

@gjlamb Hey there, I'm a bit confused on this sentence:

They are not the certs from the tv

There should only be a pair of valid certificates that work with the TV. So technically, the ones that come with the TV should be the right ones. MQTT Explorer sometimes shows that it's connected, even when it's not... Have you actually checked if you can receive information on the TV state with MQTT Explorer?

gjlamb commented 2 years ago

I can use MQTT explorer to get states from the TV

I use the certs from the GitHub repo Hisense-mqtt-keyfiles. The TV certs I mention are certificate information from running openssl s_client -host 192.168.0.42 -port 36669 -prexit -showcerts and there are 2 sets of 2 (same) certificates in the output.

On 17 Jan 2022, at 8:47 pm, Alessio Moiso @.***> wrote:

 @gjlamb Hey there, I'm a bit confused on this sentence:

They are not the certs from the tv

There should only be a pair of valid certificates that work with the TV. So technically, the ones that come with the TV should be the right ones. MQTT Explorer sometimes shows that it's connected, even when it's not... Have you actually checked if you can receive information on the TV state with MQTT Explorer?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

gjlamb commented 2 years ago

One thing I notice with MQTT Explorer is that I need to disable validate certificate switch. Perhaps the issue with the python script? Is there an option to not validate cert?

On 17 Jan 2022, at 9:07 pm, Greg Lamb @.***> wrote:

I can use MQTT explorer to get states from the TV

I use the certs from the GitHub repo Hisense-mqtt-keyfiles. The TV certs I mention are certificate information from running openssl s_client -host 192.168.0.42 -port 36669 -prexit -showcerts and there are 2 sets of 2 (same) certificates in the output.

On 17 Jan 2022, at 8:47 pm, Alessio Moiso @.***> wrote:

 @gjlamb Hey there, I'm a bit confused on this sentence:

They are not the certs from the tv

There should only be a pair of valid certificates that work with the TV. So technically, the ones that come with the TV should be the right ones. MQTT Explorer sometimes shows that it's connected, even when it's not... Have you actually checked if you can receive information on the TV state with MQTT Explorer?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

MrAsterisco commented 2 years ago

disable validate certificate switch

This sounds like something, but could you point me to where this option is in MQTT? I have no clue with it means, to be honest.

MrAsterisco commented 2 years ago

Is there an option to not validate cert

Not right now, as I'm not very familiar with how Python SSL library works and I wouldn't know how to turn off certificate validation. It sure can be done, if we identify that's the issue.

gjlamb commented 2 years ago

I’ll see if I can find anything but this isn’t in my expertise.

I’ve seen some mentions of a mqtt switch —insecure

I’m not sure if you can contact other GitHub devs outside of logging issues but maybe Thomas <nordquist dev of MQTT-Explorer can advise on how he did it with his app?

Sent from my iPad

On 17 Jan 2022, at 10:56 pm, Alessio Moiso @.***> wrote:

 Is there an option to not validate cert

Not right now, as I'm not very familiar with how Python SSL library works and I wouldn't know how to turn off certificate validation. It sure can be done, if we identify that's the issue.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

MrAsterisco commented 2 years ago

@gjlamb I'll look into it. This issue is actually also affecting the Python script, as we need to first add support there and then we can add some config parameter in the Homebridge plugin. I'm not sure about the timeline, though, I'm currently very busy. Feel free to checkout the Python script, if you can find a way to turn off this option.

gjlamb commented 2 years ago

Posting link to cross post as requested https://github.com/newAM/hisensetv/issues/14#issuecomment-1014984969

MrAsterisco commented 2 years ago

@gjlamb just a quick update, as I spent some time looking at the code for version 2.0.0. It looks like we're already creating an unverified SSL context when passing no certificates, but I'm currently unable to figure out how to apply the same option when passing certificates.

I saw in the linked issue that you already tried ssl._create_unverified_context(purpose=ssl.Purpose.CLIENT_AUTH), which is what I was also thinking of trying... I am also completely blind on this, as my TV requires no SSL context (which uses the unverified context and works).

gjlamb commented 2 years ago

Thanks so much for continuing. I’m not a coder but am fine to modify code with instructions. Happy to do whats needed to help.

On Thu, 27 Jan 2022 at 1:19 am, Alessio Moiso @.***> wrote:

@gjlamb https://github.com/gjlamb just a quick update, as I spent some time looking at the code for version 2.0.0. It looks like we're already creating an unverified SSL context when passing no certificates, but I'm currently unable to figure out how to apply the same option when passing certificates.

I saw in the linked issue that you already tried ssl._create_unverified_context(purpose=ssl.Purpose.CLIENT_AUTH), which is what I was also thinking of trying... I am also completely blind on this, as my TV requires no SSL context (which uses the unverified context and works).

— Reply to this email directly, view it on GitHub https://github.com/MrAsterisco/homebridge-hisense-tv/issues/26#issuecomment-1022241303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCBWUNBMANDHSE5RAXFZZLUX77I5ANCNFSM5K65ADKQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

--

gjlamb commented 2 years ago

I uninstalled and reinstalled plugin now on 2.0.0. I did the pip3 install netinterfaces command as per instructions.

I'm pleased to say now when I run python3.8 hisensetv.py 192.168.0.42 --authorize --ifname wlan0 --certfile /tmp/tvcert.cer --keyfile /tmp/tvkey.key I'm able to connect to my TV and get the authorization code. Very pleased. Thankyou.

However, I'm getting these errors in hoobs log and I don't see anything in my Home app after connecting the bridge. 1/27/2022, 10:22:25 AMHisense Tv Remotenow BridgeHiSenseTVERRORAn error occurred while fetching inputs: TypeError: Cannot read properties of null (reading 'join')

MrAsterisco commented 2 years ago

I am very surprised updating the plugin fixed your problem, because I haven't made any change to how SSL is handled, but I'm glad it's working 😝

So that error (also reported in #34 ) means that we're unable to get data from the TV. If you run the same Python script but with the following:

python3.8 hisensetv.py 192.168.0.42 --get sources --ifname wlan0 --certfile /tmp/tvcert.cer --keyfile /tmp/tvkey.key

What is the output?

gjlamb commented 2 years ago

It returns sources as expected.

[ { "sourceid": "TV", "sourcename": "TV", "displayname": "TV", "httpIcon": "", "is_signal": "0", "has_signal": "1", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI1", "sourcename": "HDMI1", "displayname": "HDMI1", "httpIcon": "", "is_signal": "0", "has_signal": "0", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI2", "sourcename": "HDMI2", "displayname": "AppleTV", "httpIcon": "", "is_signal": "0", "has_signal": "1", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI3", "sourcename": "HDMI3", "displayname": "HDMI3", "httpIcon": "", "is_signal": "0", "has_signal": "0", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI4", "sourcename": "HDMI4", "displayname": "Foxtel", "httpIcon": "", "is_signal": "1", "has_signal": "1", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "AVS", "sourcename": "AV", "displayname": "AV", "httpIcon": "", "is_signal": "0", "has_signal": "0", "is_lock": "0", "hotel_mode": "0" } ]

MrAsterisco commented 2 years ago

That's weird... o.O Can you also post your plugin configuration?

The reason why you don't see anything in Home is that you have to add the TV manually, as it's exposed as a new platform (because of limitations of HomeKit). When you restarted Homebridge the first time, you should've seen in the logs a code that Home will ask you after you tap on "+" > "Add Accessory" > "More options" (the TV should appear as "Nearby"). This process is also explained here.

gjlamb commented 2 years ago

Yes I saw that. There was also an update to Hoobs & Homebridge that could have helped if there was nothing changed in your plugin.

{ "platform": "HiSenseTV", "ifname": "wlan0", "devices": [ { "id": "HiSenseTV", "name": "HiSense", "ipaddress": "192.168.0.42", "macaddress": "xx:xx:xx:xx:xx:xx", "sslmode": "custom", "sslcertificate": "/tmp/tvcert.cer", "sslprivatekey": "/tmp/tvkey.key" } ] }

MrAsterisco commented 2 years ago

So, when running on Hoobs, it could be that the Hoobs user isn't allowed to run the Python script. Could you try to run the Python script from the commandline with the homebridge user?

You should be able to do so by doing:

sudo su - homebridge
gjlamb commented 2 years ago

Theres only the Hoobs user that I run everything with.

MrAsterisco commented 2 years ago

I see. Are you able to run Homebridge with the debug mode turned on? On normal systems, it'd be homebridge -D.

gjlamb commented 2 years ago

Not so easy to get into debug mode. Proc seems to be hoobsd instead of Homebridge. From what I can find Hoobs needs to be running to use terminal. I might have worked around but its messy and I don’t know what debug information you want. I started hoobsd -d and connected from another terminal to run the command. I added verbose if that helps.

[2022-01-27 21:24:15,126] [INFO ] SSL context created with cert file (/tmp/tvcert.cer) and private key (/tmp/tvkey.key) [2022-01-27 21:24:15,127] [INFO ] Network interface MAC Address: dc:a6:32:3b:16:cc [2022-01-27 21:24:15,187] [DEBUG ] subscribing to /remoteapp/mobile/DC:A6:32:3B:16:CC$normal/# and /remoteapp/mobile/broadcast/# [2022-01-27 21:24:15,193] [DEBUG ] Recieved message on topic /remoteapp/mobile/broadcast/platform_service/data/voicetype with payload: {'voice_type': 2} [2022-01-27 21:24:15,194] [DEBUG ] Recieved message on topic /remoteapp/mobile/broadcast/ui_service/state with payload: {'statetype': 'sourceswitch', 'sourceid': 'HDMI4', 'sourcename': 'HDMI4', 'is_signal': 1, 'is_lock': 0, 'hotel_mode': 0, 'displayname': 'Foxtel'} [2022-01-27 21:24:15,195] [DEBUG ] Recieved message on topic /remoteapp/mobile/broadcast/ui_service/data/txtinputdata with payload: {'vkb_status': 1, 'input_data': 'Foxtel'} [2022-01-27 21:24:15,204] [DEBUG ] Recieved message on topic /remoteapp/mobile/DC:A6:32:3B:16:CC$normal/ui_service/data/sourcelist with payload: [{'sourceid': 'TV', 'sourcename': 'TV', 'displayname': 'TV', 'httpIcon': '', 'is_signal': '0', 'has_signal': '1', 'is_lock': '0', 'hotel_mode': '0'}, {'sourceid': 'HDMI1', 'sourcename': 'HDMI1', 'displayname': 'HDMI1', 'httpIcon': '', 'is_signal': '0', 'has_signal': '0', 'is_lock': '0', 'hotel_mode': '0'}, {'sourceid': 'HDMI2', 'sourcename': 'HDMI2', 'displayname': 'AppleTV', 'httpIcon': '', 'is_signal': '0', 'has_signal': '1', 'is_lock': '0', 'hotel_mode': '0'}, {'sourceid': 'HDMI3', 'sourcename': 'HDMI3', 'displayname': 'HDMI3', 'httpIcon': '', 'is_signal': '0', 'has_signal': '0', 'is_lock': '0', 'hotel_mode': '0'}, {'sourceid': 'HDMI4', 'sourcename': 'HDMI4', 'displayname': 'Foxtel', 'httpIcon': '', 'is_signal': '1', 'has_signal': '1', 'is_lock': '0', 'hotel_mode': '0'}, {'sourceid': 'AVS', 'sourcename': 'AV', 'displayname': 'AV', 'httpIcon': '', 'is_signal': '0', 'has_signal': '0', 'is_lock': '0', 'hotel_mode': '0'}] [ { "sourceid": "TV", "sourcename": "TV", "displayname": "TV", "httpIcon": "", "is_signal": "0", "has_signal": "1", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI1", "sourcename": "HDMI1", "displayname": "HDMI1", "httpIcon": "", "is_signal": "0", "has_signal": "0", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI2", "sourcename": "HDMI2", "displayname": "AppleTV", "httpIcon": "", "is_signal": "0", "has_signal": "1", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI3", "sourcename": "HDMI3", "displayname": "HDMI3", "httpIcon": "", "is_signal": "0", "has_signal": "0", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "HDMI4", "sourcename": "HDMI4", "displayname": "Foxtel", "httpIcon": "", "is_signal": "1", "has_signal": "1", "is_lock": "0", "hotel_mode": "0" }, { "sourceid": "AVS", "sourcename": "AV", "displayname": "AV", "httpIcon": "", "is_signal": "0", "has_signal": "0", "is_lock": "0", "hotel_mode": "0"

MrAsterisco commented 2 years ago

This is exactly the debug log I wanted to see, sorry for asking so many questions... 🙈 Anyway, I don't see the error from here... Is it... fixed? o.O

gjlamb commented 2 years ago

Still receiving error. The TV accessory has also disappeared now from Home app.

MrAsterisco commented 2 years ago

I guess I need to improve the error message there to understand what's going on. You should be able to add your TV again, I'm not sure why it disappeared.

gjlamb commented 2 years ago

I've just done a new install and am now connecting to the TV. The device is showing up in Home and I can power on/off device. The status in the Home app shows as Unknown. Changing input in the input menu does nothing. No errors in Hoobs log.

Shall we close this issue and open new one for the functionality issues?

MrAsterisco commented 2 years ago

That's good to hear!

I guess we're gonna need to once again sniff the commands that RemoteNOW uses to control your TV input, because it seems to be different than the one the script is currently using.

I think we can continue on this issue: after all, the issue is still on your specific model.

gjlamb commented 1 year ago

Just had to reinstall hoops and set all this up again. Not sure what info you need on the above comment.

From MQTT Explorer info on source control is /remoteapp/mobile/DC:A6:32:3B:16:CA$normal/ui_service/data/sourcelist [{"sourceid":"TV","sourcename":"TV","displayname":"TV","httpIcon":"","is_signal":"0","has_signal":"1","is_lock":"0","hotel_mode":"0"},{"sourceid":"HDMI1","sourcename":"HDMI1","displayname":"Fetch","httpIcon":"","is_signal":"0","has_signal":"1","is_lock":"0","hotel_mode":"0"},{"sourceid":"HDMI2","sourcename":"HDMI2","displayname":"AppleTV","httpIcon":"","is_signal":"0","has_signal":"1","is_lock":"0","hotel_mode":"0"},{"sourceid":"HDMI3","sourcename":"HDMI3","displayname":"Chromecast","httpIcon":"","is_signal":"0","has_signal":"0","is_lock":"0","hotel_mode":"0"},{"sourceid":"HDMI4","sourcename":"HDMI4","displayname":"Foxtel","httpIcon":"","is_signal":"1","has_signal":"1","is_lock":"0","hotel_mode":"0"},{"sourceid":"AVS","sourcename":"AV","displayname":"AV","httpIcon":"","is_signal":"0","has_signal":"0","is_lock":"0","hotel_mode":"0"}]

LeLunZ commented 4 months ago

@gjlamb the logs seems correct.

I also get this error you mentioned:

However, I'm getting these errors in hoobs log and I don't see anything in my Home app after connecting the bridge. 1/27/2022, 10:22:25 AMHisense Tv Remotenow BridgeHiSenseTVERRORAn error occurred while fetching inputs: TypeError: Cannot read properties of null (reading 'join')

But for me that only happens once and after a few seconds/reties it starts working and adds all the inputs. (TV needs to be turned on for that) You just need to restart the home apps a few times, then the inputs show up for me.

LeLunZ commented 4 months ago

closed in favor of #59