@gyrga i got something with ip:1925/1/system:
@gyrga i got something with ip:1925/1/system:
Thanks, this is useful! I see two major differences from my output:
- You are running API version 6.1, while I have a version 6.2. I would expect that since the major version is the same (6), everything should work, but it does not seem to be the case.
- Your “pairing_type” is “none”, while mine is “digest_auth_pairing” - that’s probably why the pairing script does not work for you.
So, right now it seems that your API behaves differently from the others. I have a theory to test: could you please go to http://ip:1925/1/audio and share the output? This does not work on API 6.2, but might work for you - then I will be able to help you…
Isn’t there a setting to enable the use of the API?
@warcanoid What did you to to set up the Philips TV Remote App? Did you press Pair, and there was a PIN on the TV, which you put in the app?
@warcanoid Now I am totally lost, this does not make any sense to me
How comfortable are you with computers in general and how bad do you want to get this working? I can potentially walk you through setting up a proxy to capture and decrypt the traffic between the iPhone app and the TV - then we’ll definitely know what’s going on and I’m 99% sure we’ll be able to solve your issue.
Besides that I’m all out of ideas… Maybe somebody else has any other thoughts?
@gyrga I want it really much! Let’s do all what’s needed! I have few experiences with proxy, had to listen with Charles between sonoff device and mac, to get the key.
The ios app show json version is 5, maybe this is also problem?
@warcanoid nice, I like your spirit! Then I need you to do the following:
- Reinstall the iOS app (we need to start from scratch to figure out how it pairs to your TV)
- Connect your iPhone to Charles
- Pair the TV and the iOS app and press some random buttons (like changing the volume, for example)
- Save the captured traffic in Charles and share it with me
I’ll then analyze the traffic and we will know for sure what’s going on.
@warcanoid Please also install Charles’s certificate on your iPhone (http://www.charlesproxy.com/getssl) and enable SSL proxying from all locations in SSL proxying location settings in Charles => we need these steps to decrypt the traffic between the iPhone and the TV.
EDIT: I’ve just realized something - your TV does not have Android, does it? It will explain why the pairing does not work. We still need to capture the traffic to get it working, but at least this starts to make some sense…
@gyrga have sent you the data in personal message. I have deleted the app, and then when i started it, at bottom pop up windows, paired tv 55pus… I have also tried od ipad, same result. Tv has some weird version of android, can not find it to be sure.
@warcanoid Thank you, this is really useful! Looking at your data now, I think I start to understand what’s going on. Can you please do two more things:
- Go to http://192.168.1.28:1925/6/audio/volume in your browser, do you get any response?
- If you go to settings on your TV do you see an item “Android settings”?
Thank you again for investing your time!
No android , is it still possible to do it?
@warcanoid Awesome, thank you a lot! Yeah, it seems that there are two versions of the API: 6.1 - (non-Android) and 6.2 (Android TVs). Good news: I can make it work for you. Bad news: since I don’t have this TV, you’ll have to test an updated tool and tell me which commands work and which do not => then I’ll make a public version for everybody. I’ll pm you a link with an updated test version later today.
UPDATE: Seems like 6.1 can be with Android too…
- No pairing required
- No authentication when sending requests (so no username/password)
- Http instead of https
- Port 1925 instead of 1926
Alternatively, here is how you can use my tool with Home Assistant:
Add this to your configuration.yaml (change the path to your actual path to the script):
mute: python /home/homeassistant/helper_scripts/pylips.py --host %tv_ip_address% --user %username% --pass %password% --command mute
Add this to your scripts:
- service: shell_command.mute
Add this to your switches:
This will give you a “mute” switch and you can use the same approach for any command…
By the way, has anyone tested “Ambilight + Hue” command yet? I want to make sure that it works on all TVs and not only on mine.
Hi @gyrga, I’ve tested “Ambilight+Hue” command and it works perfectly. There is only one question what would be the response that I need to include in the value template for command line switch if it is “on”, so it would be possible to have a real status for command line switch?
Thanks for the feedback, glad to hear that it works!
I have future plans to implement an MQTT server support that will allow getting and storing real-time statuses to use in HA sensors and switches - that’s what I’ve been personally using for the last couple of years, but I need to rewrite it to generalize it and make it scalable. I would expect it to be ready some time mid-January.
- platform: command_line
command: python3 -c “import requests; print(requests.get(‘http://192.168.1.28:1925/6/powerstate’).text)”
name: File value
@warcanoid Oh, thanks for sharing this! I totally forgot about the command line sensor in HA! I’ll update the tool so it gives a clean response that is easy to use with the command line sensor - that would be faster than integrating MQTT…
Actually, my question was about command_line SWITCH. There is a possibility to include status check and as far as I can see there is a command
ambihue_satus. My question is what response provide this command in the command line in case of ambilight+hue is on. I use Hass.io and it makes it very complicated to see what is the response when I send ambihue_status
Thanks, I get it! Right now my tool returns some feedback info like “sending a POST request” apart from the response itself, which will probably make the command line sensor a bit hard to setup (I’ll check it later). I’ll fix it in the coming days and then you’ll be able to use the command line sensor with my tool. I will also share an example of how to set it up!
(command line sensor/command line switch status are both affected by this)