Skip to content

Commit

Permalink
Added pylgtv from PR #18 @poroping send_button
Browse files Browse the repository at this point in the history
  • Loading branch information
MadmanMonty committed Nov 17, 2019
1 parent f5e01ec commit 6690240
Show file tree
Hide file tree
Showing 4 changed files with 587 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pylgtv/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .webos_client import WebOsClient
from .webos_client import PyLGTVPairException
38 changes: 38 additions & 0 deletions pylgtv/endpoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
EP_GET_SERVICES = "api/getServiceList"
EP_SET_MUTE = "audio/setMute"
EP_GET_AUDIO_STATUS = "audio/getStatus"
EP_GET_VOLUME = "audio/getVolume"
EP_SET_VOLUME = "audio/setVolume"
EP_VOLUME_UP = "audio/volumeUp"
EP_VOLUME_DOWN= "audio/volumeDown"
EP_GET_CURRENT_APP_INFO = "com.webos.applicationManager/getForegroundAppInfo"
EP_LAUNCH_APP = "com.webos.applicationManager/launch"
EP_GET_APPS = "com.webos.applicationManager/listLaunchPoints"
EP_GET_APP_STATUS = "com.webos.service.appstatus/getAppStatus"
EP_SEND_ENTER = "com.webos.service.ime/sendEnterKey"
EP_SEND_DELETE = "com.webos.service.ime/deleteCharacters"
EP_3D_ON = "com.webos.service.tv.display/set3DOn"
EP_3D_OFF = "com.webos.service.tv.display/set3DOff"
EP_GET_SOFTWARE_INFO = "com.webos.service.update/getCurrentSWInformation"
EP_MEDIA_PLAY = "media.controls/play"
EP_MEDIA_STOP = "media.controls/stop"
EP_MEDIA_PAUSE = "media.controls/pause"
EP_MEDIA_REWIND = "media.controls/rewind"
EP_MEDIA_FAST_FORWARD = "media.controls/fastForward"
EP_MEDIA_CLOSE = "media.viewer/close"
EP_POWER_OFF = "system/turnOff"
EP_POWER_ON = "system/turnOn"
EP_SHOW_MESSAGE = "system.notifications/createToast"
EP_LAUNCHER_CLOSE = "system.launcher/close"
EP_GET_APP_STATE = "system.launcher/getAppState"
EP_LAUNCH = "system.launcher/launch"
EP_OPEN = "system.launcher/open"
EP_TV_CHANNEL_DOWN = "tv/channelDown"
EP_TV_CHANNEL_UP = "tv/channelUp"
EP_GET_TV_CHANNELS = "tv/getChannelList"
EP_GET_CHANNEL_INFO = "tv/getChannelProgramInfo"
EP_GET_CURRENT_CHANNEL = "tv/getCurrentChannel"
EP_GET_INPUTS = "tv/getExternalInputList"
EP_SET_CHANNEL = "tv/openChannel"
EP_SET_INPUT = "tv/switchInput"
EP_CLOSE_WEB_APP = "webapp/closeWebApp"
74 changes: 74 additions & 0 deletions pylgtv/handshake.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"type": "register",
"id": "register_0",
"payload": {
"forcePairing": false,
"pairingType": "PROMPT",
"manifest": {
"manifestVersion": 1,
"appVersion": "1.1",
"signed": {
"created": "20140509",
"appId": "com.lge.test",
"vendorId": "com.lge",
"localizedAppNames": {
"": "LG Remote App",
"ko-KR": "리모컨 앱",
"zxx-XX": "ЛГ Rэмotэ AПП"
},
"localizedVendorNames": {
"": "LG Electronics"
},
"permissions": [
"TEST_SECURE",
"CONTROL_INPUT_TEXT",
"CONTROL_MOUSE_AND_KEYBOARD",
"READ_INSTALLED_APPS",
"READ_LGE_SDX",
"READ_NOTIFICATIONS",
"SEARCH",
"WRITE_SETTINGS",
"WRITE_NOTIFICATION_ALERT",
"CONTROL_POWER",
"READ_CURRENT_CHANNEL",
"READ_RUNNING_APPS",
"READ_UPDATE_INFO",
"UPDATE_FROM_REMOTE_APP",
"READ_LGE_TV_INPUT_EVENTS",
"READ_TV_CURRENT_TIME"
],
"serial": "2f930e2d2cfe083771f68e4fe7bb07"
},
"permissions": [
"LAUNCH",
"LAUNCH_WEBAPP",
"APP_TO_APP",
"CLOSE",
"TEST_OPEN",
"TEST_PROTECTED",
"CONTROL_AUDIO",
"CONTROL_DISPLAY",
"CONTROL_INPUT_JOYSTICK",
"CONTROL_INPUT_MEDIA_RECORDING",
"CONTROL_INPUT_MEDIA_PLAYBACK",
"CONTROL_INPUT_TV",
"CONTROL_POWER",
"READ_APP_STATUS",
"READ_CURRENT_CHANNEL",
"READ_INPUT_DEVICE_LIST",
"READ_NETWORK_STATE",
"READ_RUNNING_APPS",
"READ_TV_CHANNEL_LIST",
"WRITE_NOTIFICATION_TOAST",
"READ_POWER_STATE",
"READ_COUNTRY_INFO"
],
"signatures": [
{
"signatureVersion": 1,
"signature": "eyJhbGdvcml0aG0iOiJSU0EtU0hBMjU2Iiwia2V5SWQiOiJ0ZXN0LXNpZ25pbmctY2VydCIsInNpZ25hdHVyZVZlcnNpb24iOjF9.hrVRgjCwXVvE2OOSpDZ58hR+59aFNwYDyjQgKk3auukd7pcegmE2CzPCa0bJ0ZsRAcKkCTJrWo5iDzNhMBWRyaMOv5zWSrthlf7G128qvIlpMT0YNY+n/FaOHE73uLrS/g7swl3/qH/BGFG2Hu4RlL48eb3lLKqTt2xKHdCs6Cd4RMfJPYnzgvI4BNrFUKsjkcu+WD4OO2A27Pq1n50cMchmcaXadJhGrOqH5YmHdOCj5NSHzJYrsW0HPlpuAx/ECMeIZYDh6RMqaFM2DXzdKX9NmmyqzJ3o/0lkk/N97gfVRLW5hA29yeAwaCViZNCP8iC9aO0q9fQojoa7NQnAtw=="
}
]
}
}
}
Loading

0 comments on commit 6690240

Please sign in to comment.