Comments (2)
I had the same error. Maybe the example code isn't correct, or maybe some javascript doesn't behave the same way everywhere.
But, I got it to work by specifying the module like this:
lg = require('lgtv-ip-control');
const tv = new lg.LGTV('192.168.0.13', 'xx:xx:xx:xx:xx:xx', 'xxxxxxx');
from lgtv-ip-control.
The package doesn't do anything if installed globally, it needs to be installed in the project's dependencies, and imported correctly:
const LGTV = require('lgtv-ip-control')
const tv = new LGTV('192.168.0.13', 'xx:xx:xx:xx:xx:xx', 'xxxxxxx');
from lgtv-ip-control.
Related Issues (20)
- Calling your library/class object from Node Red, I ultimately get a timeout? HOT 3
- Implement convenience function to wait until the TV turns on
- Handle getCurrentApp empty response when the TV is off
- Improve TinySocket connection status handling
- Figure out why building on macOS succeeds but never ends the process
- Design issue or not? Select input, if sceen mute on, previous input presented? HOT 1
- Installation failure HOT 3
- Connection refused for about 40 seconds after TV powers on HOT 1
- reference for lg ip control? HOT 1
- Readme Suggestion HOT 1
- `Promise<void>` is never resolved by `wrap()` in `TinySocket`
- Package has type "module", but `main` refers to a CommonJS file HOT 3
- screenOff not working on LG C2 HOT 5
- Add import example to README.md
- some functions do not working HOT 2
- Additional input for freesat HOT 3
- Example never exits? Sorry not that familiar with JS? HOT 4
- Example of how to retrieve active input?
- Home key does not work but live tv does? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lgtv-ip-control.