Sony Devices Binding

If I wanted send this command to start the Amaozn video app, what channel would I have to send the command to? This used to work with The DIAL service but not that that has been removed from my TV I am now trying to use SCALAR, and and am kinda stuck.

setActiveApp: "title":"Prime Video","uri":"com.sony.dtv.com.amazon.amazonvideo.livingroom.com.amazon.ignition.IgnitionActivity"

openHAB 2.5.4 Release Build

@anon53398788

That usually happens if you have an older version still cached (or multiple versions found in addons). Do the following:

  1. From karaf console: bundle:uninstall org.openhab.binding.sony
  2. Delete all versions from addons.
  3. Shutdown openHAB
  4. Start openHAB
  5. Copy the newest bundle to addons
  6. Wait a few minutes until it comes online - logs should be clean then

@GameEnder
There should be an xxx-appstatus channel that you can set to start to start the app and stop to stop the app (although for some devices - you main need to send the home or menu key to stop).

You can find the channel in the paper ui under “Show More”

1 Like

I use the current 2.50 version, then I updated to version 2.55. the only problem now is that I no longer get the current status from my TV. (Sony 65XE9305) was previously shown to me when the TV is switched on etc. Now I can still control the TV, but I no longer get status updates.

Make sure you are using the latest version (first post) - I recently fixed a bug similar to this. If you are using the latest, I’ll need a log file

Hello

I finaly succeded to install it on my new openhab (new raspi). Yet, on the old on I was using simpleIP. Here I see scalar is working, so I wanted to test it, but unlinke for simpleIP I can’t find a kind of default sitemap (with all entries). Does it exist somewhere ? There are so many channel, than enabling them all one by one will be long, especially because I want them to be translated in a scalar.items
Thanks for feedback and great work here @tmrobert8

@karld there are way too many channels to show a default sitemap and you definitely won’t want to link them all because many probably don’t apply to you (many deal with AVRs, bluray players, etc). Review the scalar readme (see first post) for a good list of channels and pick out the ones you’ll likely need.

Thanks for the work on this binding. I’m finding that I continually have to keep re-running this command in the console to get the binding to work after a reboot


feature:install openhab-transport-upnp

Is there a way to make this stick? Is it the feature.xml file needs adjusting?

I have no idea actually - mine definitely ‘sticks’. Maybe you have something that is cleaning the cache every once and awhile that is removing it. Won’t be an issue when we finally get merged


Okay to make sure I have the correct version installed, how do I update the version correctly?

I saved following post as update guide:

I am using the simpleip Thing. It works fine for me but there is one point i hope someone can help me to improve.

My eco/energy saving settings on my tv are turned off!
But after power off my tv approx. 20 minutes the Thing turns offline and dosent stopp flapping between OFFLINE and UNKNOWN. This really spamming my log.

It seems to me that the Thing is not truly OFFLINE orUNKNOWN because if i send a command to my 'SonySimpleIP_Power' Item the tv turns on!

In my log you can see the thing offline while tv powered off and then receiving the ON command and turning on. After turning it off again it takes 20 minutes the thing goes offline again.

2020-05-13 15:31:09.255 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:31:11.258 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:31:21.258 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:31:23.261 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:31:33.262 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:31:35.265 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:31:45.266 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:31:47.268 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:31:55.750 [ome.event.ItemCommandEvent] - Item 'SonySimpleIP_Power' received command ON
2020-05-13 15:31:55.752 [nt.ItemStatePredictedEvent] - SonySimpleIP_Power predicted to become OFF
2020-05-13 15:31:57.268 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:31:58.763 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Exception occurred sending command: java.net.NoRouteToHostException: No route to host (Host unreachable)
2020-05-13 15:31:58.763 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Exception occurred sending command: java.net.NoRouteToHostException: No route to host (Host unreachable) to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:32:08.764 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:32:10.768 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:32:20.768 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:32:22.770 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:32:32.770 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:32:32.821 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to ONLINE
2020-05-13 15:32:32.833 [vent.ItemStateChangedEvent] - SonySimpleIP_Power changed from OFF to ON
2020-05-13 15:32:47.580 [vent.ItemStateChangedEvent] - SonySimpleIP_Channel changed from  to 3.0
2020-05-13 15:32:50.989 [vent.ItemStateChangedEvent] - SonySimpleIP_Volume changed from 0 to 18
2020-05-13 15:34:21.638 [ome.event.ItemCommandEvent] - Item 'SonySimpleIP_Power' received command OFF
2020-05-13 15:34:21.648 [nt.ItemStatePredictedEvent] - SonySimpleIP_Power predicted to become OFF
2020-05-13 15:34:21.656 [vent.ItemStateChangedEvent] - SonySimpleIP_Power changed from ON to OFF
2020-05-13 15:34:24.980 [vent.ItemStateChangedEvent] - SonySimpleIP_Volume changed from 18 to 0
2020-05-13 15:34:25.199 [vent.ItemStateChangedEvent] - SonySimpleIP_Channel changed from 3.0 to 
2020-05-13 15:54:05.223 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Exception occurred sending command: java.net.NoRouteToHostException: No route to host (Host unreachable)
2020-05-13 15:54:27.247 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Exception occurred sending command: java.net.NoRouteToHostException: No route to host (Host unreachable) to UNKNOWN: Initializing ...
2020-05-13 15:54:29.250 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:54:39.251 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:54:41.253 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:54:51.253 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...
2020-05-13 15:54:53.255 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from UNKNOWN: Initializing ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2020-05-13 15:55:03.256 [hingStatusInfoChangedEvent] - 'sony:simpleip:dfe0ea25' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Initializing ...

At the same time the Thing goes offline pinging the tv stops working too. So i am aware that my tv goes in some kind of deep sleep mode but i am wondering why then the power on command still works? Is there an wake-on-lan paket combined with this channel?
My hope is that whereever the power command is sent to may be a better point for check the thing online status. I understand that it would not work if there is just a magic/wol paket sent.

I just updated the first post with specific steps to do an upgrade. This errs on the side of caution and is a bit lengthy - but definitely will do the job.

@Knut1507

Yes - turning on power management will cause the thing to fall offline as the port get’s powered down or put into sleep (depends on the device). When that happens - the binding will go offline and it will try to reconnect.

You’ll see the UNKNOWN/OFFLINE message combo everytime the binding tries to reconnect to the device. You can set the frequency by setting the retryPolling parameter. This specifies how many seconds should elapse between retry attempts. You can disable it by setting it to -1 or make it bigger to reduce the amount of messages.

Why can it still power on? If you have set a mac address in the configuration, then the binding will automatically send a WOL packet prior to sending the power on command. I did this specifically for the case you have noted


Thank you for the fast reply.

My power management is turned off but it happens anyway. I get a hunch that the setting i turned off maybe is only for power saving while the tv is on. It just controls the backlight or can shut of the screen.
I turned on an other setting for simpleIP. It says it can lead to higher power consumption but the connection is still lost after 20 minutes.

Maybe someone knows an other setting for power management?

The part with the WOL packet was what i was expecting. Short note to this: It worked even before i set my tvs mac address in the thing settings. In the Things properties is a kind of discoverd mac address but it is the wrong one. It is similar to the SCALAR Thing propertie ScalarUDN.

I now tried with retryPolling off but turning off is not realy an option. With it off the thing never goes online even if the tv is turned on (of course its not checking anymore). Funny part: Even if the tv is on and the Thing is offline i can use the Items/Channel to control the tv through the offline Thing. But because its offline the Refresh Interval and Status Check Interval are not running and my items dont get updates/feedback. This is interresting if i am using my normal tv remote. If i use the Items/Channels to make a change there is an feedback for at least the tv-volume and the tv-channel. Thats why retryPolling off isnt an option. For now i just set an higher time vaule.

As mentioned i would be happy if maybe someone points out a power management setting i did not discovered yet.

I am in the same situation and was thinking about this. Could we perhaps have another state for retryPolling were reconnections are only tried when using the thing. A manual switch to try to reconnect would be good as well as it is easy to check if the TV is on by pinging it and then tell the binding to connect. If the binding did this by itself would of course be best but from what I understand this state switch between to UNKNOWN/OFFLINE seems to be required by the implementation.

@Knut1507 @amaino

I’ve thought about this for a bit and how about this type of rule


If you set the retryPolling to -1 (disabling it) and the thing is offline and the thing receives a setchannel or refreshchannel command - it will automatically try a reconnect and send the command once connected.

There are some edge cases I’ll need to work through (multiple commands received while reconnecting, clearing commands if not reconnected, etc). But it seems pretty reasonable - what’s your thoughts?

That would fit my need at least. Then I can manually connect when needed and still have a clean log without missing genuin OFFLINE events. :+1:

Its ok. I came up with a solution. Get a divorce. Give her the shitty sony, Keep the new samsung. Happy days. lol.

Sounds good.

I am not sure if there is even a need for resending commands after connecting the Thing.
If the tv is powered on already while Thing offline the command will go throught anyway. So just reconnect / correcting the Thing status.
If the tv is powered off with the Thing offline the command will just be to power on the tv. So try reconnecting for some time because the tv is predicted to go on.

Just my thoughts. Sure you are gonne make it good.