Gateway nodes not showing - gateway.db not logging [solved]

Started by EnMon, January 23, 2017, 07:02:59 PM

EnMon

Thank you so much Felix and Sparky,
I had difficulty matching the metrics to my data but I have been able to fix it.
My Nodes are showing on the app now. :D :D


Felix


EnMon

Ofcourse!! :D

Thank you so much.

sparky

Sweet, I haven't had any luck upgrading to 8.8, I might try to start from scratch.  Unless Felix comes out with a pre-built image..!!   8)

Felix

Quote from: sparky on January 24, 2017, 04:53:24 PM
Sweet, I haven't had any luck upgrading to 8.8, I might try to start from scratch.  Unless Felix comes out with a pre-built image..!!   8)

Actually I want to get away from a prebuilt image and would rather maintain a script.
The setup script actually works very well and it's fast, gives you a Gateway-Pi in no time, probably less time than downloading a 1GB image.

sparky

I'll have to try again, maybe from a fresh raspbian install??.  I was getting an error stating something about not able to find nconf module

Felix

Get latest raspbian, then follow instructions on the gateway setup page.

sparky

Sorry to say, still no luck

When connecting thru browser all I get is waiting for socket connection.

Connecting to Pi thru WinSCP I was able to get log;

[01-25-17_12:13:13.838] [INFO]  LOADING USER METRICS...
[01-25-17_12:13:13.872] [INFO]  LOADING USER METRICS MODULE [_example.js]
/home/pi/gateway/gateway.js:55
  console.error(error.message);
                     ^

TypeError: Cannot read property 'message' of undefined
    at SerialPort.serialCloseHandler (/home/pi/gateway/gateway.js:55:22)
    at emitNone (events.js:67:13)
    at SerialPort.emit (events.js:166:7)
    at SerialPortFactory.SerialPort.disconnected (/home/pi/gateway/node_modules/serialport/serialport.js:438:10)
    at /home/pi/gateway/node_modules/serialport/serialport.js:236:18
[01-25-17_07:22:50.756] [INFO]  LOADING USER METRICS...
[01-25-17_07:22:50.798] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-25-17_07:22:50.891] [ERROR] Cannot open /dev/ttyAMA0
[01-25-17_07:23:14.646] [INFO]  LOADING USER METRICS...
[01-25-17_07:23:14.680] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-25-17_07:23:14.776] [ERROR] Cannot open /dev/ttyAMA0
[01-25-17_07:39:09.383] [INFO]  LOADING USER METRICS...
[01-25-17_07:39:09.417] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-25-17_07:47:44.832] [INFO]  LOADING USER METRICS...
[01-25-17_07:47:44.868] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-25-17_07:51:20.438] [INFO]  LOADING USER METRICS...
[01-25-17_07:51:20.474] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-25-17_07:55:36.160] [INFO]  LOADING USER METRICS...
[01-25-17_07:55:36.196] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-25-17_08:07:37.578] [INFO]  LOADING USER METRICS...
[01-25-17_08:07:37.611] [INFO]  LOADING USER METRICS MODULE [_example.js]

Felix

Looks like your serial connection cannot be opened or something related to the serial.
What's the serial port you use? Did you verify valid data is coming through (or at least a valid connection) via minicom?

sparky

Using /dev/ttyUSB0

Have not used minicom

Reloading everything this morning but now it appears possibly something wrong with the link to gatewaysetup.sh??

sparky

The following error;

[01-25-17_07:23:14.776] [ERROR] Cannot open /dev/ttyAMA0

was prior to me changing it to USB0

Felix

Quote from: sparky on January 26, 2017, 08:04:49 AM
Using /dev/ttyUSB0

Have not used minicom

Reloading everything this morning but now it appears possibly something wrong with the link to gatewaysetup.sh??

The setup guide points to this script, hasn't changed at all, is this what you're using?

sparky

Yes, that's the one I'm using Felix.  I was finally able to download the script..  but with the same, no success, results

Felix

Others use the same script and have no issues. That message is indicative of the serial port not being able to open.
You have to ensure the Pi does not lock it up if its the GPIO serial.
Otherwise if its /dev/ttyUSB0 it should just work once you set it in settings and restart the gateway app.

sparky

Felix, I'm not blaming your script, just stating my issues.  Thanks