About the Custom commands category

Here is the place to share your custom commands with the community.

Export / Import of Yatse .yac file makes the whole process easy :slight_smile:

Instead of uploading my custom commands (which include my domains/credentials that I don’t want to share with you - sorry for that :sweat_smile:), I will post the “how-to” for the following devices:

  1. Sony TV with AndroidTV (working in KD-65A1)
  2. Yamaha AVRs (working in both RX-V3090 and RX-A1070)

Sony TV with AndroidTV:
First of all, the TV needs to be configured in order to allow commands, there’s also the option to configure a PSK (pre-shared key) in order to make sure that not everyone in the network will be able to send commands to your TV - only those who know the PSK. The path to these settings may vary depending on the model, but in my TV (KD-65A1 with latest firmware available as per today) these are the ones that need to be configured and how:

Settings > Network & Internet > Remote Start (this needs to be enabled)

Settings > Network & Internet > Remote Device Settings > Control Remotely (this needs to be enabled)

Settings > Network & Internet > Home Network Setup > IP Control > Authentication (this needs to be configured as “normal + PSK” - NOTE: Normal is a must in all options, at least in my TV, and it is not the best label they could have picked, as it refers to official apps that include the corresponding manufacturer certificate so they don’t need a PSK; “official” would have been a much better term imo)

Settings > Network & Internet > Home Network Setup > IP Control > Pre-Shared Key (enter the key you want to use; you will need this value later on when configuring the custom command in Yatse; from now on I will refer to this value as [my PSK])

Obviously you will also need to know the TV’s IP address in your network, ideally a manually fixed - or MAC reserved - one, or, if you use your own domain naming in your network as I do, the name of the TV in your domain. I will not enter on the details of how to find out this information as I consider this to be very basic knowledge if you are interested on using advanced settings like Yatse custom commands. I will refer to this value as [my TV IP address]

Once this has been configured, now you can start sending custom commands to your Sony TV via Yatse. Sony lists the available commands in different services/categories. E.g. the “setPowerStatus” command - used to turn off (hibernate)/on (wake up) the TV, can be found in the “system” service/category, but there are others like “guide”, “audio”, “appControl”, … each one with their corresponding commands). The full list of services and their commands can be found here (hopefully this web will never be shut down):

Using the “system > setPowerStatus” service > command to turn the TV on (wake it up) as example, this is how it should be configured on Yatse

  1. create a custom “HTTP commands plugin”
  2. name it the way you prefer (e.g. “Sony TV on”)
  3. command type: Select “HTTP Post” (I have not been able to make it work via “HTTPS Post”)
    PARAMETERS
  4. Server Port: type the real value of [My TV IP address] (no need to specify the port)
  5. Path: type the following (respect upper/lower case)
    /sony/system
    (the /sony/ prefix is a must for every command; after that you must specify the corresponding service/category for the command you want to use, always according the link I previously provided; in this case this value is system)
  6. Post data: type the following JSON content according to the command documentation from the link (including all the quotes - respect upper/lower case)
    {“method”:“setPowerStatus”, “id”:55, “params”: [{“status”:true}], “version”:“1.0”}
  7. Leave both Login and Password empty
  8. Leave the default value (10) at Timeout
    HEADERS
  9. Content type: type the following (including quotes - respect upper/lower case)
    “application/json; charset=UTF-8”
  10. Name: type the following (respect upper/lower case):
    X-Auth-PSK
  11. Value: type the real value of [my PSK], respecting upper/lower case.
  12. Save the custom command and, if desired, add an icon, group it with other commands and/or assign it to a Yatse button

To power off/hibernate your Sony TV, follow exactly the same steps but change “status” to false at step 6. For other commands please refer to the link (e.g. to select a specific HDMI input you have to use the “setPlayContent” command at the “avContent” service)

In the following days I will provide the same information for Yamaha AVRs.
NOTE: It would be amazing if someone could provide a link for the LG - webOS TVs’ commands as my parents have recently bought one and I would like to setup their Yatse (the whole family uses it :rofl:).

EDIT: The forum has replaced the normal/vertical quotes with the fancy italic opening/closing ones. take this into consideration if you are going to do a copy/paste from here (I strongly suggest using the Sony web for doing copy/paste, the web also provides examples of the JSON content for every command)