Re 1) This isn’t possible. I’m also not aware of any (REST) API that could be used for this purpose.
Re 2) I’m not sure about the use case. Do you mean to select/enter a youtube url that is then streamed on the TV’s youtube app? This wouldn’t be possible. What the binding/the API supports is to stream content from any supported source (e.g. DLNA)
That’s good news.
Concerning the issue with the IRCC command map: I’ve noticed from your log that the getRemoteCommandList call happens before authorization/registration. So it might help to re-run the initialization (e.g. by disabling/enabling the thing) to get the command discovery working (just a guess).
thanks for this hint! what finally did the trick:
I had to re-run the initialization (by removing the access code “RQST”) and specify a not existing commands Map File (e.g. “sonynew.map”) in the thing configuration:
2022-04-27 08:06:59.992 [DEBUG] [sony.internal.ircc.IrccClientFactory] - Querying IRCC client http://10.0.10.84:8080/description.xml and getting remote commands: http://10.0.10.84:50001/cers/getRemoteCommandList
2022-04-27 08:07:00.440 [DEBUG] [sony.internal.ircc.IrccClientFactory] - Querying IRCC client http://10.0.10.84:8080/description.xml and getting remote commands: http://10.0.10.84:50001/cers/getRemoteCommandList -- org.openhab.binding.sony.internal.ircc.models.IrccRemoteCommands@166dfd1
2022-04-27 08:07:00.441 [DEBUG] [nternal.transports.SonyHttpTransport] - Closing http client
2022-04-27 08:07:00.443 [DEBUG] [y.internal.transports.SonyAuthFilter] - Created SonyAuthFilter for host: 10.0.10.84, baseUri: /description.xml, autoAuth: org.openhab.binding.sony.internal.transports.SonyHttpTransport$$Lambda$1962/0x5677d628@988b4c with initial authorization cookie: auth="";Version=1
2022-04-27 08:07:00.444 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - Starting ircc login...
2022-04-27 08:07:00.445 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - accessCode = ''
2022-04-27 08:07:00.522 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - Response status of calling non existing command: '500'
2022-04-27 08:07:01.126 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - Response status of calling ircc status: '200'
2022-04-27 08:07:01.127 [DEBUG] [inding.sony.internal.SonyAuthChecker] - res: 'ok'
2022-04-27 08:07:01.127 [DEBUG] [inding.sony.internal.SonyAuthChecker] - checkResult: 'okCookie'
2022-04-27 08:07:01.128 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - checkResult: 'okCookie'
2022-04-27 08:07:01.128 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - setup cookie auth
2022-04-27 08:07:01.130 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - Writing remote commands to /etc/openhab/transform/sonynew.map
2022-04-27 08:07:01.133 [DEBUG] [g.sony.internal.AbstractThingHandler] - Starting state polling every 30 seconds
Thanks for your answer.
I love openhab but what I miss is to stream something out of openhab, like a pre defined YouTube video. Would be the e.g. the favourite music video for my daughter.
Sony Binding can’t do, Spotify can’t do (at least with Chromecast devices due they go to sleep mode), Chromecast Binding can’t do.
However dlna means I can’t play, media stored on a Nas or a storage directly connected to the TV, right?
Also could be an option just to download some content, just less smart.
I’ve released a new version (3.2.1) on the community marketplace that should fix the reported issues and provide other optimizations.
I thought the update failed. Version reported as 3.2.0 from bundle:list but build date is updated
[13:25:31] root@openhabian:/var/lib/openhab/marketplace/kar/128262# ls
openhab> bundle:list | grep -i sony
275 x Resolved x 80 x 188.8.131.52206161002 x openHAB Add-ons :: Bundles :: Sony Binding
This is what bundle:list reported for 3.2.0
278 │ Active │ 80 │ 184.108.40.206201041123 │ openHAB Add-ons :: Bundles :: Sony Binding
Is ist possible to use this binding to detect that the app spotify is startet and then to send a command to turn off the screen so that only audio is playing?
I read that something with detecting the currently active app is broken?
Device: Sony Android TV (KD-55XF9005)
AFAIK the app status channel is still broken. What should work is to start the app from OH and turn off the screen using a simple rule. But I guess that this is not your use case.
That is not exactly my usecase as i would like to start spotify on the tv from the spotify app.
But turning off the screen itself would be interesting. How can i achieve that with this binding?
pictureOff to the channel
You could activate the android debugging on the the tv and use the “android debug bridge” binding to receive which package (in your case spotify) is started and trigger a rule that turns off the screen
Total newbie here.
How would I go about simulating using the buttons on the remote? I think that I would create a Point from the IRCC channel. All it ever shows is NULL. If I click on NULL, I don’t get a list of commands. Actually, nothing happens. The commands map file has been automatically created. I’m sure that I’m just missing something obvious.
Thank you for any help.
Now i have a problem the map file shows Home=AAAAAQAAAAEAAABgAw%3D%3D. and the iirc channel doesnt work.
Now if i stop openhab and clear the cache everything works again for a day or two after that it failes again with no logs i did not enable extended logs …
Any ideea ?
Also by pulling the data from the tv at :18863/sony/webapi/ssdp/dd.xml i get only
Some questions to support the analysis:
- How is the ircc command being issued? Within a rule or UI element?
- Does the non-mapped command work?
- When the ircc command doesn’t work, what does the console command
bundle:list | grep Map provide as output?
what do you mean about that ? like using other buttons ? i never used that only rule to trigger the home or ok button press
all are active
240 │ Active │ 80 │ 220.127.116.11112181218 │ openHAB Add-ons :: Bundles :: Transformation Service :: Map
i guess all this information doesnt help that much do you have an ideea what and how should i log in order to get more useful information to debug this ?
With non-mapped command I meant to send the code
AAAAAQ... instead of the mapped command
I’m trying to explore if the issue is related to the mapping or to the ircc command
For setting-up a separate info/debug log file for the Sony binding please follow the instructions provided in my initial post in Sony Binding - Add-on Marketplace / Bundles - openHAB Community. Once available, I can have a look into the logs to get some hints of the issue’s root cause.
It might also help to set-up a simple UI cell from which you could send IRCC commans to the TV. E.g. this is my cell definition for sending the Options command;
title: IRCC Command
sorry for the late reply now i cannot send ircc commands anymore but in the separate sony.log file i cannot find anything strange just this two lines when i send a command
[INFO ] [g.sony.internal.AbstractThingHandler] - Thing initialization is called, trying to connect...
[INFO ] [g.sony.internal.AbstractThingHandler] - Starting state polling every 30 seconds
and then in the logs i see
[INFO ] [openhab.event.ItemCommandEvent ] - Item 'MediaruimteTV_IRCCCommand' received command AAAAAQAAAAEAAABgAw==
[INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'MediaruimteTV_IRCCCommand' predicted to become AAAAAQAAAAEAAABgAw==
but nothing happens on the screen
this is driving me crazy could this be related to an cec hdmi device that also has the ability to control the buttons ?
update remove the hdmi cec cable from the television company box and the internet dropped hmm… then tried to connect to youtube nothing so i started pinging the tv and now i have dropped packages. The tv is connected with an ethenet cable.
So what i did i disconnect the cable and connect via wifi and the dropped packages go away but still cannot send ircc commands so i did a clear cache of openhab and everyrhing is working like normal.
I will keep posting because is driving me crazy.