Hello, could you help me?. I have a WebOS TV with password and using Power in openHAB it can turned on and open youtube, but I want to open a specific PlayList too.
also my TV have a password to access my apps (4 numbers), is there a way that I can send it using openHAB?.
Thz
I experimented around with this a bit and here’s what I found, demonstrated using JRuby but feel free to use your favourite scripting language
In this case, my TV has a button item called LivingRoom_TV_RCButton
, so adjust accordingly.
# frozen_string_literal: true
require "json"
# To play a video
# params = { contentId: "v=6ZfuNTqbHE8&t=0" }.to_json
# To play a playlist
params = { contentId: "list=PLusrypjchuO9CxzmJzXW2xE_4N0b32qvH" }.to_json
LivingRoom_TV_RCButton.thing.launch_application("youtube.leanback.v4", params)
# We need to hit "Enter" because youtube presented me with the profile selection screen. Hit enter to select the default / first profile.
# Adjust this if you want to select a different profile. Just send "right" a number of times before "enter".
after(5.second) { LivingRoom_TV_RCButton.command("ENTER") }
You can see how it’s done for other apps (e.g. netflix) here Connect-SDK-Android-Core/src/com/connectsdk/service/WebOSTVService.java at 919613c965a8b485756f60a822c7daec67ab7efb · ConnectSDK/Connect-SDK-Android-Core · GitHub
2 Likes
Thank you very much I am pretty new in openhab the LivingRoom_TV_RCButton is a Item that youy added in openhab?, thz and sorry for the newbie question.
Yes correct. You are free to name your item however you see fit.
1 Like
Thank you very much I manage to open youtube and insert the pin.
1 Like