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

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

Felix

Yup, no problem, just trying to say that ... its working for most people even though there are issues with getting that GPIO ttyAMA0 serial port resolved since Pi3 locks it up with the bluetooth.
If I can help with anything let me know, but I just dont have enough info to really tell whats going on, other than the error which hints at a serial port issue.

sparky

What's really weird is every time I reload everything;

1. Format card
2. Load raspbian Jessie lite image
3. run sudo wget https://raw.githubusercontent.com/LowPowerLab/RaspberryPi-Gateway/master/.setup/gatewaysetup.sh
4. sudo bash gatewaysetup.sh
5. During setup I change time zone and keyboard layout.  I also enable SSH in advance options.

it act's a little different...  meaning, one time I went to look at the logs, both the gateway/logs and data/db folders were empty, no files.  reloaded everything the same way and then they were there.

This last time when I went to browse to my pi it went straight to waiting for socket and it never asked for name/password.  I did try to delete cookies but it didn't help.  There's not that many steps for it to act so different..

Felix

Awww... i see they released a new image, that could have something with it.
I will need to check it sometime to see if the script is producing a fail similar to yours. The script was last tested on their last released may 2016 image.
Did you use the raspbian LITE or the full+PIXEL image?

sparky

So maybe I'm not going crazy after all..  ::)

Felix

Quote from: sparky on January 26, 2017, 10:05:44 PM
So maybe I'm not going crazy after all..  ::)
Not at all, hang tight, I will try it as soon as I can and report back.


sparky

Just in case it helps, I was finally able to catch a couple warnings during setup;

npm WARN package.json... something about SPDX license

and npm  WARN depreciated [email protected]...

Felix

Warnings I've seen before. It's red errors that would be a problem. Maybe some packages need updates because of the new image/kernel or other updated packages etc.

sparky

Got it..

I did find a site to download earlier versions of Jessie lite if you find it necessary

Thanks

Felix

Ok here's the may 2016 image I used to develop the setup script. This should really work.
I uploaded this to my google drive and you can try installing with this and let me know how it goes.
I am not sure when I will have time to get to try the new one so in the meantime you can try this.

Download Raspberry Pi Raspbian Jessie Lite May 27 2016 image
Also added this link and an update message about this potential issue on the setup guide.

BTW did you ever try the PiBakery approach? That has a bundled image also.

sparky

Ok, thanks

Although I did download and looked at PiBakery, I haven't tried it. I did not see the bundled image..

sparky

Well I first want to thank you for all the time you spent with me on this.  I reloaded everything using the Jessie image you provided and it still hangs at waiting for socket.

The gateway.sys.log log shows the same error as before but only after the initial boot.  I did change the serial to ttyUSB0  The gateway.db of course shows nothing..

[01-27-17_10:03:20.893] [INFO]  LOADING USER METRICS...
[01-27-17_10:03:20.922] [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-27-17_10:04:47.706] [INFO]  LOADING USER METRICS...
[01-27-17_10:04:47.737] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-27-17_10:04:47.833] [ERROR] Cannot open /dev/ttyAMA0
[01-27-17_10:08:29.170] [INFO]  LOADING USER METRICS...
[01-27-17_10:08:29.201] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-27-17_10:10:44.112] [INFO]  LOADING USER METRICS...
[01-27-17_10:10:44.144] [INFO]  LOADING USER METRICS MODULE [_example.js]
[01-27-17_10:21:33.347] [INFO]  AUTHORIZING CONNECTION FROM ::1:48620
[01-27-17_10:21:33.367] [INFO]  NEW CONNECTION FROM 10.0.0.6
[01-27-17_10:21:38.010] [INFO]  AUTHORIZING CONNECTION FROM ::1:48630
[01-27-17_10:21:38.015] [INFO]  NEW CONNECTION FROM 10.0.0.6
[01-27-17_10:21:39.122] [INFO]  AUTHORIZING CONNECTION FROM ::1:48640
[01-27-17_10:21:39.127] [INFO]  NEW CONNECTION FROM 10.0.0.6
[01-27-17_10:22:22.249] [INFO]  AUTHORIZING CONNECTION FROM ::1:48650
[01-27-17_10:22:22.252] [INFO]  NEW CONNECTION FROM 10.0.0.6
[01-27-17_10:22:50.701] [INFO]  AUTHORIZING CONNECTION FROM ::1:48660
[01-27-17_10:22:50.706] [INFO]  NEW CONNECTION FROM 10.0.0.6
[01-27-17_10:24:47.597] [INFO]  LOADING USER METRICS...
[01-27-17_10:24:47.629] [INFO]  LOADING USER METRICS MODULE [_example.js]


One thing I did notice, if it matters, is near the end of the bootup script where it list "My IP address" it doesn't list my IP but instead has a very long string of numbers and letters instead.

Thanks again..

sparky

Makes me wonder, other than the version is different, what is the difference between the pre-built image you have versus the script?  The pre-built worked flawlessly..

sparky

Well, I'm still here.. have not given up yet!

Have not heard back from you in a few days so I thought I would give you the latest in hopes to get this working.

I believe I got "most" of the settings set correct this time..  (100th time is a charm) After re-loading this last time I tried to browse to the gateway only to see "waiting for socket connection" again.  I went into the gateway.db and I was happy to see some traffic from my garage mote.  Although Internet Explorer didn't work, I tried Chrome and about fell over when the Dashboard came up..  YaHooo!

So what can I be doing wrong that would prevent Internet Explorer from working?

Thanks

Felix

Hey sparky,

If the image worked - it means I really have to make time to see why the script is not loading everything correctly on the new Jessie image. It must be some version of the node packages.

The weird numbers represent local ipv6 addresses, ::1:: is localhost for ipv6, see this: https://en.wikipedia.org/wiki/Localhost

FWIW IE is not even a real browser. Not sure I'll spend a whole lot of time trying to unfix a working solution just to make it unwork on that trash called IE.

But you have a "working" setup now right?