sirchia / pimatic-rflink

RFLink plugin for Pimatic
GNU General Public License v2.0
3 stars 5 forks source link

TypeError: Cannot read property 'indexOf' of undefined #13

Closed NemoN closed 8 years ago

NemoN commented 8 years ago
# node_modules/pimatic/pimatic.js
22:13:44.767 2016-07-14 Thursday
22:13:45.433 [pimatic] Starting pimatic version 0.9.28
22:13:45.733 [pimatic, ppm] 2.15.6
22:13:45.741 [pimatic] Loading plugin: "pimatic-cron" (0.8.8)
22:13:45.820 [pimatic] Loading plugin: "pimatic-mobile-frontend" (0.9.9)
22:13:45.920 [pimatic] Loading plugin: "pimatic-rflink" (0.6.0)
coffee-cache: compiling coffee-script file "rflink.coffee"...Done
coffee-cache: compiling coffee-script file "lib/board.coffee"...Done
coffee-cache: compiling coffee-script file "lib/serialport.coffee"...Done
coffee-cache: compiling coffee-script file "lib/protocol.coffee"...Done
coffee-cache: compiling coffee-script file "rflink-config-schema.coffee"...Done
22:13:46.432 [pimatic-cron] the time is: Thu Jul 14 2016 22:13:46 GMT+0200 (CEST)
coffee-cache: compiling coffee-script file "device-config-schema.coffee"...Done
22:13:46.571 [pimatic-mobile-frontend] packing static assets
22:13:46.623 [pimatic-mobile-frontend] packing static assets finished
22:13:46.624 [pimatic-mobile-frontend] rendering html
22:13:47.764 [pimatic-mobile-frontend] rendering html finished
22:13:47.773 [pimatic] Listening for HTTP-request on port 80...
22:13:47.781 [pimatic-rflink] Connected to rflink device.
22:14:43.412 [pimatic] A uncaught exception occured: TypeError: Cannot read property 'indexOf' of undefined
22:14:43.412 [pimatic]>    at Protocol.decodeLine (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/protocol.coffee:137:70)
22:14:43.412 [pimatic]>    at Board._processData (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/board.coffee:115:23)
22:14:43.412 [pimatic]>    at SerialPortDriver.<anonymous> (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/board.coffee:43:8)
22:14:43.412 [pimatic]>    at emitOne (events.js:77:13)
22:14:43.412 [pimatic]>    at SerialPortDriver.emit (events.js:169:7)
22:14:43.412 [pimatic]>    at SerialPort.<anonymous> (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/serialport.coffee:37:8)
22:14:43.412 [pimatic]>    at emitOne (events.js:77:13)
22:14:43.412 [pimatic]>    at SerialPort.emit (events.js:169:7)
22:14:43.412 [pimatic]>    at /usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/parsers.js:25:17
22:14:43.412 [pimatic]>    at Array.forEach (native)
22:14:43.412 [pimatic]>    at Object.parser (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/parsers.js:24:13)
22:14:43.412 [pimatic]>    at Object.SerialPort.opts.dataCallback (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:181:12)
22:14:43.412 [pimatic]>    at SerialPortFactory.SerialPort._emitData (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:396:20)
22:14:43.412 [pimatic]>    at afterRead (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:372:20)
22:14:43.412 [pimatic]>    at /usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:388:9
22:14:43.412 [pimatic]>    at FSReqWrap.wrapper [as oncomplete] (fs.js:576:17)
22:14:43.412 [pimatic]> This is most probably a bug in pimatic or in a module, please report it!
22:14:43.418 [pimatic] shutting pimatic down...
/usr/src/pimatic-app/node_modules/pimatic/startup.coffee:98
          return framework.destroy().then(function() {
                 ^

ReferenceError: framework is not defined
    at process.uncaughtException (/usr/src/pimatic-app/node_modules/pimatic/startup.coffee:85:9)
    at emitOne (events.js:77:13)
    at process.emit (events.js:169:7)
    at process._fatalException (node.js:224:26)
NemoN commented 8 years ago

one again, restarted pimatic

# node_modules/pimatic/pimatic.js
22:18:02.184 2016-07-14 Thursday
22:18:02.845 [pimatic] Starting pimatic version 0.9.28
22:18:03.145 [pimatic, ppm] 2.15.6
22:18:03.158 [pimatic] Loading plugin: "pimatic-cron" (0.8.8)
22:18:03.242 [pimatic] Loading plugin: "pimatic-mobile-frontend" (0.9.9)
22:18:03.340 [pimatic] Loading plugin: "pimatic-rflink" (0.6.0)
22:18:03.438 [pimatic-cron] the time is: Thu Jul 14 2016 22:18:03 GMT+0200 (CEST)
22:18:03.536 [pimatic-mobile-frontend] packing static assets
22:18:03.587 [pimatic-mobile-frontend] packing static assets finished
22:18:03.589 [pimatic-mobile-frontend] rendering html
22:18:04.618 [pimatic-mobile-frontend] rendering html finished
22:18:04.627 [pimatic] Listening for HTTP-request on port 80...
22:18:04.635 [pimatic-rflink] Received data before the ready message from RFLink, discard and reboot...
22:18:04.637 [pimatic-rflink] Received data before the ready message from RFLink, discard and reboot...
22:18:04.639 [pimatic-rflink] Received data before the ready message from RFLink, discard and reboot...
22:18:04.640 [pimatic-rflink] Received data before the ready message from RFLink, discard and reboot...
22:18:13.507 [pimatic-rflink] No ready message received within connection timeout, reboot device
22:18:13.673 [pimatic-rflink] Connected to rflink device.
22:18:13.731 [pimatic] A uncaught exception occured: TypeError: resolver is not a function
22:18:13.731 [pimatic]>    at Board._handleAcknowledge (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/board.coffee:183:5)
22:18:13.731 [pimatic]>    at Board._processData (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/board.coffee:128:38)
22:18:13.731 [pimatic]>    at SerialPortDriver.<anonymous> (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/board.coffee:43:8)
22:18:13.731 [pimatic]>    at emitOne (events.js:77:13)
22:18:13.731 [pimatic]>    at SerialPortDriver.emit (events.js:169:7)
22:18:13.731 [pimatic]>    at SerialPort.<anonymous> (/usr/src/pimatic-app/node_modules/pimatic-rflink/lib/serialport.coffee:37:8)
22:18:13.731 [pimatic]>    at emitOne (events.js:77:13)
22:18:13.731 [pimatic]>    at SerialPort.emit (events.js:169:7)
22:18:13.731 [pimatic]>    at /usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/parsers.js:25:17
22:18:13.731 [pimatic]>    at Array.forEach (native)
22:18:13.731 [pimatic]>    at Object.parser (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/parsers.js:24:13)
22:18:13.731 [pimatic]>    at Object.SerialPort.opts.dataCallback (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:181:12)
22:18:13.731 [pimatic]>    at SerialPortFactory.SerialPort._emitData (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:396:20)
22:18:13.731 [pimatic]>    at afterRead (/usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:372:20)
22:18:13.731 [pimatic]>    at /usr/src/pimatic-app/node_modules/pimatic-rflink/node_modules/serialport/serialport.js:388:9
22:18:13.731 [pimatic]>    at FSReqWrap.wrapper [as oncomplete] (fs.js:576:17)
22:18:13.731 [pimatic]> This is most probably a bug in pimatic or in a module, please report it!
22:18:13.736 [pimatic] shutting pimatic down...
/usr/src/pimatic-app/node_modules/pimatic/startup.coffee:98
          return framework.destroy().then(function() {
                 ^

ReferenceError: framework is not defined
    at process.uncaughtException (/usr/src/pimatic-app/node_modules/pimatic/startup.coffee:85:9)
    at emitOne (events.js:77:13)
    at process.emit (events.js:169:7)
    at process._fatalException (node.js:224:26)
NemoN commented 8 years ago

Minicom output:

Welcome to minicom 2.7

OPTIONS: I18n
Compiled on Jan  1 2014, 17:13:19.
Port /dev/ttyACM0, 22:19:44

Press CTRL-A Z for help on special keys

20;02;Polling DBG;5be013410c;
20;03;Polling DBG;5be013410c;
20;04;Polling DBG;5be013410c;
20;05;Polling DBG;5be013410c;
20;06;GlobalTronicsuriol V2;ID=3F01;TEMP=008a;BAT=LOW;
Debug aaaa5500000b01
20;2A;OregonV1;ID=0083;TEMP=00a5;BAT=OK;
20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R42;
20;01;Polling DBG;5be013510c;
20;02;Polling DBG;5be013510c;
20;03;Polling DBG;5be013510c;
20;04;Polling DBG;5be013510c;
20;05;Alecto V4;ID=5f58;TEMP=008f;HUM=83;
Debug aaaa55000f9a00
20;06;RTS;ID=0f959a;SWITCH=01;CMD=ON;
20;07;GlobalTronics;ID=0032;TEMP=008a;BAT=LOW;
20;08;Auriol V2;ID=3F01;TEMP=008a;BAT=LOW;
NemoN commented 8 years ago

fixed with latest beta R43