Hello, I’m interested in more advanced functionality in controlling my TV through Vera. I was reading a prior thread regarding this plugin for Sharp TVs, but it’s inactive so I thought I’d post a new topic.
My Sharp TV has a list of IP control commands in the manual (PDF) on page 56. Is there a way for me to use Luup code to invoke these? Not all of them are available through the plugin’s current options on the advanced tab of the scene creation process.
What specific commands are you looking for that are not offered by the plugin? I can always add them to the plugin if they are not there. I followed that table from my manual when I wrote it and tried to put as much in there as it made sense to. You can see the Luup for sending the commands if you download the plugin files. It basically opens a Raw TCP session and sends the 8 character commands to the TV.
I have the LC-70LE734U, so I followed the commands in that manual as well as for the LC-60LE835U when I made the plugin.
[quote=“boberto, post:1, topic:175344”]Hello, I’m interested in more advanced functionality in controlling my TV through Vera. I was reading a prior thread regarding this plugin for Sharp TVs, but it’s inactive so I thought I’d post a new topic.
My Sharp TV has a list of IP control commands in the manual (PDF) on page 56. Is there a way for me to use Luup code to invoke these? Not all of them are available through the plugin’s current options on the advanced tab of the scene creation process.
Thanks, that sounds great. Where could I download the plugin to see how it works? I installed it to my Vera but I’m not familiar with any way to download it and look at the code.
I have the LC-60LE640U, and I’m most interested in the RCKY section… play/pause/forward/rewind, Netflix button and the like.
Thanks again for your help.
[quote=“OtisPreslsy, post:2, topic:175344”]What specific commands are you looking for that are not offered by the plugin? I can always add them to the plugin if they are not there. I followed that table from my manual when I wrote it and tried to put as much in there as it made sense to. You can see the Luup for sending the commands if you download the plugin files. It basically opens a Raw TCP session and sends the 8 character commands to the TV.
I have the LC-70LE734U, so I followed the commands in that manual as well as for the LC-60LE835U when I made the plugin.[/quote]
To download the files, just go to Apps>>Develop Apps>>Luup files in your Vera. Just select the Download link for all files with SharpIpcTV in them. I will be out of town for work this week, so I will not get to update the plugin until the weekend.
[quote=“boberto, post:3, topic:175344”]Thanks, that sounds great. Where could I download the plugin to see how it works? I installed it to my Vera but I’m not familiar with any way to download it and look at the code.
I have the LC-60LE640U, and I’m most interested in the RCKY section… play/pause/forward/rewind, Netflix button and the like.
Awesome, thank you so much! I was able to follow along with the code and add a set of actions for the commands I wanted. If you like, I can send you what I added so you don’t need to rewrite it. Have a good trip.
[quote=“OtisPreslsy, post:4, topic:175344”]To download the files, just go to Apps>>Develop Apps>>Luup files in your Vera. Just select the Download link for all files with SharpIpcTV in them. I will be out of town for work this week, so I will not get to update the plugin until the weekend.
[quote=“boberto, post:3, topic:175344”]Thanks, that sounds great. Where could I download the plugin to see how it works? I installed it to my Vera but I’m not familiar with any way to download it and look at the code.
I have the LC-60LE640U, and I’m most interested in the RCKY section… play/pause/forward/rewind, Netflix button and the like.
[quote=“boberto, post:5, topic:175344”]Awesome, thank you so much! I was able to follow along with the code and add a set of actions for the commands I wanted. If you like, I can send you what I added so you don’t need to rewrite it. Have a good trip.
[quote=“OtisPreslsy, post:4, topic:175344”]To download the files, just go to Apps>>Develop Apps>>Luup files in your Vera. Just select the Download link for all files with SharpIpcTV in them. I will be out of town for work this week, so I will not get to update the plugin until the weekend.
[quote=“boberto, post:3, topic:175344”]Thanks, that sounds great. Where could I download the plugin to see how it works? I installed it to my Vera but I’m not familiar with any way to download it and look at the code.
I have the LC-60LE640U, and I’m most interested in the RCKY section… play/pause/forward/rewind, Netflix button and the like.
Thanks again for your help.[/quote][/quote][/quote]
Thanks! I have requested approval to publish version 1.1 of the plugin.
[quote=“boberto, post:7, topic:175344”]No problem at all! Thanks again for your help.
So I could keep track of what changes I made to it, I added them to a separate service called “PlayCtrl1” and updated the other XML files accordingly.[/quote]
Hi, great plugin! I added a function to set the volume to 20 no matter where it was. But I am thinking of making it more advanced so anyone can set the desired volume. Do you know how to make the code so the new value can be set in Vera?
The Sharp IP Control command for setting the volume at a certain level is VOLM**20 for setting it at 20. The range is 0-60. You can download the plugin files to see how these commands are sent over a RAW TCP connection. I did not implement this because you would need a way to prompt the use for the desired volume level or hard code it in. You could hard code 0, 10, 20, 30, 40, 50, and 60 and just let people use these values in scenes, I suppose.
[quote=“Vreo, post:9, topic:175344”]Hi, great plugin! I added a function to set the volume to 20 no matter where it was. But I am thinking of making it more advanced so anyone can set the desired volume. Do you know how to make the code so the new value can be set in Vera?
OtisPreslsy, thank you for your answer, exactly that is what I am looking for, a way to prompt for the desired volume level when set in up a scene. I can hard code it as I did for the 20 volume, and it works, but I have several scenes and I think it would be nicer for me and other users if it could be a prompt. Regards.
The only way I can think to do this is to use the JavaScript API in the D_SharpipcTV.json file to create an input box near the On/Off buttons on the control pad for volume level with a Set button next to it that runs the service command. I will see if I can accomplish this task and publish it in a new version.
[quote=“guessed, post:13, topic:175344”]You may want to look at how it was done in the Denon, since it implements a slider and the underlying service methods for it:
Thats a good starter. If you want to do it the “standardized” way, then you’d implement the actions inside of the UPnP RenderingControl service “[tt]urn:upnp-org:serviceId:RenderingControl[/tt]”…
This is what was done in the Sonos plugin, since it’s natively supported by the Sonos unit, but also because it’s a standard. In theory, any Vera control point working against these standards would also be able to control Volume, Mute (etc) against anything implementing the service.
But start on the custom one, to get you going. Over time the standard one can be added in, since it may be more involved than what you want right now (and RenderingControl has a lot more service actions to implement)
I went ahead and modified the existing plugin to incorporate a volume slider both on the main control pad and on the Control tab, and a mute button on the Control tab. The only problem is that the slider has 10 clicks and I coded the minimum value as 10 and the maximum value as 60. Rather than jumping 5 at a time, it jumps 10 at a time, so only the first 6 positions do anything. Later, I may make the values 0 to 10 and then do some math in the implementation file to start a volume 10 and move it 5 at a time, making the max 60.
Anyway, I have tested it to verify that it does work and have requested approval to publish version 1.2 of the plugin. Are there any requests for other features, like more buttons on the Control tab?
Ultimately you may benefit from implementing the Standard UPnP ACTION’s that I refer to above. You can use the Sonos codebase as an example for that. Hopefully the Control Point owners will also do the same, with a nice Volume knob visual, and then you’ll be able to drive it directly from there (worst case, you can put it into scenes for simple Vol Up/Down)
Does someone knows if there is a way for Vera to know if the TV is on or off? I tried with a Ping sensor, but the TV always respond to pings wether it is on or off. Regards.
The TV does not reflect state information, and once you enable the power to be controlled by IP Control then the network connection remains up at all times listening for connections. I know on my TV, there is no IP Control command to query the power state. All of the IP Control commands are in the user manual for your TV.
Another way it could be done is to have turning the TV on and off via IP control toggles a virtual switch in Vera; however, if someone uses the remote or you lose power, it can get out of sync with the virtual switch in Vera.
You may be able to do this if there is a power monitoring device that you could plug the TV into that can trigger at a certain number of amps and would turn a virtual switch to ON in Vera if above and OFF if below that number. That is rather elaborate for something so simple though.
The way I make sure my TV doesn’t stay on all the time is by including a power off in certain scenes, like one that arms the alarm system in away mode, one that turns all my AV gear off, one that turns everything off before bed, etc…
I also make sure it is on when needed by including a power on in scenes, like watch tv, watch XBMC, play Xbox, etc…
Thank you for your comments. In fact I also have the ON and OFF commands included in certain scenes. What I was looking was rather to use it as a condition in PLEG, for example, turn lights on when bedroom is open only if tv is off. But that cant be done then, only measuring the amps as you say, but also as you say, it is too much for such a simple thing. The toggle switch is nice idea, but in fact is very easy for it to lose sync, specially my tv, because it is frequently used with the remote. Thank you very much anyway, I appreciate the effort explaining.