Controlling a SamyGO TV through Home Assistant

Ideas and dreaming will go this forum

mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post 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.
H6400, firmware 2602.2 downgraded to 2130
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Controlling a SamyGO TV through Home Assistant

Post 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...
I do NOT receive any PM. Please use forum.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post by mad_ady »

Thank you!
H6400, firmware 2602.2 downgraded to 2130
teprrr
SamyGO Project Donor
Posts: 8
Joined: Tue Oct 03, 2017 5:20 pm

Re: Controlling a SamyGO TV through Home Assistant

Post 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.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post 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.
H6400, firmware 2602.2 downgraded to 2130
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Controlling a SamyGO TV through Home Assistant

Post by zoelechat »

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.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

Post 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.
H6400, firmware 2602.2 downgraded to 2130
zoelechat
SamyGO Moderator
Posts: 8615
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

Re: Controlling a SamyGO TV through Home Assistant

Post 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" :)
I do NOT receive any PM. Please use forum.
teprrr
SamyGO Project Donor
Posts: 8
Joined: Tue Oct 03, 2017 5:20 pm

Re: Controlling a SamyGO TV through Home Assistant

Post 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.
mad_ady
SamyGO Project Donor
Posts: 268
Joined: Sun May 03, 2015 10:42 am

Re: Controlling a SamyGO TV through Home Assistant

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

Post Reply

Return to “[H] Brainstorm”