Author Topic: After installation what I have to do? [solved]  (Read 18616 times)

andromeda

  • NewMember
  • *
  • Posts: 11
After installation what I have to do? [solved]
« on: May 09, 2015, 05:46:51 PM »
Hi,
Given that I have not a moteino, I installed the Gateway on Rpi using the steps described in your great tutorial.
Terminated installation I log in to the site using username and pw defined in the tutorial.
Just after login I get a mask that says 'Waiting for socket connection ..'.
My question is:
It remains pending because there is not moteino connected to rpi or there is something else to launch ?
What is the program to launch after installation and/or a Rpi reboot ?

Thanx
Mauro
« Last Edit: September 23, 2015, 11:27:12 PM by Felix »

jbetsinger

  • NewMember
  • *
  • Posts: 1
Re: After installation what I have to do ?
« Reply #1 on: May 09, 2015, 06:34:37 PM »
@andromeda - No, something is wrong with the socket.io setup.  My setup loads up after that "waiting for socket connection"...now at least.  I had the same issue, where I had a Nimbits server running on 8080 so I changed the socket.io configuration, but I missed the reference in the gateway.js script.  Once I fixed that one it fully loaded.

I believe there are two  references to the socket.io port.  One in the "gateway.js" (as I mentioned) as well as the "/etc/nginx/sites-available/default".  Check those...

Did the chat application that Felix used to test the configuration work for you?

--Jim
« Last Edit: May 09, 2015, 06:36:13 PM by jbetsinger »

Kylix

  • Jr. Member
  • **
  • Posts: 67
  • Country: ro
    • Omologazioni veicoli
Re: After installation what I have to do ?
« Reply #2 on: May 10, 2015, 04:38:12 AM »
Did you start the gateway.js with: node gateway.js &  ???

andromeda

  • NewMember
  • *
  • Posts: 11
Re: After installation what I have to do ?
« Reply #3 on: May 10, 2015, 06:00:28 AM »
Did you start the gateway.js with: node gateway.js &  ???

That's the point.
Following installation here http://lowpowerlab.com/gateway/#pisetup and here http://lowpowerlab.com/gateway/#sourcecode I haven't seen anything regarding how to launch or use gateway.js.
I have only seen it here http://lowpowerlab.com/blog/2013/10/11/raspberrypi-home-automation-gateway-hardware-and-demo/ :

chmod 755 nodejs-moteino.sh
sudo update-rc.d nodejs-moteino.sh defaults

That launch gateway.js at startup.

So, did the gateway.js have to be launched at startup and I have to use the nodejs-moteino.sh shell script to do it or the gateway.js is launched by something else ?

Thanks

bauderline

  • NewMember
  • *
  • Posts: 38
Re: After installation what I have to do ?
« Reply #4 on: May 10, 2015, 07:46:11 AM »
Yes you need to run the command node gateway.js & from the directory where gateway.js is located, then try connecting to the site via your browser.

The ampersand at the end makes the process run in the background until you logout.

P.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: After installation what I have to do ?
« Reply #5 on: May 12, 2015, 10:43:50 PM »
Good news: gateway guide was updated and a link to a completely setup and ready to go Pi image was posted here. It includes the web stack install and also all the files with some sample node data so it should run out of the box and you should not have much else to do except perhaps change passwords for the Pi and for the web auth (which you should actually do to make it secure). If you want to send email/SMS you need to put your email and mobile settings in gateway.js.
Let me know if there is any issue with it.
Enjoy!
« Last Edit: May 18, 2015, 12:07:28 PM by Felix »

andromeda

  • NewMember
  • *
  • Posts: 11
Re: After installation what I have to do ?
« Reply #6 on: May 13, 2015, 10:41:38 AM »
Hi,
The link to it image seems broken ?
Can you check it please?

Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: After installation what I have to do ?
« Reply #7 on: May 13, 2015, 10:47:55 AM »
Sorry please try again now!

andromeda

  • NewMember
  • *
  • Posts: 11
Re: After installation what I have to do ?
« Reply #8 on: May 17, 2015, 05:51:47 PM »
Tomorrow I'll receive WeatherShield and some moteino.
I have downloaded rpi image and installed succesfully.
I think that to build the gateway infrastucture I need to start with a moteino (usb version) conneted to rpi and another moteino Connected to the WeatherShield.
But what I have to load to the usb(gateway) moteino connected to the rpi and what I have to load to the moteino with WeatherShield to communicate with the rpi gateway ?

Thanks a lot

Andromeda

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: After installation what I have to do ?
« Reply #9 on: May 17, 2015, 10:51:48 PM »
Hmm, I just realize I didn't publish any example that is exclusively using WeatherShield.
I published others that combine their code with WeatherShield readings, for instance the GarageMote. You can look at how that code is reading the data from the WShield. I may publish a sketch for WS only sometime.
Also notice the graphHelper.js is missing in the /var/www/default and I will re-publish an image that has that fixed, in the meantime you can copy it manually from the Github repo.

andromeda

  • NewMember
  • *
  • Posts: 11
Re: After installation what I have to do ?
« Reply #10 on: May 18, 2015, 04:19:36 AM »
Hmm, I just realize I didn't publish any example that is exclusively using WeatherShield.
I published others that combine their code with WeatherShield readings, for instance the GarageMote. You can look at how that code is reading the data from the WShield. I may publish a sketch for WS only sometime.
Also notice the graphHelper.js is missing in the /var/www/default and I will re-publish an image that has that fixed, in the meantime you can copy it manually from the Github repo.

That's not a problem.
I have seen that inside GarageMote and MailboxNotifier there are weatherShield parts that can be extracted.
What I mean is what I have to load (which .ino ?) in gateway moteino and in the remote moteino nodes to communicate to the rpi gateway.
Or what is the protocol lto use to communicate with gateway.

Thanks


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: After installation what I have to do ?
« Reply #11 on: May 18, 2015, 10:27:08 AM »
Sorry for the confusion, here's what you should load on your Gateway Moteino: https://github.com/LowPowerLab/RFM69/tree/master/Examples/PiGateway
That sketch passes data from your network to your Pi via the serial port, and passes data from your Pi to your remote nodes also (ie open garage or turn ON a light etc).
There are 2 sketches there, the second uses a newhaven i2C LCD to display the incoming messages right at the Pi, which is something I've always prefered to have. If you don't have that just load the first sketch.

andromeda

  • NewMember
  • *
  • Posts: 11
Re: After installation what I have to do ?
« Reply #12 on: May 18, 2015, 12:12:38 PM »
No problem.
Now I know what to load to gateway moteino, but on the weathershied moteino I have to load something else that I can create myself, but what the gateway expect to receive ? which string/protocol etc...
Have I to see how you implement other nodes inside metrics.js and gateway.js files to define something else ?
There is some documentation on gateway string expectation ?

Thanks a lot
Andromeda

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: After installation what I have to do ?
« Reply #13 on: May 18, 2015, 12:27:17 PM »
For now since there is no dedicated sketch for WeatherShield you can add the code from GarageMote to the Node sketch and just send the weather data to the gateway.
The tokens for the weather shield are defined in metrics.js so if you don't change how that data looks like the data will automatically appear for your node when the data is received, then it gets updated and logged.

For testing purposes you could even just use the Node sketch or any other, and change the message to send something like F:67.89 or H:35 or P:123, or all those in 1 message separated by spaces.

wheato22

  • NewMember
  • *
  • Posts: 16
Re: After installation what I have to do ?
« Reply #14 on: May 19, 2015, 04:40:14 PM »
Felix,
By chance is the Newhaven 20X2 LCD display sold by Jameco (see below) with a ST7036 controller appear to be the same as the LCD you referred to? The two links to driver sources  commented in the includes section of the Sketch (ST7036.h and LCD_C022OBIZ.h gave me 404 errors when i went to check them out. I too want to be able to view the sensor data as it arrives at the Pi serial input.

  http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2118539_-1


Sorry for the confusion, here's what you should load on your Gateway Moteino: https://github.com/LowPowerLab/RFM69/tree/master/Examples/PiGateway
That sketch passes data from your network to your Pi via the serial port, and passes data from your Pi to your remote nodes also (ie open garage or turn ON a light etc).
There are 2 sketches there, the second uses a newhaven i2C LCD to display the incoming messages right at the Pi, which is something I've always prefered to have. If you don't have that just load the first sketch.
« Last Edit: May 21, 2015, 11:14:35 AM by wheato22 »
Retired mainframe Computer geek. Currently implementing a Water Mote/Pi Gateway solution to log, chart and manage my residential water use. Hobbies include Home Automation, Bee keeping, gopher trapping and travel by ship or RV.