@johfeu@AV_HomeAuto
Just discovered that I accidentally made the MAP transformation service required. Prior to the debug messages you see - there should be one that says
08:22:12.348 [WARN ] [ding.sony.internal.SonyHandlerFactory] - No transformation service found for 'MAP' type - cannot create a IrccHandler
Until I make a fix to make it optional - install the map transformation service and try it again.
@anon92890676
Depends on what service you are using. I’m guessing it’s the scalar one? If so, look in your transforms directory for a scalar*.map file - that should show you all the commands your device supports. Then send the name to the IRCCCommand channel. (example: send “Left” to the IRCCCommand channel should do a left - note that it is case sensitive so “LEFT” wouldn’t work).
THank you. But I get allways this error for binding:
Status: UNINITIALIZED - HANDLER_REGISTERING_ERROR SonyHandlerFactory could not create a handler for the thing ‘sony:ircc:XXXXXXX’.
When I insert PIN Code he say error 500
Appears this only occurs when you drop it in (like we are doing until it’s merged). Try that feature install to see if it works for you (you’ll probably run into the map issue then the other have)
Should fix the issue with the map transform service being required. Note: you should install the MAP transform ANYWAY if you plan on using the IRCC Command channel. If you don’t, you’ll need to send the raw commands (“AAAAAwAAHF…”) rather than the short cuts (“Left”)
@tmrobert8 I’m somehow missing audio controls in scalar. Also, before changing the state to Online i get an error “Storage doesn’t exist.” I have a Bravia KD-55XE8096
P.S.
I noticed that if I manually add scalar thing (via .things file) it doesn’t find any audio controls…
@suntribe
First - storage doesn’t exist is fine. Likely your TV is reporting a storage service but the service isn’t responding because the TV actually doesn’t have storage (likely) or its a service only accessible through a different interface (which I’ll be integrating later on). Either way shouldn’t be an issue.
As for the audio - we’ll isn’t that a pain. I just stumbled on the exact issue as well by pure accident. Try this - shutdown openhab, turn on the tv and startup openhab (or turn on the tv and restart the binding if you know how to do that). I’m betting the audio channels appear now. Seems like the audio service will only respond when the device is on - in which case I can’t seem to get the audio channels defined at startup. I think this might be tied to the sonyaudio way of doing things (ie though a websocket) - I’ll need to think on this for a bit if you confirm that they appear now
@tmrobert8 I’ll try to restart the binding while the tv is on… but odd thing is that autodiscovered scalar thing normally reports audio channels while the tv is off
P.S.
You were right… after i turned on the tv and restarted the binding… audio channels are here…
argh - it appears that a change by sony, sometime since I wrote the first version, has made it that some of the services will only respond when the device is on. That creates an issue for some of the services since I need information from the service to dynamically create the channels for the device. Current example is audio - I need to contact the device audio service to find out what audio channels are available (headphone, speaker, etc). If the device isn’t on, the audio service doesn’t respond and I can’t setup those channels.
That creates the problem that if you restart openhab and the device isn’t on - those channels will suddenly disappear even though they are valid once the device is on.
The ONLY way I can think to get around this is to go the zwave route and start creating thing definitions with specific channel setups for all the various devices (using the generic one as a default device when we don’t have a specific definition). I really didn’t want to do that because, like zwave, there is a ton of devices the binding supports and I don’t have the time to manage creating every little device.
The generic scalar device would still be the default if no specific device setup was found (and it will continue with it’s dynamic creation).
So here’s what I was thinking about doing. We’ll create device definitions from this beta group as well as we can (I’ll try to publish [later on]what you’ll need to give me to have it included). I’ll furthermore create a special xml registry that you can define/load your own definitions as well from some local files (this will allow new models to be defined without really having to change the binding each time).
Here’s an example:
<thing-type id="scalar-XBR-xX830c">
<label>Sony XBR-X830C</label>
<description>Sony Bravia XBR-X830C TV</description>
<channels>
... the various channel definitions specific to the 830C
</channels>
<config-description-ref uri="thing-type:sony:scalarconfig" />
</thing-type>
Note that I’m using the lower case “x” as a wildcard since TVs generally have some model format where the screen size is part of it (and usually screen size doesn’t matter from a channel perspective).
@anon92890676 - event log doesn’t help in this case. You’ll need to turn debug on for org.openhab.binding.sony and look at the openHAB log - we need to see the command it’s sending. If you want to send the command directly - use “AAAAAgAAAJcAAABNAw==” (you don’t want the ‘ircc:’ part and translate the %3D to equal signs). But looking at this - you should be able to simply send ‘Left’ and it would work - but we need to see what’s happening in the openhab log…
Thank you. For my test I have use this:
Left=Left,L1=CursorLeft,L3=AAAAAgAAAJcAAABNAw==,L5=AAAAAQAAAAEAAAA0Aw==
On openhab I used log:tail and get this. I hope log:tail is the right thing?
The first is for this command: sony_ircc_xxxxxxxxx_primary_command
18:53:37.736 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_ircc_xxxxxxxx_primary_command’ received command Left
18:53:37.738 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_ircc_xxxxxxxx_primary_command predicted to become Left
18:53:37.744 [ERROR] [nding.sony.internal.ircc.IrccProtocol] - Bad return code from X_SendIRCC: 403 (http reason: Forbidden)
18:53:40.632 [INFO ] [inding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device…
18:53:42.810 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_ircc_xxxxxxxx_primary_command’ received command L1
18:53:42.811 [WARN ] [orm.AbstractFileTransformationService] - Could not transform ‘L1’ with the file ‘ircc-xxxxxxxx.map’ : Target value not found in map for ‘L1’
18:53:42.813 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_ircc_xxxxxxxx_primary_command predicted to become L1
18:53:42.815 [INFO ] [smarthome.event.ItemStateChangedEvent] - sony_ircc_xxxxxxxx_primary_command changed from Left to L1
18:53:42.818 [ERROR] [nding.sony.internal.ircc.IrccProtocol] - Bad return code from X_SendIRCC: 403 (http reason: Forbidden)
18:53:44.786 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_ircc_xxxxxxxx_primary_command’ received command L3
18:53:44.788 [WARN ] [orm.AbstractFileTransformationService] - Could not transform ‘L3’ with the file ‘ircc-xxxxxxxx.map’ : Target value not found in map for ‘L3’
18:53:44.789 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_ircc_xxxxxxxx_primary_command predicted to become L3
18:53:44.792 [INFO ] [smarthome.event.ItemStateChangedEvent] - sony_ircc_xxxxxxxx_primary_command changed from L1 to L3
18:53:44.796 [ERROR] [nding.sony.internal.ircc.IrccProtocol] - Bad return code from X_SendIRCC: 403 (http reason: Forbidden)
18:53:47.041 [WARN ] [orm.AbstractFileTransformationService] - Could not transform ‘L5’ with the file ‘ircc-xxxxxxxx.map’ : Target value not found in map for ‘L5’
18:53:47.042 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_ircc_xxxxxxxx_primary_command’ received command L5
18:53:47.046 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_ircc_xxxxxxxx_primary_command predicted to become L5
18:53:47.047 [INFO ] [smarthome.event.ItemStateChangedEvent] - sony_ircc_xxxxxxxx_primary_command changed from L3 to L5
18:53:47.048 [ERROR] [nding.sony.internal.ircc.IrccProtocol] - Bad return code from X_SendIRCC: 403 (http reason: Forbidden)
The second was this: sony_scalar_5089bf24928c_system_sysCmd
18:53:53.882 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_scalar_xxxxxxxx_system_sysCmd’ received command L5
18:53:53.883 [WARN ] [orm.AbstractFileTransformationService] - Could not transform ‘L5’ with the file ‘scalar-xxxxxxxx.map’ : Target value not found in map for ‘L5’
18:53:53.884 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_scalar_xxxxxxxx_system_sysCmd predicted to become NULL
18:53:55.302 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_scalar_xxxxxxxx_system_sysCmd’ received command L3
18:53:55.302 [WARN ] [orm.AbstractFileTransformationService] - Could not transform ‘L3’ with the file ‘scalar-xxxxxxxx.map’ : Target value not found in map for ‘L3’
18:53:55.303 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_scalar_xxxxxxxx_system_sysCmd predicted to become NULL
18:53:56.478 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_scalar_xxxxxxxx_system_sysCmd’ received command L1
18:53:56.479 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_scalar_xxxxxxxx_system_sysCmd predicted to become NULL
18:53:56.479 [WARN ] [orm.AbstractFileTransformationService] - Could not transform ‘L1’ with the file ‘scalar-xxxxxxxx.map’ : Target value not found in map for ‘L1’
18:53:57.677 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘sony_scalar_xxxxxxxx_system_sysCmd’ received command Left
18:53:57.680 [INFO ] [arthome.event.ItemStatePredictedEvent] - sony_scalar_xxxxxxxx_system_sysCmd predicted to become NULL
18:54:00.508 [INFO ] [y.internal.scalarweb.ScalarWebHandler] - Status: OFFLINE
18:54:00.668 [INFO ] [inding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device…
18:54:10.689 [INFO ] [inding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device…
18:54:20.707 [INFO ] [inding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device…