tavicu / homebridge-samsung-tizen

Homebridge plugin for Samsung TV's with Tizen OS
MIT License
646 stars 88 forks source link

ios 12.2 #50

Closed ageorgios closed 5 years ago

ageorgios commented 5 years ago

Will you make it use the new TV accessory? https://www.macrumors.com/2019/01/24/apple-seeds-ios-12-2-beta-1-to-developers/

Pensive commented 5 years ago

this will require homebridge to be updated first ;)

cnnn commented 5 years ago

.. which has just been updated

tavicu commented 5 years ago

Hei. Homekit was just updated!

I am very excited about the new feature! But since there are not a lot of examples i will have to play with it to see what it can do and what can be implemented!

I’ll keep you posted

dibble9012 commented 5 years ago

Very excited to have this functionality added! Upgraded to iOS 12.2 beta and ready to test it out!

cnnn commented 5 years ago

I was able to modify my plugin to use the new Service type and got it showing on Home as a TV. Haven't got the speaker or remote working yet. My plugin is still using old API and hasn't got turned into platform, not sure if that matters.

In case it helps, I was following this example to update the plugin. https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/TV_accessory.js.

dibble9012 commented 5 years ago

I was able to modify my plugin to use the new Service type and got it showing on Home as a TV. Haven't got the speaker or remote working yet. My plugin is still using old API and hasn't got turned into platform, not sure if that matters.

In case it helps, I was following this example to update the plugin. https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/TV_accessory.js.

How exactly did you update the Samsung plugin with that? Any way you could share the files you modified with me?

JonoHaysom commented 5 years ago

I'm ready to help too @tavicu can't wait! can 2.1.3 be done first to update the current plugin to have the new icon and identifier? then perhaps the features are v3?

cnnn commented 5 years ago

I was able to modify my plugin to use the new Service type and got it showing on Home as a TV. Haven't got the speaker or remote working yet. My plugin is still using old API and hasn't got turned into platform, not sure if that matters. In case it helps, I was following this example to update the plugin. https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/TV_accessory.js.

How exactly did you update the Samsung plugin with that? Any way you could share the files you modified with me?

Basically I replaced Service.Switch with Service.Television, and added new required Characteristic such as .Active (which replaces .On). This should give you the minimum of having the new icon and the on/off switch. Haven't got anywhere further than that.

JonoHaysom commented 5 years ago

I was able to modify my plugin to use the new Service type and got it showing on Home as a TV. Haven't got the speaker or remote working yet. My plugin is still using old API and hasn't got turned into platform, not sure if that matters. In case it helps, I was following this example to update the plugin. https://github.com/KhaosT/HAP-NodeJS/blob/master/accessories/TV_accessory.js.

How exactly did you update the Samsung plugin with that? Any way you could share the files you modified with me?

Basically I replaced Service.Switch with Service.Television, and added new required Characteristic such as .Active (which replaces .On). This should give you the minimum of having the new icon and the on/off switch. Haven't got anywhere further than that.

Where is the location of the file you updated?

tavicu commented 5 years ago

I'm ready to help too @tavicu can't wait! can 2.1.3 be done first to update the current plugin to have the new icon and identifier? then perhaps the features are v3?

First i must see how it works with devices that are not on ios 12.2. If it doesn’t work with them i will do a branch and come with instructions on how to install it!

But right now i’m in vacation until next week and i can’t :(

dibble9012 commented 5 years ago

This is what is displayed on a non-beta system. Just says accessory is not supported. On my iOS device with beta 12.2 I got the tv to show up as a tv, and turn on and off, but not much else.

screen shot 2019-01-27 at 01 51 47
JonoHaysom commented 5 years ago

looks good Dibble. how did you update the plugin to ID your Samsung as a TV?

dibble9012 commented 5 years ago

If you're on a Mac the file is located at /usr/local/lib/node_modules/homebridge_samsung_tizen/lib

Edit SamsungAccessory.js Line number 27, change "switch" to "television" Line number 28, change "On" to "Active"

That's as far as I've gotten. It does allow on and off control.

dibble9012 commented 5 years ago

This is what it looks like on the newest beta, input is not working yet. The "Samsung Q6" switch is from another Homebridge instance. The "Samsung Q6" Television object is part of my test environment. img_0914 img_0913

JonoHaysom commented 5 years ago

Thanks @dibble9012 all working here now!

tavicu commented 5 years ago

Cool! So this breaks it for users that don’t have ios 12.2

I will create a new branch just to change the type and then i will play with options and see how we cand implement Inputs, speaker snd other things that are supported :)

luizjunior commented 5 years ago

Replacing lines 27 and 28 works. How about the inputs and volume?

    this.service        = new this.hap.Service.Television(this.name);
    this.characteristic = this.service.getCharacteristic(this.hap.Characteristic.Active);

Check this project, that works on Sony Android TV: https://github.com/arnif/homebridge-sony-television

stephenmd commented 5 years ago

does replacing lines 27 & 28 on a pi work the same as you guys say?

luizjunior commented 5 years ago

does replacing lines 27 & 28 on a pi work the same as you guys say?

Yes, but be aware of camel case letters... I've pasted the corrected code above.

Also, you have to install iOS 12.2 beta.

There's still work to do, because TV names on the iPhone are being erased every time I reboot Homebridge.

andrewmcd7 commented 5 years ago

Switching the 2 lines broke it for me :( then tried changing it back and it’s still broken. :( ahhhh

JonoHaysom commented 5 years ago

Reset the homebridge instance

Best,

Jonathan

On 28 Jan 2019, at 16:07, andrewmcd7 notifications@github.com wrote:

Switching the 2 lines broke it for me :( then tried changing it back and it’s still broken. :( ahhhh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

marithpl commented 5 years ago

Can't wait for TV accessory :) I saw Bravia & LG community have already this feature in homebridge ;)

NielsLeenheer commented 5 years ago

Been playing around with this and I've got the remote keys working 🎉.

Wasn't too hard. Basically just one more characteristic that is added to the Television service that gets a callback when a button is pressed in the "AppleTV remote widget". And then map to the right Samsung keys and send them to the television.

NielsLeenheer commented 5 years ago

Volume keys are also working 🍻

When opening up the remote widget you can press the volume buttons on the phone and it will send the button presses to the television.

tavicu commented 5 years ago

That’s awesome! Can you make a pull request so we can see the changes?

NielsLeenheer commented 5 years ago

Will do. But it is definitely not suitable to land the PR. It is basically just hacking in my local node_modules folder. Working on inputs now.

NielsLeenheer commented 5 years ago

Created PR #54 with everything so far including input switching....

Right now it allows input switching between the sources menu, HDMI input (cycling through them) and Netflix. What I'd really like is to make this configurable by the user and select inputs directly. For example go to Live TV, or a specific HDMI port or open an app. The last thing I can do. But I haven't figured out how I can send a command to the television that switched to a specific HDMI port or even turn on Live TV. Is that even possible?

tavicu commented 5 years ago

Unfortunately no, there is no key to select a specific HDMI port :(

Pensive commented 5 years ago

Oh man that’s so Samsung it’s unbelievable.

Undocumented discrete IR hdmi select - check Rs232 control - check Api control of hdmi source? The fundamental thing a television does in 2019? No.....

dibble9012 commented 5 years ago

Oh man that’s so Samsung it’s unbelievable.

Undocumented discrete IR hdmi select - check Rs232 control - check Api control of hdmi source? The fundamental thing a television does in 2019? No.....

I contacted Samsung support to request HomeKit support (I'm guessing they don't want it because of their own buggy Smartthings support). This is their weak reply:

We appreciate your innovative ideas. Thank you for your interest in sharing your idea with Samsung. However, our long-standing company policy does not allow us to accept or consider suggestions for new product designs/features for commercial use other than those we have specifically requested. Samsung receive hundreds of requests each year and wish we could fulfill all of them. We are unable to satisfy your request at this time. We will keep your information on file in the event that our focus should change in the future.

dibble9012 commented 5 years ago

Any idea why my volume shows up as a lightbulb? It does not control the volume either. The plugin works with on/off control and input control.

greensouth commented 5 years ago

Maybe sending remote key presses, is not the correct approach.

https://github.com/kdschlosser/samsungctl

I think accessing the API directly, would help. But I'm new to this, I'm just thinking :)

NielsLeenheer commented 5 years ago

I'm afraid I haven't found another API method to navigate to sources...

But I've added a way to make the source configurable. What you can do is send multiple commands, for example, open the sources menu, go left a couple of times to make sure you are on the first item in the sources list. Then go right until you go to the source you want. Then press Select. It is kind of annoying, but it works 🤷🏻‍♂️

NielsLeenheer commented 5 years ago

This is my configuration for the sources:

{
    "platform": "SamsungTizen",
    "refresh": true,
    "devices": [{
        "name": "Television",
        "ip": "192.168.x.x",
        "mac": "XX:XX:XX:XX:XX:XX",
        "token": "12345678",
        "sources": [
                { "name": "YouTube", "app": "111299001912" },
                { "name": "Netflix", "app": "11101200001" },
                { "name": "Prime Video", "app": "3201512006785" },
                { "name": "XBox One", "command": [ "KEY_SOURCE", "KEY_LEFT", "KEY_LEFT", "KEY_LEFT", "KEY_RIGHT", "KEY_ENTER" ] },
                { "name": "Apple TV", "command": [ "KEY_SOURCE", "KEY_LEFT", "KEY_LEFT", "KEY_LEFT", "KEY_RIGHT", "KEY_RIGHT", "KEY_RIGHT", "KEY_ENTER" ] },
                { "name": "Live TV", "command": [ "KEY_SOURCE", "KEY_LEFT", "KEY_LEFT", "KEY_LEFT", "KEY_ENTER" ] }
        ]
    }]
}

And the result: img_757827187dcf-1

beninspain commented 5 years ago

NielsLeenheer great work. Have you tried adding a second TV. I did and the remote part is only showing the first TV i added.

beninspain commented 5 years ago

I also mapped the (i) button to menu instead of tools

as tools doesn't do anything on my TV

NielsLeenheer commented 5 years ago

NielsLeenheer great work. Have you tried adding a second TV. I did and the remote part is only showing the first TV i added.

I haven't tried that. I only have one Samsung TV. Given the structure of how this plugin is build I don't think it is a limitation of this plugin. Maybe it is a bug in iOS 12.2 beta 1? Or perhaps a limitation of the remote widget itself?

greensouth commented 5 years ago

It's interesting the "samsungctl" project. Instead of sending key press actions, they connect to the TV using websockets and can send commands for volume changing (passing values 0-100% instead of sending several keypresses). They have methods for changing to specific sources, but still have to try it at home (I'm sending commands from the office to my raspberry to annoy my wife who is at home, changing the volume) an seems to work (not the settings for brightness/contrast/sharpness).

If it works, I think it would be a nice entry point for a more advance way to invoque commands.

JonoHaysom commented 5 years ago

Agreed, I think we have the right base to follow their instruction set and the wrapper with the sync with this project. Cant wait for this to be updated!

On 30 Jan 2019, at 3:55 pm, greensouth notifications@github.com wrote:

It's interesting the "samsungctl" project. Instead of sending key press actions, they connect to the TV using websockets and can send commands for volume changing (passing values 0-100% instead of sending several keypresses). They have methods for changing to specific sources, but still have to try it at home (I'm sending commands from the office to my raspberry to annoy my wife who is at home, changing the volume) an seems to work (not the settings for brightness/contrast/sharpness).

If it works, I think it would be a nice entry point for a more advance way to invoque commands.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tavicu/homebridge-samsung-tizen/issues/50#issuecomment-458917881, or mute the thread https://github.com/notifications/unsubscribe-auth/AIASU0AmsEBZ8CqwD9eF7TQrtm5fs6PCks5vIYhGgaJpZM4aRpEC.

tavicu commented 5 years ago

Samsungctl uses the same method like my plugin.

The only difference is that i use secure websocket :) That’s why pairing is needed!

In the new version i will give the possibility to disable secure websocket for those who didn’t update the tv to latest software which requires secure connection.

NielsLeenheer commented 5 years ago

I've been going over the source of samsungctl and in addition to the websocket api, they also use UPNP MainTVAgent2 to have more control over input sources and channels, among other things.

So there is a different API that we can possibly use.

greensouth commented 5 years ago

So proud of all of you, joining efforts to achieve the best. Wish I had more knowledge to help with it.

And bad news, UPNP MainTVAgent2 doesn't support tv from series J and K and the newer ones. All of them are TIZEN based.

https://developer.samsung.com/forum/thread/upnp-maintvagent2/201/312624?boardName=SDK&listLines=30&startId=zzzzz~&startPage=14&curPage=16

tavicu commented 5 years ago

Is ios 12.2 stable enough to install it on my main device?

dibble9012 commented 5 years ago

It definitely is a beta release, I’ve had safari crash and a few other weird bugs. Nothing that makes my device unusable, but just keep that in mind. Is it worth it for the the changes? Probably not, but I like testing betas so it doesn’t bother me too much. I have noticed that CarPlay connectivity is MUCH better on my Chevy Volt so that’s a plus!

NielsLeenheer commented 5 years ago

Is ios 12.2 stable enough to install it on my main device?

I did, but I am experiencing some connectivity issues. Not sure if it is my provider, or the beta.

NielsLeenheer commented 5 years ago

And I've tried MainTVAgent2, but it is not available on my television. So it stops there for me.

greensouth commented 5 years ago

I see so much potential to this (even not working for me because of pairing issues for my K series - 2016 model).

Wish if you could take a look at this, @tavicu . He has the perfect library for Samsung, you have the perfect Homebridge plugin. Why not working together?

https://github.com/kdschlosser/samsungctl/issues/88#issuecomment-459302077

kdschlosser commented 5 years ago

I thought I would share the full key code list for samsung TV's.

I know this is going to make at least one user happy. There are discrete key codes for the sources.

KEY_MAPPINGS = (
    ('Power Keys ', (
        ('Power OFF',                        'KEY_POWEROFF'),
        ('Power On',                         'KEY_POWERON'),
        ('Power Toggle',                     'KEY_POWER')
    )),
    ('Input Keys ', (
        ('Source',                           'KEY_SOURCE'),
        ('Component 1',                      'KEY_COMPONENT1'),
        ('Component 2',                      'KEY_COMPONENT2'),
        ('AV 1',                             'KEY_AV1'),
        ('AV 2',                             'KEY_AV2'),
        ('AV 3',                             'KEY_AV3'),
        ('S Video 1',                        'KEY_SVIDEO1'),
        ('S Video 2',                        'KEY_SVIDEO2'),
        ('S Video 3',                        'KEY_SVIDEO3'),
        ('HDMI',                             'KEY_HDMI'),
        ('HDMI 1',                           'KEY_HDMI1'),
        ('HDMI 2',                           'KEY_HDMI2'),
        ('HDMI 3',                           'KEY_HDMI3'),
        ('HDMI 4',                           'KEY_HDMI4'),
        ('FM Radio',                         'KEY_FM_RADIO'),
        ('DVI',                              'KEY_DVI'),
        ('DVR',                              'KEY_DVR'),
        ('TV',                               'KEY_TV'),
        ('Analog TV',                        'KEY_ANTENA'),
        ('Digital TV',                       'KEY_DTV')
    )),
    ('Number Keys ', (
        ('Key1',                             'KEY_1'),
        ('Key2',                             'KEY_2'),
        ('Key3',                             'KEY_3'),
        ('Key4',                             'KEY_4'),
        ('Key5',                             'KEY_5'),
        ('Key6',                             'KEY_6'),
        ('Key7',                             'KEY_7'),
        ('Key8',                             'KEY_8'),
        ('Key9',                             'KEY_9'),
        ('Key0',                             'KEY_0')
    )),
    ('Misc Keys ', (
        ('3D',                               'KEY_PANNEL_CHDOWN'),
        ('AnyNet+',                          'KEY_ANYNET'),
        ('Energy Saving',                    'KEY_ESAVING'),
        ('Sleep Timer',                      'KEY_SLEEP'),
        ('DTV Signal',                       'KEY_DTV_SIGNAL')
    )),
    ('Channel Keys ', (
        ('Channel Up',                       'KEY_CHUP'),
        ('Channel Down',                     'KEY_CHDOWN'),
        ('Previous Channel',                 'KEY_PRECH'),
        ('Favorite Channels',                'KEY_FAVCH'),
        ('Channel List',                     'KEY_CH_LIST'),
        ('Auto Program',                     'KEY_AUTO_PROGRAM'),
        ('Magic Channel',                    'KEY_MAGIC_CHANNEL'),
    )),
    ('Volume Keys ', (
        ('Volume Up',                        'KEY_VOLUP'),
        ('Volume Down',                      'KEY_VOLDOWN'),
        ('Mute',                             'KEY_MUTE')
    )),
    ('Direction Keys ', (
        ('Navigation Up',                    'KEY_UP'),
        ('Navigation Down',                  'KEY_DOWN'),
        ('Navigation Left',                  'KEY_LEFT'),
        ('Navigation Right',                 'KEY_RIGHT'),
        ('Navigation Return/Back',           'KEY_RETURN'),
        ('Navigation Enter',                 'KEY_ENTER')
    )),
    ('Media Keys ', (
        ('Rewind',                           'KEY_REWIND'),
        ('Stop',                             'KEY_STOP'),
        ('Play',                             'KEY_PLAY'),
        ('Fast Forward',                     'KEY_FF'),
        ('Record',                           'KEY_REC'),
        ('Pause',                            'KEY_PAUSE'),
        ('Live',                             'KEY_LIVE'),
        ('fnKEY_QUICK_REPLAY',               'KEY_QUICK_REPLAY'),
        ('fnKEY_STILL_PICTURE',              'KEY_STILL_PICTURE'),
        ('fnKEY_INSTANT_REPLAY',             'KEY_INSTANT_REPLAY')
    )),
    ('Picture in Picture ', (
        ('PIP On/Off',                       'KEY_PIP_ONOFF'),
        ('PIP Swap',                         'KEY_PIP_SWAP'),
        ('PIP Size',                         'KEY_PIP_SIZE'),
        ('PIP Channel Up',                   'KEY_PIP_CHUP'),
        ('PIP Channel Down',                 'KEY_PIP_CHDOWN'),
        ('PIP Small',                        'KEY_AUTO_ARC_PIP_SMALL'),
        ('PIP Wide',                         'KEY_AUTO_ARC_PIP_WIDE'),
        ('PIP Bottom Right',                 'KEY_AUTO_ARC_PIP_RIGHT_BOTTOM'),
        ('PIP Source Change',                'KEY_AUTO_ARC_PIP_SOURCE_CHANGE'),
        ('PIP Scan',                         'KEY_PIP_SCAN')
    )),
    ('Modes ', (
        ('VCR Mode',                         'KEY_VCR_MODE'),
        ('CATV Mode',                        'KEY_CATV_MODE'),
        ('DSS Mode',                         'KEY_DSS_MODE'),
        ('TV Mode',                          'KEY_TV_MODE'),
        ('DVD Mode',                         'KEY_DVD_MODE'),
        ('STB Mode',                         'KEY_STB_MODE'),
        ('PC Mode',                          'KEY_PCMODE')
    )),
    ('Color Keys ', (
        ('Green',                            'KEY_GREEN'),
        ('Yellow',                           'KEY_YELLOW'),
        ('Cyan',                             'KEY_CYAN'),
        ('Red',                              'KEY_RED')
    )),
    ('Teletext ', (
        ('Teletext Mix',                     'KEY_TTX_MIX'),
        ('Teletext Subface',                 'KEY_TTX_SUBFACE')
    )),
    ('Aspect Ratio ', (
        ('Aspect Ratio',                     'KEY_ASPECT'),
        ('Picture Size',                     'KEY_PICTURE_SIZE'),
        ('Aspect Ratio 4:3',                 'KEY_4_3'),
        ('Aspect Ratio 16:9',                'KEY_16_9'),
        ('Aspect Ratio 3:4 (Alt)',           'KEY_EXT14'),
        ('Aspect Ratio 16:9 (Alt)',          'KEY_EXT15')
    )),
    ('Picture Mode ', (
        ('Picture Mode',                     'KEY_PMODE'),
        ('Picture Mode Panorama',            'KEY_PANORAMA'),
        ('Picture Mode Dynamic',             'KEY_DYNAMIC'),
        ('Picture Mode Standard',            'KEY_STANDARD'),
        ('Picture Mode Movie',               'KEY_MOVIE1'),
        ('Picture Mode Game',                'KEY_GAME'),
        ('Picture Mode Custom',              'KEY_CUSTOM'),
        ('Picture Mode Movie (Alt)',         'KEY_EXT9'),
        ('Picture Mode Standard (Alt)',      'KEY_EXT10')
    )),
    ('Menus ', (
        ('Menu',                             'KEY_MENU'),
        ('Top Menu',                         'KEY_TOPMENU'),
        ('Tools',                            'KEY_TOOLS'),
        ('Home',                             'KEY_HOME'),
        ('Contents',                         'KEY_CONTENTS'),
        ('Guide',                            'KEY_GUIDE'),
        ('Disc Menu',                        'KEY_DISC_MENU'),
        ('DVR Menu',                         'KEY_DVR_MENU'),
        ('Help',                             'KEY_HELP')
    )),
    ('OSD ', (
        ('Info',                             'KEY_INFO'),
        ('Caption',                          'KEY_CAPTION'),
        ('ClockDisplay',                     'KEY_CLOCK_DISPLAY'),
        ('Setup Clock',                      'KEY_SETUP_CLOCK_TIMER'),
        ('Subtitle',                         'KEY_SUB_TITLE'),
    )),
    ('Zoom ', (
        ('Zoom Move',                        'KEY_ZOOM_MOVE'),
        ('Zoom In',                          'KEY_ZOOM_IN'),
        ('Zoom Out',                         'KEY_ZOOM_OUT'),
        ('Zoom 1',                           'KEY_ZOOM1'),
        ('Zoom 2',                           'KEY_ZOOM2')
    )),
    ('Other Keys ', (
        ('Wheel Left',                       'KEY_WHEEL_LEFT'),
        ('Wheel Right',                      'KEY_WHEEL_RIGHT'),
        ('Add/Del',                          'KEY_ADDDEL'),
        ('Plus 100',                         'KEY_PLUS100'),
        ('AD',                               'KEY_AD'),
        ('Link',                             'KEY_LINK'),
        ('Turbo',                            'KEY_TURBO'),
        ('Convergence',                      'KEY_CONVERGENCE'),
        ('Device Connect',                   'KEY_DEVICE_CONNECT'),
        ('Key 11',                           'KEY_11'),
        ('Key 12',                           'KEY_12'),
        ('Key Factory',                      'KEY_FACTORY'),
        ('Key 3SPEED',                       'KEY_3SPEED'),
        ('Key RSURF',                        'KEY_RSURF'),
        ('FF_',                              'KEY_FF_'),
        ('REWIND_',                          'KEY_REWIND_'),
        ('Angle',                            'KEY_ANGLE'),
        ('Reserved 1',                       'KEY_RESERVED1'),
        ('Program',                          'KEY_PROGRAM'),
        ('Bookmark',                         'KEY_BOOKMARK'),
        ('Print',                            'KEY_PRINT'),
        ('Clear',                            'KEY_CLEAR'),
        ('V Chip',                           'KEY_VCHIP'),
        ('Repeat',                           'KEY_REPEAT'),
        ('Door',                             'KEY_DOOR'),
        ('Open',                             'KEY_OPEN'),
        ('DMA',                              'KEY_DMA'),
        ('MTS',                              'KEY_MTS'),
        ('DNIe',                             'KEY_DNIe'),
        ('SRS',                              'KEY_SRS'),
        ('Convert Audio Main/Sub',           'KEY_CONVERT_AUDIO_MAINSUB'),
        ('MDC',                              'KEY_MDC'),
        ('Sound Effect',                     'KEY_SEFFECT'),
        ('PERPECT Focus',                    'KEY_PERPECT_FOCUS'),
        ('Caller ID',                        'KEY_CALLER_ID'),
        ('Scale',                            'KEY_SCALE'),
        ('Magic Bright',                     'KEY_MAGIC_BRIGHT'),
        ('W Link',                           'KEY_W_LINK'),
        ('DTV Link',                         'KEY_DTV_LINK'),
        ('Application List',                 'KEY_APP_LIST'),
        ('Back MHP',                         'KEY_BACK_MHP'),
        ('Alternate MHP',                    'KEY_ALT_MHP'),
        ('DNSe',                             'KEY_DNSe'),
        ('RSS',                              'KEY_RSS'),
        ('Entertainment',                    'KEY_ENTERTAINMENT'),
        ('ID Input',                         'KEY_ID_INPUT'),
        ('ID Setup',                         'KEY_ID_SETUP'),
        ('Any View',                         'KEY_ANYVIEW'),
        ('MS',                               'KEY_MS'),
        ('KEY_MORE',                         'KEY_MORE'),
        ('KEY_MIC',                          'KEY_MIC'),
        ('KEY_NINE_SEPERATE',                'KEY_NINE_SEPERATE'),
        ('Auto Format',                      'KEY_AUTO_FORMAT'),
        ('DNET',                             'KEY_DNET')
    )),
    ('Auto Arc Keys ', (
        ('KEY_AUTO_ARC_C_FORCE_AGING',       'KEY_AUTO_ARC_C_FORCE_AGING'),
        ('KEY_AUTO_ARC_CAPTION_ENG',         'KEY_AUTO_ARC_CAPTION_ENG'),
        ('KEY_AUTO_ARC_USBJACK_INSPECT',     'KEY_AUTO_ARC_USBJACK_INSPECT'),
        ('KEY_AUTO_ARC_RESET',               'KEY_AUTO_ARC_RESET'),
        ('KEY_AUTO_ARC_LNA_ON',              'KEY_AUTO_ARC_LNA_ON'),
        ('KEY_AUTO_ARC_LNA_OFF',             'KEY_AUTO_ARC_LNA_OFF'),
        ('KEY_AUTO_ARC_ANYNET_MODE_OK',      'KEY_AUTO_ARC_ANYNET_MODE_OK'),
        ('KEY_AUTO_ARC_ANYNET_AUTO_START',   'KEY_AUTO_ARC_ANYNET_AUTO_START'),
        ('KEY_AUTO_ARC_CAPTION_ON',          'KEY_AUTO_ARC_CAPTION_ON'),
        ('KEY_AUTO_ARC_CAPTION_OFF',         'KEY_AUTO_ARC_CAPTION_OFF'),
        ('KEY_AUTO_ARC_PIP_DOUBLE',          'KEY_AUTO_ARC_PIP_DOUBLE'),
        ('KEY_AUTO_ARC_PIP_LARGE',           'KEY_AUTO_ARC_PIP_LARGE'),
        ('KEY_AUTO_ARC_PIP_LEFT_TOP',        'KEY_AUTO_ARC_PIP_LEFT_TOP'),
        ('KEY_AUTO_ARC_PIP_RIGHT_TOP',       'KEY_AUTO_ARC_PIP_RIGHT_TOP'),
        ('KEY_AUTO_ARC_PIP_LEFT_BOTTOM',     'KEY_AUTO_ARC_PIP_LEFT_BOTTOM'),
        ('KEY_AUTO_ARC_PIP_CH_CHANGE',       'KEY_AUTO_ARC_PIP_CH_CHANGE'),
        ('KEY_AUTO_ARC_AUTOCOLOR_SUCCESS',   'KEY_AUTO_ARC_AUTOCOLOR_SUCCESS'),
        ('KEY_AUTO_ARC_AUTOCOLOR_FAIL',      'KEY_AUTO_ARC_AUTOCOLOR_FAIL'),
        ('KEY_AUTO_ARC_JACK_IDENT',          'KEY_AUTO_ARC_JACK_IDENT'),
        ('KEY_AUTO_ARC_CAPTION_KOR',         'KEY_AUTO_ARC_CAPTION_KOR'),
        ('KEY_AUTO_ARC_ANTENNA_AIR',         'KEY_AUTO_ARC_ANTENNA_AIR'),
        ('KEY_AUTO_ARC_ANTENNA_CABLE',       'KEY_AUTO_ARC_ANTENNA_CABLE'),
        ('KEY_AUTO_ARC_ANTENNA_SATELLITE',   'KEY_AUTO_ARC_ANTENNA_SATELLITE'),
    )),
    ('Panel Keys ', (
        ('KEY_PANNEL_POWER',                 'KEY_PANNEL_POWER'),
        ('KEY_PANNEL_CHUP',                  'KEY_PANNEL_CHUP'),
        ('KEY_PANNEL_VOLUP',                 'KEY_PANNEL_VOLUP'),
        ('KEY_PANNEL_VOLDOW',                'KEY_PANNEL_VOLDOW'),
        ('KEY_PANNEL_ENTER',                 'KEY_PANNEL_ENTER'),
        ('KEY_PANNEL_MENU',                  'KEY_PANNEL_MENU'),
        ('KEY_PANNEL_SOURCE',                'KEY_PANNEL_SOURCE'),
        ('KEY_PANNEL_ENTER',                 'KEY_PANNEL_ENTER')
    )),
    ('Extended Keys ', (
        ('KEY_EXT1',                         'KEY_EXT1'),
        ('KEY_EXT2',                         'KEY_EXT2'),
        ('KEY_EXT3',                         'KEY_EXT3'),
        ('KEY_EXT4',                         'KEY_EXT4'),
        ('KEY_EXT5',                         'KEY_EXT5'),
        ('KEY_EXT6',                         'KEY_EXT6'),
        ('KEY_EXT7',                         'KEY_EXT7'),
        ('KEY_EXT8',                         'KEY_EXT8'),
        ('KEY_EXT11',                        'KEY_EXT11'),
        ('KEY_EXT12',                        'KEY_EXT12'),
        ('KEY_EXT13',                        'KEY_EXT13'),
        ('KEY_EXT16',                        'KEY_EXT16'),
        ('KEY_EXT17',                        'KEY_EXT17'),
        ('KEY_EXT18',                        'KEY_EXT18'),
        ('KEY_EXT19',                        'KEY_EXT19'),
        ('KEY_EXT20',                        'KEY_EXT20'),
        ('KEY_EXT21',                        'KEY_EXT21'),
        ('KEY_EXT22',                        'KEY_EXT22'),
        ('KEY_EXT23',                        'KEY_EXT23'),
        ('KEY_EXT24',                        'KEY_EXT24'),
        ('KEY_EXT25',                        'KEY_EXT25'),
        ('KEY_EXT26',                        'KEY_EXT26'),
        ('KEY_EXT27',                        'KEY_EXT27'),
        ('KEY_EXT28',                        'KEY_EXT28'),
        ('KEY_EXT29',                        'KEY_EXT29'),
        ('KEY_EXT30',                        'KEY_EXT30'),
        ('KEY_EXT31',                        'KEY_EXT31'),
        ('KEY_EXT32',                        'KEY_EXT32'),
        ('KEY_EXT33',                        'KEY_EXT33'),
        ('KEY_EXT34',                        'KEY_EXT34'),
        ('KEY_EXT35',                        'KEY_EXT35'),
        ('KEY_EXT36',                        'KEY_EXT36'),
        ('KEY_EXT37',                        'KEY_EXT37'),
        ('KEY_EXT38',                        'KEY_EXT38'),
        ('KEY_EXT39',                        'KEY_EXT39'),
        ('KEY_EXT40',                        'KEY_EXT40'),
        ('KEY_EXT41',                        'KEY_EXT41')
    ))
)
kdschlosser commented 5 years ago

I forgot a remote code.

start voice recognition

{
    "method": "ms.remote.control",
    "params": {
        "Cmd": "Press",
        "DataOfCmd": "KEY_BT_VOICE",
        "Option": "false",
        "TypeOfRemote": "SendRemoteKey"
    }
}

packet recieved over websocket letting you know that voice recognition has started

{
    "event": "ms.voiceApp.standby"
}

stop voice recognition

{
    "method": "ms.remote.control",
    "params": {
        "Cmd": "Release",
        "DataOfCmd": "KEY_BT_VOICE",
        "Option": "false",
        "TypeOfRemote": "SendRemoteKey"
    }
}

packet recieved over websocket letting you know that voice recognition has stopped

{
    "event": "ms.voiceApp.hide"
}
tavicu commented 5 years ago

I had some time today to play with the new Service.

@NielsLeenheer i tried your branch but i didn't manage to get the speaker volume and remote inputs to work. Did you manage to make them work? :)