Controlling a SamyGO TV through Home Assistant

Ideas and dreaming will go this forum

User avatar
mad_ady
SamyGO Project Donor
Posts: 246
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady » 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.
H6400, firmware 2602.2 downgraded to 2130

zoelechat
SamyGO Moderator
Posts: 7937
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Controlling a SamyGO TV through Home Assistant

Post by zoelechat » Mon Oct 16, 2017 4:13 pm

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...
I do NOT receive any PM. Please use forum.

User avatar
mad_ady
SamyGO Project Donor
Posts: 246
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady » Mon Oct 16, 2017 5:36 pm

Thank you!
H6400, firmware 2602.2 downgraded to 2130

teprrr
SamyGO Project Donor
Posts: 6
Joined: Tue Oct 03, 2017 5:20 pm

Re: Controlling a SamyGO TV through Home Assistant

Post by teprrr » Tue Oct 17, 2017 12:13 pm

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.

User avatar
mad_ady
SamyGO Project Donor
Posts: 246
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady » Tue Oct 17, 2017 12:21 pm

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.
H6400, firmware 2602.2 downgraded to 2130

zoelechat
SamyGO Moderator
Posts: 7937
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Controlling a SamyGO TV through Home Assistant

Post by zoelechat » Tue Oct 17, 2017 12:43 pm

Mappings are totally different on Tizen, but keys above are common to all Orsay (=pre-Tizen B->H) afaik.
I do NOT receive any PM. Please use forum.

User avatar
mad_ady
SamyGO Project Donor
Posts: 246
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady » Tue Oct 17, 2017 12:48 pm

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.
H6400, firmware 2602.2 downgraded to 2130

zoelechat
SamyGO Moderator
Posts: 7937
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Controlling a SamyGO TV through Home Assistant

Post by zoelechat » Tue Oct 17, 2017 12:56 pm

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" :)
I do NOT receive any PM. Please use forum.

teprrr
SamyGO Project Donor
Posts: 6
Joined: Tue Oct 03, 2017 5:20 pm

Re: Controlling a SamyGO TV through Home Assistant

Post by teprrr » Tue Oct 17, 2017 11:03 pm

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.

Post Reply

Return to “[H] Brainstorm”