Binding Request: Sharp Aquos TV

I saw it and responded with a couple questions.

This is fixed in the 2.4 version of the binding.

There’s no way to query the value of the current input. I think you did yourself.

Hi Mark,

I will test the 2.4 version out now - I had only the 2.3 installed.

I will follow up on your questions regarding log shortly.

Thanks mate

Version 2.4 I can not seem to get to work or even show in Openhab at all.

I am still using the version 9 upnp file too, does this need updating?

I have this working with openhab 2.3, but I can’t get the channel to change. Does anyone know what the format of this input should be? I have tried simple integers corresponding to the channel numbers but this doesn’t seem to work.

@chris_helbren You can use a Setpoint widget in the sitemap to increase/decrease the channel.

You also should be able to send a number to set the channel, but the code looks broken.

I can fix it and build a 2.4 version of the binding. I’m not sure how to build a 2.3 version as my dev environment is all 2.4.

Thanks Mark.
I have tried the setpoint widget in the sitemap, but no joy - still doesn’t change channel. I am going to try changing to debug and looking at the logs to see what is happening. I am new to openhab - 2.3 is the latest stable release? would you recommend upgrading to 2.4?

These seem to be the relevant entries in the log:
2018-08-27 00:37:17.336 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.sharptv-2.3.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sharptv [223]
Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:=“optional”
Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp

at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]

2018-08-27 22:56:06.771 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/Sharp_TV_channel’ with an invalid status value ‘NULL’.

2018-08-30 20:34:18.321 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handle command 100 on sharptv:sharptv:29d24d53:channel channel
2018-08-30 20:34:18.352 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handling channel command, set channel to 100
2018-08-30 20:34:18.363 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Opening socket to 10.31.78.31:10002 with timeout 1500
2018-08-30 20:34:18.374 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for Username prompt
2018-08-30 20:34:18.383 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: Login:
2018-08-30 20:34:18.389 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing user: chris
2018-08-30 20:34:18.399 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for Password prompt
2018-08-30 20:34:18.409 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: Password:
2018-08-30 20:34:18.416 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing password: XXXXX
2018-08-30 20:34:18.426 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for login success
2018-08-30 20:34:18.432 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got:
2018-08-30 20:34:18.439 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing command: 'DCCH0 ’
2018-08-30 20:34:18.446 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for command response
2018-08-30 20:34:18.488 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: ERR
2018-08-30 20:34:18.497 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing input stream
2018-08-30 20:34:18.505 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing output stream
2018-08-30 20:34:18.511 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing socket

Do you have a debug log from when you tested using the setpoint widget?

2018-08-30 20:34:18.321 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handle command 100 on sharptv:sharptv:29d24d53:channel channel

This definitely won’t work because the part of the code that deals with absolute channel numbers is broken.

That was using the setpoint widget.
this is the line from my map file:
Setpoint item=Sharp_TV_channel label=“Channel”

That’s odd. Using a Setpoint widget to increase or decrease the channel should generate a CHUP0 or CHDW0, not DCCH0.

2018-08-30 20:34:18.439 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing command: 'DCCH0 ’

Hi Mark.
I think the problem may be in my items file - what item type to you make the channel item when you are using the setpoint widget to send channel up/channel down commands?

In the next day or so I’m going to fix the issue with the channel in the 2.4 version.

You might want to consider the next 2.4 milestone build.

Thanks Mark, have upgraded to 2.4, look forward to the update.

I just posted it here. Readme also was updated.

There’s actually three types of channels (analog, digital air, and digital cable). Not sure which you are using. Each should be declared as an item of type Number.

According to the spec, the analog channels should be between 1 and 135, however, my I get an error back from my TV when I try to set the analog channel to a value of 100 or greater.

Let me know how this works out for you.

Hi Mark,
Analogue channel works, but digital air channel selection doesn’t (unfortunately analogue channels have been taken off air in the UK!). This may be an issue with my TV. Is there a way to input the command codes directly as a string? - I would like to try some different codes eg: https://www.sharp.co.uk/cps/rde/xbcr/documents/documents/om/11_lcd-tv/LC40-46LE830E-RU-LE831E-RU_OM_GB.pdf (page59)
I have tried to connect directly to the TV with telnet (couldn’t log in) and TCP/IP using netcat (could log in but all the codes returned an error, including the ones accepted from your openhab binding (eg 'POWR1 '.

I think the command for this TV (LC-60LE636E) is DTVD***_ (3 digits then space)

The commands also need to be padded on the right with spaces to exactly 8 characters. Like this (but w/o the quotes).

'POWR1   '

I can add another channel channel for this.

I added a couple new channels for 3 & 4 digit direct channel commands. Let me know how that works out as I have no way to test it.

Hi Mark,
The 3 digit direct channel command works with my TV. Thanks for your help.

1 Like

I got an error 404 while accessing this link,
can you update it please