Gateway Pi Image

Started by Nutz, May 17, 2015, 03:49:39 PM

Nutz

Hi Felix,

Thanks for the image, I installed it and is working perfectly. Only thing that I found missing so far is that graphHelpher.js was not copied to the /var/www/default folder. Once I did this the graphs displayed correctly.

Felix

Hmm, will have to check that, thanks for pointing it out.

Felix

This is fixed and new image was posted. Link is shared here.

HeneryH

#3
Awesome!  Copied the image file, formatted my SD card with the SD Formatter App.  Ran the installer to push the image to the SD card (which took many many minutes, like over 30 but I didn't measure).

Booted to the image on the Pi.  Logged in via the local display/mouse/kb I have connected. Launched the UI with startx. Set my WiFi connection using the UI.

Connected !


Now on to the hardware stuff getting my sliding gate opener connected to it.

Thanks Felix!

jclark58

OK Ive come back after a bit of a break to a most welcome surprise. Thanks Felix this is very close to what I was trying to describe previously.

I have downloaded and installed the image file, booted fine, but Im using a USB moteino to which I have loaded the pi Gateway sketch.  What do I have to change for this setup to work over USB connection between the Pi and the moteino?

Felix

Quote from: jclark58 on August 02, 2015, 08:31:53 PM
What do I have to change for this setup to work over USB connection between the Pi and the moteino?
Nothing much. You just gotta figure out the serial port that the Moteino emulates on your Pi, something like "ttyUSBxxx" perhaps? Replace that in the gateway.js script. Which reminds me I should move all those settings in the settings.js file...  ::)

HeneryH

Hmmm..  trying again with the V3 image and having some problems.  It went so easy with V2 I expected the same.

On connecting to the URL, I just get the "Waiting for Socket Connection" spinner.

I'll debug more but maybe something in this image wasn't started automatically.

Also, I'm getting frequent timeouts on my ssh connection.  I tried some power controls for wifi and ssh keep alives but none worked.  I'll try wired.

HeneryH

I tried to just relaunch node gateway.js & and reconnect and got the following errors
pi@raspberrypi ~/moteino $ node gateway.js &
[1] 2410
pi@raspberrypi ~/moteino $ 
module.js:340
    throw err;
          ^
Error: Cannot find module 'console-stamp'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/moteino/gateway.js:73:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)


Perhaps re-launching isn't advised but figured I post the results here in case anyone recognizes anything.

Felix

#8
The message reads "Error: Cannot find module 'console-stamp'"
The question that follows is, do you have that module installed in a path where node can find it? Ie here:
Please check that and perhaps I failed to add it to the image.

If it's not there then cd ~/moteino and install it with this command: npm install console-stamp

HeneryH


HeneryH

#10
I installed the missing modules

npm install console-stamp
npm install nodemailer
npm install nodemon


and rebooted. 

Works now. Thanks.

Felix

Great. The problem with releasing an image is it's so hard to keep it updated properly every time there's a bug fix or a change/addition.

Rick

You might check the system settings on the image also.  I found the keyboard was set to default, GB which did not include the # character.  Seems like there might have been some other settings still default also.

I believe the new releases are using dhcpcd to assign addresses.  I was not able to properly set a static ip address.  There is a bit of discussion on the raspi forum about this, but no clear solution to set a static address properly.  As a workaround, I was able to change from manual to static, but it still maintains the dhcp address in addition to the static one.

Rick

LaneF

This is the "Newbie Graveyard" on the topic of the Gateway.

I've searched the net and the replies in Moteino forums to no avail.  Can't connect the SSL dots...
I just downloaded the image for the Pi Gateway, it seemed to boot.  At the end, I checked the SSL with the IP assigned *.*.*.113 and it seems to just sit, "Waiting for Socket Connection".
I tried the Chat.html but the only thing there was an empty "Send" box and the word "Users".  I don't know if no one's connected at that moment to chat, or I didn't connect.
I reviewed the boot log screen and noticed a few interesting lines.

"...lacks cgroups or memory controller... not starting cgroups"

and

"...unable to register 'memcache' SSL session cache: Memcache support not enabled"

I'm the Family "goto guy" to fix Windows issues, but to call me a "Newbie" at Linux would be overstating it.

I really want to get into the Moteino groove, but the brass key is the Gateway.

Any Help or Clues ???   Thanks in advance

gurari

Quote from: LaneF on August 05, 2015, 10:33:02 PM
This is the "Newbie Graveyard" on the topic of the Gateway.

I've searched the net and the replies in Moteino forums to no avail.  Can't connect the SSL dots...
I just downloaded the image for the Pi Gateway, it seemed to boot.  At the end, I checked the SSL with the IP assigned *.*.*.113 and it seems to just sit, "Waiting for Socket Connection".
I tried the Chat.html but the only thing there was an empty "Send" box and the word "Users".  I don't know if no one's connected at that moment to chat, or I didn't connect.
I reviewed the boot log screen and noticed a few interesting lines.

"...lacks cgroups or memory controller... not starting cgroups"

and

"...unable to register 'memcache' SSL session cache: Memcache support not enabled"

I'm the Family "goto guy" to fix Windows issues, but to call me a "Newbie" at Linux would be overstating it.

I really want to get into the Moteino groove, but the brass key is the Gateway.

Any Help or Clues ???   Thanks in advance

OK, After booting from the image if you try
cd ~/moteino/
pkill node
node chat.js &

what do you see in the console?
If all is ok in the console when you enter *.*.*.113 in the browser first you should see a windows asking you for your username and password (ssl certificate) and then a window asking for name for the chat.
If all this is OK you should kill the chat.js and start gateway.js

cd ~/moteino/
pkill node
node gateway.js &