Get Status of IP controlled TV

I have a Sharp TV that I control over IP with the exec binding using a script with a single line: /bin/echo -e "$! \r" | /bin/nc 10002

I can control it exactly as I’d expect, but I run into issues that would be solved if openHAB knew the current status of the TV (This problem actually extends to some of the the other items I have, a Denon Receiver for example).

This question could very well be beyond the scope of this forum, but those here have always been so helpful in the past, I thought I’d give it a try. The commands and instructions are on page 64-65 of the manual here, again, I’m a total n00b, but I don’t see anything about a status command. Perhaps I need something more robust than my netcat command? Something that reads and records the response code? Or some polling?

Clarification needed: What do you mean by “current status” ?
I assume, not a simple on/off status… right? (maybe more info like what is the input source etc?)
If you are interested to simply check the on/off status, you could use the network binding to poll the TV

Also: Have you seen this:

Yes a simple On/Off Status…but also which input is set would also be very useful.

It was my understanding that this wouldn’t quite work because the TV is always connected to the net. This is SO that it can receive an ON command from an Off state (which is actually a standby state with the screen off, though I never quite understood why an the TV can be powered on from IR without in being in standby but not by IP). Please correct me if I’m wrong

And what will probably make all other questions useless:) Thanks for that. I have no idea how I missed this…

Unfortunately, the binding doesn’t maintain status, or retrieve status from the TV. The OH1 binding, on which this is based, didn’t do that, and I’m not even sure there’s a SharpTV command that can get the current status.

Nevertheless, if you decide to try out the binding, let me know if you run into any issues.

Apparently, the RSPW2 command will tell the TV to not go into “eco” mode, which should allow it to be powered on. I added a Switch channel to the binding that when sent an ON or OFF command, sends the RSPW2 to the TV.

This is unfortunate. Sounds like there’s probably not a whole lot that the binding does that my simple exec/script combo doesn’t already (though being aware ahead of time of it’s existence certainly would’ve saved me some time :cry: ). In any event, I’m going to move my operating system to a USB drive, then do the dreaded migration to OH2 (or maybe the other way around) and then I will def still try this out and report back to the original thread (and thank you very much for taking the time).

I suppose this reopens my original question, and perhaps you @mhilbush have some insight into HOW to catch the status? Is polling an option? Are there any deadends that I should def avoid? I also don’t see any command in those instructions for simply getting the status…[quote=“mhilbush, post:4, topic:28872”]

Apparently, the RSPW2 command will tell the TV to not go into “eco” mode, which should allow it to be powered on. I added a Switch channel to the binding that when sent an ON or OFF command, sends the RSPW2 to the TV.

This is very interesting. There’s a setting in the, I believe, eco section of the TV’s menu to tell it to go to standby instead of off when its set to “off” (this is indicated by the center indicator light being lit up when the screen is off). This SOUNDS very similar to what you are describing with the RSPW2 command. And in any event, I have no issues powering it up from an off state with IP controls, just curious why that separate setting is needed. This is the description though in the manual:

The Power On command accepted. When the power is in standby mode, commands also go to waiting status and so power consumption is just about the same as usual. With the commands in waiting status, the Center Icon Illumination on the front of the TV lights up

And, I’ll be totally honest, I’ve read that like 15 times now and still have no idea what it’s saying. I suppose this is just the same type of randomness when I was trouble shooting why hitting enter on my keyboard would wake my htpc, but sending an enter command over IR did not. Some combination of driver/windows setting, that I was never able to solvem another massive failure and sink of time in my endless troubleshooting adventure…

That’s true. I’d say the binding does essentially what your script does. The binding will auto-discover the TV, but you’ve already done that part. :wink:

I haven’t found a command that polls for the status. The command set for these Sharp TVs is weak, at best!

Yes, it does. Probably does the same thing.

I’m with you concerning the difficulty in comprehending that excerpt from the manual. Sharp’s IP control seems like an afterthought to me. Probably some marketing guy saying they needed to have it so he could check off a box on a feature comparison matrix. LOL Don’t even think about trying to get customer support for the IP control. BTDT. :grimacing:

me too. They sent me that link.