Coder Social home page Coder Social logo

lgtv-bridge's Introduction

Setup Guide

Node.js bridge to integrate LG Smart TV, Amazon Alexa + Slack

Software requirements

  • node.js
  • npm
  • ruby

To run on a local server

  • Enter your TV's MAC address and IP address into config.json
  • npm install
  • node index.js alexa

Creating a Docker image for Unraid

  • TBD

To do on the first run

  • Be sure your Alexa-ready device is up and running
  • On your TV, make sure that TV Mobile On (General settings) is set to ON
  • On your TV, make sure that LG Connect Apps (Network settings) is set to ON
  • Add the devices using the Alexa app (Settings -> Smart Home -> Add Device )
  • Wait about a minute, then say "Alexa turn TV on/off" or "Alexa start/stop [app name]"
  • The first time, turning on/off the TV will ask for permission. Just confirm the pairing and your bridge is ready!

Functions

Alexa bridge
node index.js alexa - Makes the vocal commands for TV and apps available

Toast
node index.js toast "[your message]" - Display a toast message on your TV

Apps list
node index.js appslist - Display all the apps installed on your Smart TV and provides some useful info (appID etc.)

Service list
node index.js serviceslist - Display a list of the available services and theirs API

Status
node index.js status - Display the TV status (ON or OFF), and if ON, shows the application in use

Application status
node index.js appstatus [app ID] - Display the status of the application specified by an ID

Mute on/off
node index.js mute [true|false] - Mute/Unmute your TV

Turn TV on/off
node index.js [tvon|tvoff] - Turn the TV on or off

Available vocal commands

  • Turn tv on/off: "Alexa, turn TV [on|off]"
  • Start/stop application: "Alexa, turn [on|off] [your app]" or "Alexa,[start|stop] [your app]"
  • Mute/unmute tv: "Alexa, turn muting mode [on|off]"
  • Switch inputs: "Alexa, start [HDMI1|HDMI2]"

Available applications

  • Netflix
  • Amazon Prime
  • MLB TV
  • Plex
  • Spotify

Add your application

It's possible to add your own application if you know the appID (and if you don't just run the appslist command to get a list). Add your application on apps.json, restart the Alexa bridge and run the device discovery on Alexa app on your mobile or at the Alexa website.

Thanks to

lgtv-bridge's People

Contributors

lballore avatar bigbadblo avatar sbeckeriv avatar

Watchers

 avatar  avatar

Forkers

sbeckeriv

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.