First of all, Do you get the information from here ?
https://thomaskekeisen.de/de/blog/telef ... mart-home/
Since it requires multiple steps, you should try your step by step of the flow from the easiest and things that likely to fail first.
1. Check your connection to the TV. Do you try to ping your TV first? Can your phone reach the TV IP?
2. Once you can ping your TV, example at 192.168.1.100; then you can try the next to HTTP post to it, without any data. Just put debug dialog and observe the response result. You should see an error which stated something like the command is missing or not recognized. This is normal, since we haven't put anything yet. It is just to ensure the webserver at the TV is online.
3. Next, try to post the xml. XML will be recognized as Content type :
text/xml. So your http post will be
URL :
http://192.168.1.100:56789/apps/vr/remote
Uncheck
Verify certificates (https)
Request Method : POST
Content Type : General Text - text/xml
Data
Code: Select all
<?xml version="1.0" ?>
<remote>
<key code="1012"/>
</remote>
Try to execute and check the response at the debug dialog. Does the TV turned off? This is the most crucial part of the whole process. So you need to make sure this is working first before continuing to the other part.
4. After you have successfully turning on/off the TV, we can then create a trigger for it. You use IFTTT to link your google home to the automagic. May I know the command you use? I always found that additional plugin is redundant.
You can always send information from google Home to your phone with the command "Send This to phone". Of course you have to link your phone and google home to the same account. But you need to do that too in IFTTT, should not be a problem.
Simply wake the google, "Hey Google, turn off TV", follow by "send to my phone". You phone should have new notification from google assistant, with the keyword you speak before that command. Put this notification as the trigger and execute this flow and finally remove the notification.
5. You can even extend this by using control UI coupled with google assistant to send the broadcast command back to google home, to report the command has been executed, as in here :
viewtopic.php?f=4&t=7489
BTW, I don't have google home (and the TV), so I can't test it out. If there is error, you can post it here to see if we can spot the problem.