pysmartthings
pysmartthings copied to clipboard
Command Documentation to launch YoutubeTV app
Hi @andrewsayre ,
Thanks for developing this awesome repository.
I am trying to develop some automation capabilities for my Samsung Smart TV NU7100 model. I would like to launch the Youtube TV app on command.
I would like to seek guidance as to where can I get additional documentations on the 'command' parameter:
device.command(component_id: str, capability, command, args=None) -> bool
Source:
The link in Readme is no longer valid:
See the SmartThings Capability Reference for more information.
The visited the new documentation site: New Site but did not point me how.
@mrkgoh Does your TV implement the mediaInputSource capability? Check this out: https://developer-preview.smartthings.com/docs/devices/capabilities/capabilities-reference#mediaInputSource
You'd invoke this something like:
device.command("main", "mediaInputSource", "setInputSource", ["YouTube"])
@mrkgoh Does your TV implement the
mediaInputSourcecapability? Check this out: https://developer-preview.smartthings.com/docs/devices/capabilities/capabilities-reference#mediaInputSourceYou'd invoke this something like:
device.command("main", "mediaInputSource", "setInputSource", ["YouTube"])
Thanks. I tried and it almost did it. But I received a mini-pop up on the TV that says " YouTube is not found."
When I check at the link http://MY_TV_IP:8080/ws/apps/YouTube the output shows:
<service xmlns="urn:dial-multiscreen-org:schemas:dial" xmlns:atom="http://www.w3.org/2005/Atom" dialVer="2.1">
<name>YouTube</name>
<options allowStop="true"/>
<state>stopped</state>
<version>2.1.486</version>
<link rel="run" href="run"/>
<additionalData>
<testYWRkaXR>REMOVED</testYWRkaXR>
<brand>Samsung</brand>
<model>UA65NU7100</model>
<passiveSessionId>REMOVED</passiveSessionId>
</additionalData>
</service>
Why that is?
Not sure, that would be a question for the Samsung team that supports the TV software.
What are the values in supportedInputSources?
Can you tell me: A: Can you select youtube via the smartthings mobile app. B: is your tv device type OCF?
I also tried the alphanumeriic code "9Ur5IzDKqV.TizenYouTube" - but that didn't work:
pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "ED1BE8CE-C905-4C9D-A21A-CCD0C453F034", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "UnprocessableEntityError", "target": "commands[0].arguments[0]", "message": "commands[0].arguments[0]: does not have a value in the enumeration [AM, CD, FM, HDMI, HDMI1, HDMI2, HDMI3, HDMI4, HDMI5, HDMI6, digitalTv, USB, YouTube, aux, bluetooth, digital, melon, wifi]", "details": []}]}}
setInputSource to ["HDMI3"] worked tho