msloth / lgtv.js

Control LG WebOS TV using node.js
MIT License
249 stars 119 forks source link

Error on discover #10

Closed berkaytheunicorn closed 8 years ago

berkaytheunicorn commented 8 years ago

hey with new version now I got this


/Users/berkaey/Desktop/remote/node_modules/lgtv/index.js:236
    if (message.indexOf("LG Smart TV")) {
                ^
TypeError: Object HTTP/1.1 200 OK
Location: http://192.168.1.38:1221/
Cache-Control: max-age=1800
Server: WebOS/1.5 UPnP/1.0
EXT: 
USN: uuid:495280ac-09a0-1dd8-518b-2927978aae03::urn:dial-multiscreen-org:service:dial:1
ST: urn:dial-multiscreen-org:service:dial:1
Date: Wed, 04 Nov 2015 08:39:23 GMT

 has no method 'indexOf'
    at Socket.<anonymous> (/Users/berkaey/Desktop/remote/node_modules/lgtv/index.js:236:17)
    at Socket.emit (events.js:98:17)
    at UDP.onMessage (dgram.js:441:8)

btw I have node 0.10.36 as global

msloth commented 8 years ago

Try updating node. I'm running 4.0.0 I think. 0.10.x is really old and lots of breaking changes have come.

msloth commented 8 years ago

Please report your results :)

berkaytheunicorn commented 8 years ago

Im trying to use this with electron but I will try ;)

msloth commented 8 years ago

Any news? Have you tried latest node?

msloth commented 8 years ago

Can't reproduce, closing. Feel free to reopen if you have more input!