GithubHelp home page GithubHelp logo

oh1kk / lgwebosremote Goto Github PK

View Code? Open in Web Editor NEW

This project forked from klattimer/lgwebosremote

1.0 3.0 0.0 45 KB

Command line webOS remote for LGTVs

License: MIT License

Python 98.77% Shell 1.23%

lgwebosremote's Introduction

LGWebOSRemote

Command line webOS remote for LGTVs. This tool uses a connection via websockets to port 3000 on newer LG TVs, there are other tools which use a restful connection to port 8080 however that port is closed on newer firmware versions.

Supported models

Tested with

  • UF830V
  • UH650V
  • HU80KG.AEU (CineBeam 4K)
  • [please add more!]

Tested with python 2.7 on mac/linux and works fine, your mileage may vary with windows, patches welcome.

Likely supports

All devices with firmware major version 4, product name "webOSTV 2.0"

Available Commands

scan
auth                  Hostname/IP     Authenticate and exit, creates initial config ~/.lgtv.json
audioStatus           
audioVolume           
closeApp              appid
getTVChannel          
input3DOff            
input3DOn             
inputChannelDown      
inputChannelUp        
inputMediaFastForward  
inputMediaPause       
inputMediaPlay        
inputMediaRewind      
inputMediaStop        
listApps              
listChannels          
listInputs            
listServices          
mute                  muted
notification          message
off                   
on                    
openAppWithPayload    payload
openBrowserAt         url
openYoutubeId         videoid
openYoutubeURL        url
setInput              input_id
setTVChannel          channel
setVolume             level
startApp              appid
swInfo                
volumeDown            
volumeUp

Install

Requires wakeonlan, websocket for python and arp (in Debian/Ubuntu: apt-get install net-tools)

There's a requirements.txt included

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Example usage

# Scan/Authenticate
$ python lgtv.py scan 
{
    "count": 1, 
    "list": [
        {
            "address": "192.168.1.31", 
            "model": "UF830V", 
            "uuid": "10f34f86-0664-f223-4b8f-d16a772d9baf"
        }
    ], 
    "result": "ok"
}
$ python lgtv.py auth 192.168.1.31

$ python lgtv.py on
$ python lgtv.py off

# If you have the youtube plugin
$ python lgtv.py openYoutubeURL https://www.youtube.com/watch?v=dQw4w9WgXcQ

# Otherwise, this works reasonably well
$ python lgtv.py openBrowserAt https://www.youtube.com/tv#/watch?v=dQw4w9WgXcQ

Caveats

You need to auth with the TV before being able to use the on command as it requires the mac address.

Bugs

I couldn't test youtube because it seems the app isn't installed and not available to download right now maybe they're updating it?

lgwebosremote's People

Contributors

balcsida avatar chron0 avatar klattimer avatar oh1kk avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.