enocean-js / node-enocean

an enocean implementation for node.js
GNU General Public License v2.0
29 stars 14 forks source link

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated #13

Closed cflurin closed 8 years ago

cflurin commented 8 years ago

Hi, I tried basic.js, it works but I got this message:

(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================

Security context: 0x20e79031 <JS Object>#0#
    1: .node [module.js:568] [pc=0x2d97b344] (this=0x5d80aefd <an Object with map 0x3d50be8d>#1#,module=0x5d89e2e1 <a Module with map 0x3d50c179>#2#,filename=0x5d89e28d <String[70]: /home/pi/enocean/node_modules/serialport/build/Release/serialport.node>)
    2: load [module.js:458] [pc=0x2d941ad8] (this=0x5d89e2e1 <a Module with map 0x3d50c179>#2#,filename=0x5d89e28d <String[70]: /home/pi/enocean/node_modules/serialport/build/Release/serialport.node>)
    3: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x2d9415a8] (this=0x20e080c9 <undefined>,module=0x5d89e2e1 <a Module with map 0x3d50c179>#2#,filename=0x5d89e28d <String[70]: /home/pi/enocean/node_modules/serialport/build/Release/serialport.node>)
    4: _load [module.js:409] [pc=0x2d93c55c] (this=0x5d80af75 <JS Function Module (SharedFunctionInfo 0x5831c779)>#3#,request=0x5d89dcd9 <String[70]: /home/pi/enocean/node_modules/serialport/build/Release/serialport.node>,parent=0x5d80aed5 <a Module with map 0x3d50c179>#4#,isMain=0x20e08161 <false>)
    5: require [module.js:468] [pc=0x2d94cb98] (this=0x5d80aed5 <a Module with map 0x3d50c179>#4#,path=0x5d89dcd9 <String[70]: /home/pi/enocean/node_modules/serialport/build/Release/serialport.node>)
    6: require(aka require) [internal/module.js:20] [pc=0x2d94c86c] (this=0x20e080c9 <undefined>,path=0x5d89dcd9 <String[70]: /home/pi/enocean/node_modules/serialport/build/Release/serialport.node>)
    7: bindings [/home/pi/enocean/node_modules/bindings/bindings.js:76] [pc=0x2d975d14] (this=0x20e8c34d <JS Global Object>#5#,opts=0x5835d0e9 <String[15]: serialport.node>)
    8: /* anonymous */ [/home/pi/enocean/node_modules/serialport/lib/bindings.js:3] [pc=0x2d9743e4] (this=0x5d80b099 <an Object with map 0x3da09de5>#6#,exports=0x5d80b099 <an Object with map 0x3da09de5>#6#,require=0x5d80afb9 <JS Function require (SharedFunctionInfo 0x583391b9)>#7#,module=0x5d80af4d <a Module with map 0x3d50c179>#8#,__filename=0x5d80b055 <String[56]: /home/pi/enocean/node_modules/serialport/lib/bindings.js>,__dirname=0x5d80b041 <String[44]: /home/pi/enocean/node_modules/serialport/lib>)
    9: _compile [module.js:541] [pc=0x2d94bd04] (this=0x5d80af4d <a Module with map 0x3d50c179>#8#,content=0x5d80b425 <String[784]\: 'use strict';\n\nvar bindings = require('bindings')('serialport.node');\nvar listUnix = require('./list-unix');\n\nvar linux = process.platform !== 'win32' && process.platform !== 'darwin';\n\nfunction listLinux(callback) {\n  callback = callback || function(err) {\n    if (err) { this.emit('error', err) }\n  }.bind(this);\n  return listUnix(callback);\n};\n\nvar platformOptions = {};\nif (process.platform !== 'win32') {\n  platformOptions = {\n    vmin: 1,\n    vtime: 0\n  };\n}\n\nmodule.exports = {\n  close: bindings.close,\n  drain: bindings.drain,\n  flush: bindings.flush,\n  list: linux ? listLinux : bindings.list,\n  open: bindings.open,\n  SerialportPoller: bindings.SerialportPoller,\n  set: bindings.set,\n  update: bindings.update,\n  write: bindings.write,\n  platformOptions: platformOptions\n};\n>,filename=0x5d80b055 <String[56]: /home/pi/enocean/node_modules/serialport/lib/bindings.js>)
   10: .js [module.js:550] [pc=0x2d9434d4] (this=0x5d80aefd <an Object with map 0x3d50be8d>#1#,module=0x5d80af4d <a Module with map 0x3d50c179>#8#,filename=0x5d80b055 <String[56]: /home/pi/enocean/node_modules/serialport/lib/bindings.js>)
   11: load [module.js:458] [pc=0x2d941ad8] (this=0x5d80af4d <a Module with map 0x3d50c179>#8#,filename=0x5d80b055 <String[56]: /home/pi/enocean/node_modules/serialport/lib/bindings.js>)
   12: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x2d9415a8] (this=0x20e080c9 <undefined>,module=0x5d80af4d <a Module with map 0x3d50c179>#8#,filename=0x5d80b055 <String[56]: /home/pi/enocean/node_modules/serialport/lib/bindings.js>)
   13: _load [module.js:409] [pc=0x2d93c55c] (this=0x5d80af75 <JS Function Module (SharedFunctionInfo 0x5831c779)>#3#,request=0x5833d311 <String[10]: ./bindings>,parent=0x5d80b751 <a Module with map 0x3d50c179>#9#,isMain=0x20e08161 <false>)
   14: require [module.js:468] [pc=0x2d94cb98] (this=0x5d80b751 <a Module with map 0x3d50c179>#9#,path=0x5833d311 <String[10]: ./bindings>)
   15: require(aka require) [internal/module.js:20] [pc=0x2d94c86c] (this=0x20e080c9 <undefined>,path=0x5833d311 <String[10]: ./bindings>)
   16: /* anonymous */ [/home/pi/enocean/node_modules/serialport/lib/serialport.js:16] [pc=0x2d954554] (this=0x5d80b8bd <an Object with map 0x3da09de5>#10#,exports=0x5d80b8bd <an Object with map 0x3da09de5>#10#,require=0x5d80b799 <JS Function require (SharedFunctionInfo 0x583391b9)>#11#,module=0x5d80b751 <a Module with map 0x3d50c179>#9#,__filename=0x5d80b875 <String[58]: /home/pi/enocean/node_modules/serialport/lib/serialport.js>,__dirname=0x5d80b861 <String[44]: /home/pi/enocean/node_modules/serialport/lib>)
   17: _compile [module.js:541] [pc=0x2d94bd04] (this=0x5d80b751 <a Module with map 0x3d50c179>#9#,content=0x5d80ee2d <Very long string[13557]>#12#,filename=0x5d80b875 <String[58]: /home/pi/enocean/node_modules/serialport/lib/serialport.js>)
   18: .js [module.js:550] [pc=0x2d9434d4] (this=0x5d80aefd <an Object with map 0x3d50be8d>#1#,module=0x5d80b751 <a Module with map 0x3d50c179>#9#,filename=0x5d80b875 <String[58]: /home/pi/enocean/node_modules/serialport/lib/serialport.js>)
   19: load [module.js:458] [pc=0x2d941ad8] (this=0x5d80b751 <a Module with map 0x3d50c179>#9#,filename=0x5d80b875 <String[58]: /home/pi/enocean/node_modules/serialport/lib/serialport.js>)
   20: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x2d9415a8] (this=0x20e080c9 <undefined>,module=0x5d80b751 <a Module with map 0x3d50c179>#9#,filename=0x5d80b875 <String[58]: /home/pi/enocean/node_modules/serialport/lib/serialport.js>)
   21: _load [module.js:409] [pc=0x2d93c55c] (this=0x5d80af75 <JS Function Module (SharedFunctionInfo 0x5831c779)>#3#,request=0x5833ae21 <String[10]: serialport>,parent=0x5d812341 <a Module with map 0x3d50c179>#13#,isMain=0x20e08161 <false>)
   22: require [module.js:468] [pc=0x2d94cb98] (this=0x5d812341 <a Module with map 0x3d50c179>#13#,path=0x5833ae21 <String[10]: serialport>)
   23: require(aka require) [internal/module.js:20] [pc=0x2d94c86c] (this=0x20e080c9 <undefined>,path=0x5833ae21 <String[10]: serialport>)
   24: /* anonymous */ [/home/pi/enocean/node_modules/node-enocean/index.js:16] [pc=0x2d952a6c] (this=0x5d812461 <an Object with map 0x3da09de5>#14#,exports=0x5d812461 <an Object with map 0x3da09de5>#14#,require=0x5d812389 <JS Function require (SharedFunctionInfo 0x583391b9)>#15#,module=0x5d812341 <a Module with map 0x3d50c179>#13#,__filename=0x5d812421 <String[51]: /home/pi/enocean/node_modules/node-enocean/index.js>,__dirname=0x5d81240d <String[42]: /home/pi/enocean/node_modules/node-enocean>)
   25: _compile [module.js:541] [pc=0x2d94bd04] (this=0x5d812341 <a Module with map 0x3d50c179>#13#,content=0x5d81526d <Very long string[11665]>#16#,filename=0x5d812421 <String[51]: /home/pi/enocean/node_modules/node-enocean/index.js>)
   26: .js [module.js:550] [pc=0x2d9434d4] (this=0x5d80aefd <an Object with map 0x3d50be8d>#1#,module=0x5d812341 <a Module with map 0x3d50c179>#13#,filename=0x5d812421 <String[51]: /home/pi/enocean/node_modules/node-enocean/index.js>)
   27: load [module.js:458] [pc=0x2d941ad8] (this=0x5d812341 <a Module with map 0x3d50c179>#13#,filename=0x5d812421 <String[51]: /home/pi/enocean/node_modules/node-enocean/index.js>)
   28: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x2d9415a8] (this=0x20e080c9 <undefined>,module=0x5d812341 <a Module with map 0x3d50c179>#13#,filename=0x5d812421 <String[51]: /home/pi/enocean/node_modules/node-enocean/index.js>)
   29: _load [module.js:409] [pc=0x2d93c55c] (this=0x5d80af75 <JS Function Module (SharedFunctionInfo 0x5831c779)>#3#,request=0x58338d51 <String[3]: ../>,parent=0x5d81801d <a Module with map 0x3d50c179>#17#,isMain=0x20e08161 <false>)
   30: require [module.js:468] [pc=0x2d94cb98] (this=0x5d81801d <a Module with map 0x3d50c179>#17#,path=0x58338d51 <String[3]: ../>)
   31: require(aka require) [internal/module.js:20] [pc=0x2d94c86c] (this=0x20e080c9 <undefined>,path=0x58338d51 <String[3]: ../>)
   32: /* anonymous */ [/home/pi/enocean/node_modules/node-enocean/examples/basic.js:1] [pc=0x2d94c138] (this=0x5d818125 <an Object with map 0x3da09de5>#18#,exports=0x5d818125 <an Object with map 0x3da09de5>#18#,require=0x5d818065 <JS Function require (SharedFunctionInfo 0x583391b9)>#19#,module=0x5d81801d <a Module with map 0x3d50c179>#17#,__filename=0x5d8180dd <String[60]: /home/pi/enocean/node_modules/node-enocean/examples/basic.js>,__dirname=0x5d8180c9 <String[51]: /home/pi/enocean/node_modules/node-enocean/examples>)
   33: _compile [module.js:541] [pc=0x2d94bd04] (this=0x5d81801d <a Module with map 0x3d50c179>#17#,content=0x5d818419 <String[634]\: var enocean = require( "../" )();  // require node-enocen\n// start listening on the serialport \n// if you use the enocean pi on a raspberry pi use:\n// enocean.listen("/dev/ttyAMA0")\n// on Windows use:\n// enocean.listen("COM1") or whatever COM-port you are connected\nenocean.listen( "/dev/ttyUSB0" ); \n\nenocean.on( "data" , function( data ) {   // a telegram has been received\n\x09console.log( data );               // log it to the console\n\x09console.log(data.choice);\n\x09console.log(data.packetTypeString);\n\x09console.log(data.raw);\n  if (data.choice === "a5") {\n    var ar = enocean.getData("a5-02-05",data.raw)\n    console.log(ar);\n  }\n});\n>,filename=0x5d8180dd <String[60]: /home/pi/enocean/node_modules/node-enocean/examples/basic.js>)
   34: .js [module.js:550] [pc=0x2d9434d4] (this=0x5d80aefd <an Object with map 0x3d50be8d>#1#,module=0x5d81801d <a Module with map 0x3d50c179>#17#,filename=0x5d8180dd <String[60]: /home/pi/enocean/node_modules/node-enocean/examples/basic.js>)
   35: load [module.js:458] [pc=0x2d941ad8] (this=0x5d81801d <a Module with map 0x3d50c179>#17#,filename=0x5d8180dd <String[60]: /home/pi/enocean/node_modules/node-enocean/examples/basic.js>)
   36: tryModuleLoad(aka tryModuleLoad) [module.js:417] [pc=0x2d9415a8] (this=0x20e080c9 <undefined>,module=0x5d81801d <a Module with map 0x3d50c179>#17#,filename=0x5d8180dd <String[60]: /home/pi/enocean/node_modules/node-enocean/examples/basic.js>)
   37: _load [module.js:409] [pc=0x2d93c55c] (this=0x5d80af75 <JS Function Module (SharedFunctionInfo 0x5831c779)>#3#,request=0x5d8186b1 <String[60]: /home/pi/enocean/node_modules/node-enocean/examples/basic.js>,parent=0x20e08081 <null>,isMain=0x20e08129 <true>)
   38: runMain [module.js:575] [pc=0x2d93bfb8] (this=0x5d80af75 <JS Function Module (SharedFunctionInfo 0x5831c779)>#3#)
   39: startup(aka startup) [node.js:160] [pc=0x43143864] (this=0x20e080c9 <undefined>)
   40: /* anonymous */(aka /* anonymous */) [node.js:449] [pc=0x43140f74] (this=0x20e08081 <null>,process=0x20e888d5 <a process with map 0x3da0e8a9>#20#)

I'm running node v6.3.1 on a Raspberry Pi 2, Jessie 4.4.9 v7.

Any idea?

cflurin commented 8 years ago

Ok I've found a solution, I changed package.json:

  "dependencies": {
    "serialport": "^4.0.1"
  },

and index.js:

-- var SerialPort   = require( "serialport" ).SerialPort
++ var SerialPort   = require( "serialport" )
Holger-Will commented 8 years ago

great! thanks for finding the bug and especialy for finding the fix. Pull requests allways welcome!

Holger-Will commented 8 years ago

there are some breaking changes in 4.x so i go with 3.x for the time beeing. fixes the Problem as well. Thanks!

Holger-Will commented 8 years ago

spot on! thanks for finding this. I do have some problems sending data with 4.x, so i reverted to using 3.x.x . It works like a charm and fixes the Bug you found. Thanks again! cheers Holger

cflurin notifications@github.com schrieb am Mo., 25. Juli 2016 um 17:12 Uhr:

Ok I've found a solution, I changed package.json:

"dependencies": { "serialport": "^4.0.1" },

and index.js:

-- var SerialPort = require( "serialport" ).SerialPort ++ var SerialPort = require( "serialport" )

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Holger-Will/node-enocean/issues/13#issuecomment-234982915, or mute the thread https://github.com/notifications/unsubscribe-auth/AKToNKWVe6GxkKIQSKf6Kgpo5QE0hgWNks5qZNJVgaJpZM4JUJ9M .

Für Rückfragen stehe ich Ihnen gern zur Verfügung und verbleibe

mit freundlichen Grüßen

Holger Will Geschäftsführer

h.will@klimapartner.de | Telefon Durchwahl 030-555795529

Klimapartner Haustechnische Handels GmbH Bürgerstrasse 53, 12347 Berlin Telefon (+49 30) 55579-030 | Fax -0379 kontakt@klimapartner.de | www.klimapartner.de

Umsatzsteuer-ID: DE136745233

Amtsgericht Berlin-Charlottenburg HRB16359 Geschäftsführer: Holger Will

cflurin commented 8 years ago

Hi, I've installed v1.5.1 on a RPi 2, it works with "serialport": "^3.0.0" for me too.

BTW thanks for node-enocean. I'm working on an application using node-enocean, node-red and homebridge-mqtt.

Holger-Will commented 8 years ago

Fantastic! thanks for the feedback.

cflurin notifications@github.com schrieb am Sa., 20. Aug. 2016 um 11:37 Uhr:

Hi, I've installed v1.5.1 on a RPi 2, it works with "serialport": "^3.0.0" for me too.

BTW thanks for node-enocean. I'm working on an application using node-enocean, node-red http://nodered.org/ and homebridge-mqtt https://github.com/cflurin/homebridge-mqtt.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/Holger-Will/node-enocean/issues/13#issuecomment-241189950, or mute the thread https://github.com/notifications/unsubscribe-auth/AKToNHTg3iI-hRUN0L30VcDS69oNtScqks5qhsrHgaJpZM4JUJ9M .

Für Rückfragen stehe ich Ihnen gern zur Verfügung und verbleibe

mit freundlichen Grüßen

Holger Will Geschäftsführer

h.will@klimapartner.de | Telefon Durchwahl 030-555795529

Klimapartner Haustechnische Handels GmbH Bürgerstrasse 53, 12347 Berlin Telefon (+49 30) 55579-030 | Fax -0379 kontakt@klimapartner.de | www.klimapartner.de

Umsatzsteuer-ID: DE136745233

Amtsgericht Berlin-Charlottenburg HRB16359 Geschäftsführer: Holger Will