Binding Request: Sharp Aquos TV

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( [?:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start( [?:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle( [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles( [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess( [9:org.apache.felix.fileinstall:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process( [9:org.apache.felix.fileinstall:3.6.4]
at [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 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: (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

It should work now.

thanks, what is Karaf console and how to access it?

Google says…

Hi @mhilbush! I just gave this a try again. Its been a while :slight_smile: This is one of the last bindings I still have running in OH1.

I have the same issue I had last year where the power off works, but any other command does not. For example here is the DEBUG log when I press Mute.

2020-09-27 14:02:03.340 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for login success
2020-09-27 14:02:03.349 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: 
2020-09-27 14:02:03.349 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing command: 'MUTE2   '
2020-09-27 14:02:03.349 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for command response
2020-09-27 14:02:03.396 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: ERR
2020-09-27 14:02:03.396 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing input stream
2020-09-27 14:02:03.396 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing output stream
2020-09-27 14:02:03.397 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing socket

Just like before (oddly) the power off command works. Power ON was pressed when the TV was already on. Otherwise it is totally offline and won’t even respond to WOL.

2020-09-27 14:09:12.957 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handle command ON on sharptv:sharptv:mbrtv:power channel
2020-09-27 14:09:12.957 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handling power command: ON
2020-09-27 14:09:12.957 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Normalized command of length 8 is: 'POWR1   '
2020-09-27 14:09:12.957 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Opening socket to with timeout 1500
2020-09-27 14:09:12.963 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for Username prompt
2020-09-27 14:09:12.969 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: Login:
2020-09-27 14:09:12.969 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing user: myusername
2020-09-27 14:09:12.969 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for Password prompt
2020-09-27 14:09:12.976 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: Password:
2020-09-27 14:09:12.977 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing password: XXXXX
2020-09-27 14:09:12.977 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for login success
2020-09-27 14:09:12.984 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: 
2020-09-27 14:09:12.984 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing command: 'POWR1   '
2020-09-27 14:09:12.984 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for command response
2020-09-27 14:09:13.035 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: OK
2020-09-27 14:09:13.035 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing input stream
2020-09-27 14:09:13.036 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing output stream
2020-09-27 14:09:13.036 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing socket

2020-09-27 14:09:56.173 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handle command OFF on sharptv:sharptv:mbrtv:power channel
2020-09-27 14:09:56.173 [DEBUG] [nding.sharptv.handler.SharpTVHandler] - Handling power command: OFF
2020-09-27 14:09:56.173 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Normalized command of length 8 is: 'POWR0   '
2020-09-27 14:09:56.174 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Opening socket to with timeout 1500
2020-09-27 14:09:56.177 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for Username prompt
2020-09-27 14:09:56.182 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: Login:
2020-09-27 14:09:56.183 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing user: myusername
2020-09-27 14:09:56.183 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for Password prompt
2020-09-27 14:09:56.189 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: Password:
2020-09-27 14:09:56.189 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing password: XXXXX
2020-09-27 14:09:56.189 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for login success
2020-09-27 14:09:56.194 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: 
2020-09-27 14:09:56.194 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Writing command: 'POWR0   '
2020-09-27 14:09:56.195 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Waiting for command response
2020-09-27 14:09:56.245 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Got: ERR
2020-09-27 14:09:56.245 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing input stream
2020-09-27 14:09:56.246 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing output stream
2020-09-27 14:09:56.246 [DEBUG] [arptv.internal.hardware.SharpTVProxy] - Closing socket

Here’s my binding:

271 │ Active │ 80 │ │ openHAB Add-ons :: Bundles :: Sharp TV Binding

I’m running OH 2.5.8 release build.

I forget what we did to try to debug this. Do you recall if we tried having you run the commands using telnet directly to the TV IP address and port?

No we never got that far. I think the initial thought was perhaps the issue was an interaction between the binding and the snapshot builds at the time. But newer OH versions didn’t change anything for me.