Closed merdok closed 6 years ago
still thinking if we really need this - I would suggest to use the connect and close events to keep track on the connection status. Example:
var lgtv = require("lgtv2")();
var tvConnected;
lgtv.on('close', function () {
tvConnected = false;
});
lgtv.on('connect', function () {
tvConnected = true;
});
That is true, the events could be also used for keeping track of the connection status, but i was thinking that it would be better to use the internal connection property since it is already anyway there and has the needed information to tell the current tv status.
Added status getter. I think a status getter is needed to tell if the TV is turned on or off.