Giter Club home page Giter Club logo

Comments (11)

ryanshand avatar ryanshand commented on June 27, 2024 1

Ah that’s a cool idea, I don’t mind the idea of using switches. I gave up my developer license because I’m a cheapskate so I don’t have access to the HomeKit SDK. Might have to bite the bullet and sign up again

from cmd4-hisensetv.

mitch7391 avatar mitch7391 commented on June 27, 2024

Hey @ryanshand I was confused when I saw the E-zone config for a second and worried I uploaded the wrong config to this! Awesome to see you trying to use both of my repos :)

I am away from home until tomorrow night, but hopefully we can get something going for you. First off what model of Hisense TV is it and do you know which version of VIDAA it uses?

A TLS issue sounds like an encryption issue, the use of insecure mode and the cert in my commands should get us around this… Can I get you to try the following command from your terminal?

mosquitto_pub --cafile  CERT_LOCATION --insecure -v -h IP_ADDRESS -p 36669 -P multimqttservice -u hisenseservice -t "/remoteapp/tv/ui_service/REMOTENOW_MAC$normal/actions/changesource" -m '{"sourceid":"4","sourcename":"HDMI1"}'

Just replace CERT_LOCATION, IP_ADDRESS and REMOTENOW_MAC with what you have them set at in your HisenseTV.sh. This command should change your TV input to HDMI; if it does not then we can try fault find from there.

from cmd4-hisensetv.

ryanshand avatar ryanshand commented on June 27, 2024

the Aircon plugin is wicked, total life-saver.
Although I have a MyAir5 system from 2016, and no temp sensors - but the way HomeKit works, I need to run the config with the temp sensor in order to set a specific desired temp and cool / heat mode - but the app always shows 0 degrees because there's no sensor.
I'm probably gonna pony up the $150 to buy one just to fix that annoying display haha.
Buy yeah you did a wicked job on that, thanks!

So I did bit of research into the mosquitto_ commands and found this has the same issue that @Mraus

so for my TV, the 70S5, software version V0000.01.00T.L0305 you need to pass in some certificates - I have attached them here

rcm_pem_privkey.zip

put them somewhere on your box, and then the command changes to below - this works!

I have attached my fully working solution
HisenseTV.zip

mosquitto_pub --cert /home/pi/Hisensecerts/rcm_certchain_pem.cer --key /home/pi/Hisensecerts/rcm_pem_privkey.pkcs8 --insecure -h 192.168.1.32 -p 36669 -P multimqttservice -u hisenseservice -t "/remoteapp/tv/ui_service/3D:81:F2:B6:08:B0$normal/actions/changesource" -m '{"sourceid":"0","sourcename":"TV"}' -d --cafile /home/pi/hisense.crt

from cmd4-hisensetv.

ryanshand avatar ryanshand commented on June 27, 2024

Actually just a quick question.
I can now fully change inputs, am I meant to be able to change channels on live Tv?

all I see is this

5721E592-929B-4B5F-B303-E2709172824F

from cmd4-hisensetv.

mitch7391 avatar mitch7391 commented on June 27, 2024

I am glad to hear you love the air con shell script :)

I need to run the config with the temp sensor in order to set a specific desired temp and cool / heat mode - but the app always shows 0 degrees because there's no sensor.

I am pretty sure you should be able to use the ‘no temp sensor’ version and set the state or temps without a temp sensor; please let me know there is an issue there that I need to look into! Or is this an issue with how the MyAir app displays it on the actual app? To be honest I didn’t have the temp sensors at first and then shelled out for the lot; they do deals on them at certain points of the year so keep an eye out for that.

I have attached my fully working solution

Interesting, so for your model you actually have a slightly different command? By requiring this cert chain and private key. Good on you for finding this out, not a lot of people do their own googling! I can’t open your zip file on my phone but will take a look when I get home tomorrow.

I can now fully change inputs, am I meant to be able to change channels on live Tv?

This is I believe a limitation of Apple. From the Home app you can not change channels. It won’t let me connect to this away from home, but if you check the ‘remote’ in your control centre (add it from settings if you don’t); then you can control more of the TV from here.

2C55036E-A20D-4405-A84C-3119AF546E93

I still don’t think it gives you a number keypad but I think you can you the up and down key to change the channel (not ideal I know, but once again Apple limitations).

from cmd4-hisensetv.

ryanshand avatar ryanshand commented on June 27, 2024

Ah ok gotcha.
Bummer, the remote doesn't have channel up and down.
I did a bit of a hacky thing as an experiment and made an "input" pass in keypresses - so I can change the "input" using Siri/shortcut and it will change the station - well, it will press 7 and then 0 so if i'm on TV, it will work.

just something i'm messing with.

#Channel7 24 ) mosquitto_pub --cafile $certPath --cert /home/pi/Hisensecerts/rcm_certchain_pem.cer --key /home/pi/Hisensecerts/rcm_pem_privkey.pkcs8 --insecure -h $ip -p 36669 -P multimqttservice -u hisenseservice -t "/remoteapp/tv/remote_service/"$pairedMAC"$normal/actions/sendkey" -m "KEY_7" mosquitto_pub --cafile $certPath --cert /home/pi/Hisensecerts/rcm_certchain_pem.cer --key /home/pi/Hisensecerts/rcm_pem_privkey.pkcs8 --insecure -h $ip -p 36669 -P multimqttservice -u hisenseservice -t "/remoteapp/tv/remote_service/"$pairedMAC"$normal/actions/sendkey" -m "KEY_0"

from cmd4-hisensetv.

mitch7391 avatar mitch7391 commented on June 27, 2024

I like what you are experimenting with! You could also create Switch accessories to act as your channels (would have to make a heap of them); just take a look at how my zones.sh from my ezone repo for an example.

Personally all I ever use my TV accessory for is the on/off function through Siri but hated not seeing a TV in my home; then this became about making the fully functioning TV accessory for everyone else. Sometimes I change the input through the Home app when the remote is out of reach as my phone is always on me lol hopefully Apple up their game with a lot of their accessory services across the board in the coming years.

from cmd4-hisensetv.

mitch7391 avatar mitch7391 commented on June 27, 2024

There would be a trick to it with that approach as you would need to use the state_cmd for each switch in your config to define each one and have it set to what ever the mosquitto command would be (the equivalent of "KEY_POWER"); if you get what I mean. The switch shell script part would be nice and simple.

from cmd4-hisensetv.

mitch7391 avatar mitch7391 commented on June 27, 2024

Also what is HomeKit SDK? I’m still pretty new to all this stuff!

from cmd4-hisensetv.

ryanshand avatar ryanshand commented on June 27, 2024

Also what is HomeKit SDK? I’m still pretty new to all this stuff!

I ended up just reading a bunch of the doco on Homebridge and its limitations regarding RemoteKey. It's kind of a pain in the arse, it doesnt support volume control, channel control or other functions that RemoteNOW does. That's not your fault or anything I just mean to say it's a limitation.

I've got my setup pretty much exactly the way I want it now, so I'm going to sit on it for a while. For what it's worth, I'll share my set up with you.

After some dicking around using MQTT Explorer monitoring API calls, while using RemoteNOW on my phone, I found that RemoteNOW can set the TV to a specific TV Station - regardless of what Input is currently shown, OR if the TV is off.

Use case: TV is powered off (standby) - you can go into the "favourites" part of RemoteNOW app, press channel 10, and the TV will power on, and show channel 10 - even if it was on HDMI1 when it was on standby.

It does this using the changechannel call.

/remoteapp/tv/ui_service/$normal/actions/changechannel and passing in channel_param

you get the list of available channels from the TV directly using MQTT - I have attached mine, not sure if they're specific to each TV or static - but a sample is below

ChannelList.txt

{ "list_para": "sl3d54bfff-ba0d-4f22-9cfd-b2686cd5cc4d", "list_name": "Antenna", "list": [{ "channel_num": "1", "channel_name": "10 HD", "channel_param": "1#chf9037e9a-894e-4a08-8b9a-32f686320f23#sl3d54bfff-ba0d-4f22-9cfd-b2686cd5cc4d#4" },

so an example API call to change to channel 10 for my TV is

#Channel10 23 ) mosquitto_pub --cafile $certPath --cert /home/pi/Hisensecerts/rcm_certchain_pem.cer --key /home/pi/Hisensecerts/rcm_pem_privkey.pkcs8 --insecure -h $ip -p 36669 -P multimqttservice -u hisenseservice -t "/remoteapp/tv/ui_service/3D:81:F2:B6:08:B0$normal/actions/changechannel" -m '{"channel_param" : "1#chf9037e9a-894e-4a08-8b9a-32f686320f23#sl3d54bfff-ba0d-4f22-9cfd-b2686cd5cc4d#4"}' ;;

Now, because RemoteKey is limited - I decided I didn't need all of the TV inputs you pull in (e.g. I don't need AccuWeather, TV browser, Foxtel etc - so I hijacked those and just replaced the commands with ones to do the following:

Change to Channel 7
Change to Channel 9
Change to Channel 10
Mute the TV

In Home app on my phone, it presents as below.

image

Using the Shortcuts app, I then create shortcuts to do the actions.

The shortcut is:
Control My Home

  • Set "Your TV" - and then select the Input you want (e.g. channel 7, 10, mute etc)

I then Google Image searched the logos for each station, and added the shortcut to my home screen of my phone.
I can now also say "Hey Siri, Channel 7" and Siri will run the shortcut, from my Apple Watch, HomePod or iPhone.

image

image

So now I have pretty much full control via voice or device.

I don't typically watch any other stations like ABC, SBS etc so I didn't bother doing the others, but hopefully this gives you some ideas if you want to do something to cover all bases.

I'm getting a bit of pressure from the missus to get off the computer, so need to park this.

I've attached my shell script, my Homebridge config file, the certificates and the channel list.
I also parametized the certificate location so you can dump them anywhere and reference it without having to update 46 lines.

Cheers

Ryan
ChannelList.zip

from cmd4-hisensetv.

mitch7391 avatar mitch7391 commented on June 27, 2024

It's kind of a pain in the arse, it doesnt support volume control, channel control or other functions that RemoteNOW does.

Yeah like I said it is limited thanks to Apple and hopefully they will improve it in the future.

After some dicking around using MQTT Explorer monitoring API calls, while using RemoteNOW on my phone, I found that RemoteNOW can set the TV to a specific TV Station - regardless of what Input is currently shown, OR if the TV is off.

That is pretty much how I created all of this; it’s really annoying messing around with it all to be honest and probably had a bit to do with why I put off making the full published version I put online for a few months; versus the simpler implementation I use myself (my inputs are just TV and HDMI1) and the remote through the control centre (as limited as it is). I really like what you have put together and how you have implanted it; nice job!

I'm getting a bit of pressure from the missus to get off the computer, so need to park this.

I also get a bit of this and completely understand. My wife has probably been more patient than she has had to be through the whole e-zone and hisense work lol I have been pretty flat out lately, but mean to have a good look over your work and can add it up here on the repo to help anyone else who has the same model as you (I will make sure to credit you of course).

I’ll close this out for now seen as everything is working. And if you have any ideas or troubles here or with your ezone; just reach out and I’ll be happy to help or brain storm. Been a pleasure chatting with you Ryan!

from cmd4-hisensetv.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.