Page 2 of 3

Re: Controlling a SamyGO TV through Home Assistant

Posted: Mon Oct 16, 2017 3:54 pm
by mad_ady
I haven't had time to play with it, but I looked over wether you can swith sources without going through the sources menu. And you can! By injecting keys. The following work for me:

Code: Select all

KEY_TV - switches to TV
KEY_AV1 - switches to EXT
KEY_COMPONENT1 - switches to Component (though it's disabled for me)
KEY_HDMI - switches to the first available HDMI (HDMI2 for me)
KEY_HDMI1 - turns on sports mode :) Don't know why. KEY_HDMI2/3/4 does nothing
I was hoping to find some keys to switch to the recording disk or Virtual USB, but I didn't find any.

Re: Controlling a SamyGO TV through Home Assistant

Posted: Mon Oct 16, 2017 4:13 pm
by zoelechat
mad_ady wrote: Mon Oct 16, 2017 3:54 pm I was hoping to find some keys to switch to the recording disk or Virtual USB, but I didn't find any.
There's none, but you can probably do something using [App] libRunWidget D/E/F/H :)

Code: Select all

KEY_AUTO_ARC_PIP_RIGHT_BOTTOM = 194,		# Source: HDMI3
KEY_AUTO_ARC_PIP_WIDE = 190,			# Source: HDMI2
KEY_EXT20 = 233,				# Source: HDMI1
Surely an HDMI4 somewhere, but only 3 on my TV...

Re: Controlling a SamyGO TV through Home Assistant

Posted: Mon Oct 16, 2017 5:36 pm
by mad_ady
Thank you!

Re: Controlling a SamyGO TV through Home Assistant

Posted: Tue Oct 17, 2017 12:13 pm
by teprrr
mad_ady wrote: Mon Oct 16, 2017 3:54 pm I haven't had time to play with it, but I looked over wether you can swith sources without going through the sources menu. And you can! By injecting keys. The following work for me:

Code: Select all

KEY_TV - switches to TV
KEY_AV1 - switches to EXT
KEY_COMPONENT1 - switches to Component (though it's disabled for me)
KEY_HDMI - switches to the first available HDMI (HDMI2 for me)
KEY_HDMI1 - turns on sports mode :) Don't know why. KEY_HDMI2/3/4 does nothing
I was hoping to find some keys to switch to the recording disk or Virtual USB, but I didn't find any.
Considering that these may differ from device to device, it is probably best just to have a statically defined sources mapping inside homeassistant's config? I have not yet tested out which keys are which outputs in my case, but will probably do that this week and see what we can do about it.

Re: Controlling a SamyGO TV through Home Assistant

Posted: Tue Oct 17, 2017 12:21 pm
by mad_ady
Ideally we should see what the mappings are for all platforms and see what's common (including Tizen). But that will be difficult without access to those platforms. Alternatively I can extend the API specifically for source switching and use standard calls that are mapped differently based on the platform it's running. I'm not sure how exactly to find out what platform I'm running on, but I'm sure it's available somewhere.

Re: Controlling a SamyGO TV through Home Assistant

Posted: Tue Oct 17, 2017 12:43 pm
by zoelechat
Mappings are totally different on Tizen, but keys above are common to all Orsay (=pre-Tizen B->H) afaik.

Re: Controlling a SamyGO TV through Home Assistant

Posted: Tue Oct 17, 2017 12:48 pm
by mad_ady
I had no idea the series was called Orsay. :)
In this case we probably need a flag in HA to differentiate between B-H and Tizen when calling the API.

Re: Controlling a SamyGO TV through Home Assistant

Posted: Tue Oct 17, 2017 12:56 pm
by zoelechat
One thing worth to notice (in case of using IR): despite different keycodes/keynames on Tizen, IR codes remain same. Means "old remote control still works" :)

Re: Controlling a SamyGO TV through Home Assistant

Posted: Tue Oct 17, 2017 11:03 pm
by teprrr
If the mappings are the same inside the same product line, a flag to choose what to use would do fine I suppose! That leaves users to select what outputs they want to have visible, if that's not to be parsed out similarly to what that hidesources library does. That would require further changes, so I'm kind of reluctant for that and would go for the easier mapping solution.

Re: Controlling a SamyGO TV through Home Assistant

Posted: Mon Jun 04, 2018 10:43 am
by mad_ady
@teprrr: I know it's been almost a year, but I hadn't had time to try your component until now. It looks great! It would also need to have Program+/Program- mapped to the Next/Previous controls, and maybe the screenshot functionality exposed as well (though the component may expect only a static album art, not an image sequence). Other than that, it looks good and should be submitted upstream, to become an official component.