UNPKG
tellsock
Version:
latest (0.3.0)
0.3.0
0.1.2
0.1.1
0.1.0
0.0.3
0.0.2
0.0.1
pure sockets communication with tellstick
github.com/kmpm/node-tellsock
kmpm/node-tellsock
tellsock
/
examples
/
example2.js
16 lines
(9 loc)
•
248 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env node
var
TelldusEvents
=
require
(
'..'
).
TelldusEvents
;
var
te =
new
TelldusEvents
(); te.
on
(
'connect'
,
function
(
) {
console
.
log
(
'listening for events'
); }); te.
on
(
'message'
,
function
(
msg
) {
console
.
log
(
'message'
, msg); });