Hi all,
Picked up one of the R6 models today, nice TV, but would be nicer with some HA integration!
Software Version of my TV is J1114.
Been playing around with a lot of the stuff you have all posted here, and here is where I am currently at:
-Unable to ping via command line
-Unable to use Mosquitto broker via hassio, with @K-1’s post above, in /share/mosquitto/hisense.conf, as it returns
XXXXXXXX: Connecting bridge hisensemqtt (192.168.1.68:36669)
XXXXXXXX: Socket error on client local.HomeAssistant, disconnecting.
I’ve attempted to add the TV as an MQTT Broker, and it seems to work! (Although it does ping every 2 minutes with a reconnect in the logs)
I just can’t figure out the sensor and I’ve tried too much tonight that I’m worn out for now. Hopefully someone can work out where I’ve gone wrong.
I’ve used the following in configuration.yaml
:
broker: 192.168.1.68
port: 36669
username: hisenseservice
password: multimqttservice
tls_insecure: true
and the following for the progname sensor I was testing with:
sensor:
- platform: mqtt
name: "TV State"
state_topic: "/remoteapp/mobile/broadcast/ui_service/state"
value_template: "{{value_json.progname}}"
For the sensor, I was using mqtt.sensor docs as documentation, which includes a link for the templating.
-Can confirm, thanks to @lindsayward and @zacnut above, I also need to use a MAC address in my topics. My Pixel 4 XL refuses to connect to the TV (going to contact Hisense about this soon), but my partners phone connected and I was able to then use her MAC Address. Spoofing even the TV itself’s MAC wouldn’t let the command register. Thought it had something to do with /remoteapp/tv/ui_service/XX:XX:XX:XX:XX:XX$normal/actions/authenticationcode
not existing for other MAC addresses, as {"authNum":"XXXX"}
is the value there, and after pairing a phone i can spoof that MAC to control.
I was about to hit send on this post, but I’ve actually just found a way to spoof the MAC address completely.
It seems if you manually publish /remoteapp/tv/ui_service/XX:XX:XX:XX:XX:XX$normal/actions/authenticationcode
with the json {"authNum":"XXXX"}
(yes, the X’s), it will return {"result":100,"info":"Wrong authNum!!"}
. However, if you copy a pre-existing auth code from a device that’s already been configured and push it with the authNum JSON, it will work with the spoofed address.
Further thought on this gave me a brainwave on how to create a new code to show on your TV. If you publish /remoteapp/tv/ui_service/HomeAssistant/actions/gettvstate
, your TV will return a code on-screen. You’ll need to be quick, but you can then use this auth code in a json (replace the ones with the code showing on your TV) {"authNum":"1111"}
and publish (with the X’s!), /remoteapp/tv/ui_service/XX:XX:XX:XX:XX:XX$normal/actions/authenticationcode
. After you’ve done this, you can then use the X MAC address + $normal to replace the HomeAssistant
text and then use any command listed in the initial git.
This means that something like /remoteapp/tv/ui_service/HomeAssistant/actions/gettvstate
can be used with /remoteapp/tv/ui_service/XX:XX:XX:XX:XX:XX$normal/actions/gettvstate
and so on, so forth. Unfortunately sending a KEY_POWER command will not allow you to power on the TV via the same command, but these commands DO seem to persist after the TV powers off and back on (even via power on the remote)
I hope this helps, and I’m sorry if it doesn’t make sense. I’ve spent a good ~10 hours today trying to figure some of this stuff out. If anyone could help me integrate this with my HA, it seems we’re all very close to having it work again! Happy to make heads or tails of anything if you need clarification.
@Schiene, my last rambling there should help you with the code input!