Hisense TV Control

/mosquitto/config # mosquitto_sub -d -h 10.0.1.45 -t “#” -p 36669 --cafile /mosquitto/config/hisense.crt -u hisenseservice -P multimqttservice
Client mosq-ctGFXIU57VgmqzYwdf sending CONNECT
Error: host name verification failed.
OpenSSL Error[0]: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Error: A TLS error occurred.

As before its having an issue with the TLS certificate and host verification. Try the following command with the --insecure and see if it works:

mosquitto_sub -d -h 10.0.1.45 -t “#” -p 36669 --cafile /mosquitto/config/hisense.crt -u hisenseservice -P multimqttservice --insecure

No. Didn’t work (((

OpenSSL Error[0]: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

Error: A TLS error occurred.

I download Android version, and extract apk file.
And I find two files
Maybe this help me?

remoteclientmobile.p12
remoteca.bks

I try setting in MQTT explorer p12 but not work

Could be useful. Can you upload the files somewhere so we can take a look.

I’ve just installed a Hisense 65U8QFTUK and was hoping to integrate with HA.

Attempting to connect with MQTT Explorer I instantly get disconnected from the TV’s MQTT server, here are my settings:

I also tried without SSL, no luck there.

A couple of things came to mind, does anyone know what MQTT-Client-ID the remote App is using to connect?

And secondly is there anything in the TV’s hidden service menu that might help?

  1. Hit menu on the remote
  2. Tap right to enter the full menu
  3. Scroll down to sound
  4. Tap right and select Advanced Audio Settings
  5. Scroll down and highlight the Balance slider, make sure it is on 0
  6. Enter 1969 on your remote
  7. The menu will disappear and a green “M” will appear at the top left
  8. Hit menu on the remote, this time a service menu will appear

two ways to get more information.

  1. Setup Serial connection to the TV and modify the update script in the OS to open up a telnet session with root access. Then telnet to TV remotely and get the info from the configuration files. (I have done this). Research xda-developers on how to do this. Note my hisense is now 2 years old so seems like they are adding additional security in each release.

  2. emulate android on PC and setup some packet captures on host PC and run the hisense app and see if you can get anymore information on how its connecting. Will be tricky if its now done over the TLS connection.

Also forgot to mention you could try connect via the websockets port 10001 which is also used to connect to mqtt.

Install “Remote-NOW” app on you smartphone and link your TV then try again with MQTT.

I attempted both of these, the serial connection doesn’t output anything for me, I’m reluctant to open up the back of the TV and trace out separate TX/RX ports - I’m sure they are there for anyone brave enough.

I attempted a MITM attack to sniff out data from the android app, but it’s all SSL and didn’t reveal anything. Very frustrating.

I just tried this, the app is working great but it didn’t enable MQTT for me to connect directly. Good idea though!

If you’re struggling to connect. Checkout this
https://github.com/d3nd3/Hisense-mqtt-keyfiles

3 Likes

For the serial connection - try to switch TX/RX. Also note you must interrupt the start up of the TV as it locks out serial after it boots the OS fully.

I have the same problem with 65U7QF

I am a noob for everything with MQTT, but I was able to control the TV with the MQTT explorer using the cert and key file (https://github.com/d3nd3/Hisense-mqtt-keyfiles)

any idea how to update the hisense.conf file to support the use of the 2 files to allow connection for HA?

1 Like

Hi,

for those who needs the keys, here is the way to make it work:

1/. download and put the 2 files in your “ssl” folder

2/. modify the “rcm_certchain_pem” file, keep only the first certificate

-----BEGIN CERTIFICATE-----
MIIDvTCCAqWgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBnMQswCQYDVQQGEwJDTjER
MA8GA1UECAwIc2hhbmRvbmcxEDAOBgNVBAcMB3FpbmdkYW8xCzAJBgNVBAoMAmho
MRMwEQYDVQQLDAptdWx0aW1lZGlhMREwDwYDVQQDDAhSZW1vdGVDQTAeFw0xODA0
MTkwMjAxMTdaFw00MzA0MTMwMjAxMTdaMGAxCzAJBgNVBAYTAkNOMREwDwYDVQQI
DAhzaGFuZG9uZzELMAkGA1UECgwCaGgxFDASBgNVBAsMC211bHRpc2NyZWVuMRsw
GQYDVQQDDBJyZW1vdGVjbGllbnRtb2JpbGUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
DwAwggEKAoIBAQDu/o3p42CAraBA19IrYteEt8N8dyAvUmEyTVZMwHobwzNUABra
zUXhmFvduh02q/1y2TblB8dHSf53WKV+5O+sRpD7dc1lbhgoYLmHp3yVxrVDDKTo
z22fH54LrLm3t2k3j3ShXMbJIBEQqFJxW0P0I4Kj7wktKWBQ1rJjK3gFgHxaRugC
0oGZuv16M9Dn7tKpg+VX9SQ5Uj6nFjHv5scFUOBC7rPPlcFNQhkZT4Mdg/fcCFlJ
0hF5R6BDniRkRLEmsyNWhFSUf6UKDcNIDuPlcjYEmZNB5p4OGVWt0c/A5q057ZVO
RsSq9dwUgkSjj4Zz8nGK1lf3P5KVFMdocvzDAgMBAAGjezB5MAkGA1UdEwQCMAAw
LAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0G
A1UdDgQWBBSoDVzwztBO4zBMk73za2OMYSa+3DAfBgNVHSMEGDAWgBQjQIKRqSQG
hzF4k4+glDyqSfz8OzANBgkqhkiG9w0BAQsFAAOCAQEAgrk7ZK0/eGlY8uqAql25
R+cm17C+3MAvAj7yuU889CewPDPTtZmM05/1i0bV1oo2Pp9fLf0dxLovTwBpvAN8
lcxYNPxbZ824+sSncwx2AujmTJk7eIUoHczhluiU6rapK8apkU/iN4GNcBZkbccn
1FghvHaAKmUefzOwbY2LOAd7Z1KhKmf6MyL7RqN8LAgx3i2uiW1GM4C8KeFxZ090
9+e4R6eufW/V+58/HJtF9jECeNikLvJpxveCC6Q/N49s72hHZC0L0NeJ7GNKzoOi
8lXL5QgNGCg/bawsx9q5YvWLsDOVJIEhWv3MxmnC/reIeDf7iMEK3BP5E4u8uTzJ
Hg==
-----END CERTIFICATE-----

2/. add these lines to your hisense.conf file

bridge_certfile /ssl/rcm_certchain_pem.cer
bridge_keyfile  /ssl/rcm_pem_privkey.pkcs8

and enjoy !

1 Like

Hello, I have Tv Hisense 75EA7010, there is some solution for this model?

I tried witch mqtt explorer but not connecting…

For those that can’t get MQTT working on their model (like for instance, I cannot on my 55" H6510G), it is possible to turn on and off (and probably do other things) using node-red-contrib-alexa2 and it’s “Alexa Routine” node.

Then you can set up a input_boolean helper in HA to activate that node inside NR.

Not an idea solution, but doable

I have tried adding my Hisense TV, my config looks like the following atm

mqtt:
  broker: 192.168.1.136
  port: 36669
  username: hisenseservice
  password: multimqttservice
  client_cert: /ssl/hisense.cer
  #certificate: /ssl/hisense.cer
  client_key: /ssl/hisense.pkcs8
  client_id: HomeAssistant
  #try_private: false
  #tls_insecure: true

where the hisense.cer and hisense.pkcs8 are the ones [provided] (https://github.com/d3nd3/Hisense-mqtt-keyfiles) by d3nd3

However I am clearly doing something wrong as I am getting this error in the logs

Logger: paho.mqtt.client
Source: /usr/local/lib/python3.8/site-packages/paho/mqtt/client.py:2404
First occurred: 12:04:41 AM (13 occurrences)
Last logged: 12:16:48 AM

failed to receive on socket: [Errno 104] Connection reset by peer

I’m not familiar with MQTT, so not sure if I am missing something obvious

2 Likes

Hi.
I’ve been working on a media_player integration for Hisense TVs.
The TV’s MQTT is added as bridge to your existing (mosquitto) MQTT broker. The rest of the setup can be done via HA integration UI.

Feed free to test the integration and please provide some feedback. Code reviews are also welcome :wink:

3 Likes

I installed this using HACS but it doesn’t show up under intergrations. I also have the bridge setup. The repository is under custom components

@sehaas