Sony Devices Binding

after clean uninstall of the previous version, i have installed the new binding and it seems that there is already some error registering the discovery.ircc component.

2017-02-07 08:38:02.237 [ERROR] [org.openhab.binding.sony            ] - [org.openhab.binding.sony.discovery.ircc] Cannot register Component
org.osgi.service.component.ComponentException: The component name 'org.openhab.binding.sony.discovery.ircc' has already been registered by Bundle 196 (org.openhab.binding.sony) as Component of Class org.openhab.binding.sony.discovery.IrccDiscoveryParticipant

attached you’ll find the complete debug logs

http://pastebin.com/U9Jus3XR

please let me know if you need any further information or testing

thanks! Oliver

Ack - sorry about that - you’re also getting my half scalar implementation that is not even close to testing (and that’s what caused that). Download the latest (sony-binding-2017-02-07.zip) from that thread - should fix that issue

seems slightly better now, but still error “Exception getting device info” in “IrccDiscoveryParticipant”
 and discovery will not find my AV amp.

http://pastebin.com/Kqd4VCad

Discovery shouldn’t work yet - I’m trying to isolate the problem and that exception message is telling me that I was having issues getting the local MAC address. By any chance do you have multiple network cards?

Actually - never mind - uploaded the next version for you to try (sony-binding-2017-02-07-2.zip)

no, actually only one NIC (besides loopbackp). i will try your new version


thanks, it seems we’re getting closer


http://pastebin.com/Lx1K4Y0j

below the output of the last get
http://192.168.205.46:50001/cers/getSystemInformation

<systemInformation><name>STR</name><generation>2012</generation><remoteType bundled="true">RM-AAP079</remoteType><actionHeader name="CERS-DEVICE-ID"/><supportSource><source>BD/DVD</source><source>GAME</source><source>SAT/CATV</source><source>VIDEO1</source><source>VIDEO2</source><source>TV</source><source>SA-CD/CD</source><source>TUNER</source><source>USB</source><source>AirPlay</source><source>HOME NETWORK</source><source>SEN</source><source>SOURCE</source></supportSource><supportFunction><function name="Notification"/></supportFunction></systemInformation>

Ah - that one was a simple one to fix - posted #3 give it a whirl

yepp - version 3 of todays binding is now discovering the AV amp and adding it to the inbox!
however still not pairing with the sony


not sure, but it seems that some http requests have duplicate “/description.xml” in the URL which ends up in 404 errors

2017-02-07 18:31:38.061 [DEBUG] [inding.sony.internal.net.HttpRequest] - >>> GET: http://192.168.205.46:8080/description.xml/IRCCSCPD.xml
2017-02-07 18:31:38.062 [DEBUG] [inding.sony.internal.net.HttpRequest] - <<< 404 ()
2017-02-07 18:31:38.063 [WARN ] [ony.internal.upnp.models.UpnpService] - Unknown response from http://192.168.205.46:8080/description.xml/IRCCSCPD.xml: 404 ()

I have attached also the logs when triggering the authentication again by setting RQST in binding configuration.
any ideas why it’s still failing?

http://pastebin.com/vcR1j3jv

thanks, Oliver

Those duplicate XML will be fix but aren’t the root of the issue. The issue is that bad protocol return at the bottom of it. I’m going to replace jetty and see if that has any effect. I’ll let you know when I have that posted.

Number 4 is posted - give it a try

tried #4 and http requests are fixed, but unfortunately device registration now fails with error 400

2017-02-07 21:09:04.365 [DEBUG] [inding.sony.internal.net.HttpRequest] - >>> GET: http://192.168.205.46:50001/cers/ActionList.xml
2017-02-07 21:09:04.366 [DEBUG] [inding.sony.internal.net.HttpRequest] - <<< 200 (<actionList><action name="register" mode="1" url="http://192.168.205.46:50001/cers/register" /><action name="getSystemInformation" url="http://192.168.205.46:50001/cers/getSystemInformation" /><action name="getRemoteCommandList" url="http://192.168.205.46:50001/cers/getRemoteCommandList" /><action name="getStatus" url="http://192.168.205.46:50001/cers/getStatus" /><action name="getText" url="http://192.168.205.46:50001/cers/getText" /><action name="sendText" url="http://192.168.205.46:50001/cers/sendText" /></actionList>)
2017-02-07 21:09:05.077 [DEBUG] [inding.sony.internal.net.HttpRequest] - >>> GET: http://192.168.205.46:50001/cers/getSystemInformation
2017-02-07 21:09:05.079 [DEBUG] [inding.sony.internal.net.HttpRequest] - <<< 200 (<systemInformation><name>STR</name><generation>2012</generation><remoteType bundled="true">RM-AAP079</remoteType><actionHeader name="CERS-DEVICE-ID" /><supportSource><source>BD/DVD</source><source>GAME</source><source>SAT/CATV</source><source>VIDEO1</source><source>VIDEO2</source><source>TV</source><source>SA-CD/CD</source><source>TUNER</source><source>USB</source><source>AirPlay</source><source>HOME NETWORK</source><source>SEN</source><source>SOURCE</source></supportSource><supportFunction><function name="Notification" /></supportFunction></systemInformation>)
2017-02-07 21:09:05.145 [DEBUG] [inding.sony.internal.net.HttpRequest] - >>> GET: http://192.168.205.46:50001/cers/getStatus
2017-02-07 21:09:05.146 [DEBUG] [inding.sony.internal.net.HttpRequest] - <<< 403 (Forbidden)
2017-02-07 21:09:05.206 [DEBUG] [inding.sony.internal.net.HttpRequest] - >>> GET: http://192.168.205.46:50001/cers/register?name=OpenHAB+%28openHAB-sony%3A00%3A11%3A22%3A33%3A44%3A55%29&registrationType=new&deviceId=openHAB-sony%3A00%3A11%3A22%3A33%3A44%3A55&wolSupport=true
2017-02-07 21:09:05.207 [DEBUG] [inding.sony.internal.net.HttpRequest] - <<< 400 (Bad Request)

looking forward to trying #5 :wink: ``

A few things on that log trouble me - I posted a new one (number 1 for today!) that may or may not work. Give it a try

hallo, i have a problem with the binding. Error: “Device doesn’t implement the system web service”. Can you help me?

You aren’t using the test binding are you (and have discovered a scalar api device)? That seems to be a message my, not even half done, scalar service creates. If you are using it and discoverying the scalar service - don’t. The binding is not even to the point it’s usable on my system. The latest test binding is trying to get IRCC working on an sony AV system.

If you discovered an IRCC device and are getting that message - please let me know (I’ll need to look at that). BTW - what device are you using (model?)

strange
 with this version the binding does not even register
?

http://pastebin.com/kZK9ice7

the model is a TV BRAVIA KDL-50W805B.
The other i don’t no

I’m assuming you autodiscovered the thing right? If so, go into the paperui->configuration->things - look for your bravia and right under it you’ll see some text (“Sony IRCC” or “Sony Scalar” or “Sony Dial” or “Sony SimpleIP”. What does it say?

Sorry - that’s what I get for running on a dev box and using an API that isn’t available. Posted number 2 


no problem
 looks much better now :slight_smile:

http://pastebin.com/F3Skk9gw

unfortunately the status of the thing in PaperUI is now

OFFLINE - COMMUNICATION_ERROR Access code request error: 400 ()

seems like we are quite close to get openhab registered!