Author Topic: RaspberryPi home automation gateway  (Read 2606 times)

goryri

  • Newbie
  • *
  • Posts: 35
RaspberryPi home automation gateway
« on: January 10, 2014, 05:20:01 AM »
Hi, I have follow this guide http://lowpowerlab.com/blog/2013/10/07/raspberrypi-home-automation-gateway-setup/ . I get "info - unhandled socket.io url" in the terminal when i go to https://10.0.0.13/chat.html. Anyone else that have the same problem ? I have tried to follow the guide two times now and I get the same result.

the guide says that I should download socket.io.js client script from https://raw.github.com/LearnBoost/socket.io-client/master/socket.io-client.js but that link dont work. So I downloaded this https://github.com/LearnBoost/socket.io-client/blob/master/socket.io.js .
« Last Edit: January 10, 2014, 05:25:56 AM by goryri »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6022
  • Country: us
    • LowPowerLab
Re: RaspberryPi home automation gateway
« Reply #1 on: January 12, 2014, 06:09:59 PM »
goryri - please try the following socket.io.js file: https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/socket.io.js

goryri

  • Newbie
  • *
  • Posts: 35
Re: RaspberryPi home automation gateway
« Reply #2 on: January 13, 2014, 08:01:26 AM »
Now I get a warning "warn - error raised: Error: listen EADDRINUSE" somthing wrong whit proxy ?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6022
  • Country: us
    • LowPowerLab
Re: RaspberryPi home automation gateway
« Reply #3 on: January 13, 2014, 08:28:36 AM »
I don't know what that is ... maybe google it or see if the people who created socket.io know..?
What distro and versions of node/socket.io are you using?

goryri

  • Newbie
  • *
  • Posts: 35
Re: RaspberryPi home automation gateway
« Reply #4 on: January 13, 2014, 09:13:00 AM »
It works now after I run "sudo service nginx restart". Tanks

goryri

  • Newbie
  • *
  • Posts: 35
Re: RaspberryPi home automation gateway
« Reply #5 on: January 16, 2014, 03:57:49 AM »
Hi again, After i run the command "node chat.js &" and try to end it whit CTRL + C. I still get debug information.  when i then tries to run the command "node chat.js &" again then I get "warn - error raised: Error: listen EADDRINUSE". That means that the port node chat.js tries to lissen to (8080) is already in use because CTRL + C did't terminate the other running process of chat.js. What can I do to close chat.js?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6022
  • Country: us
    • LowPowerLab
Re: RaspberryPi home automation gateway
« Reply #6 on: January 16, 2014, 10:06:03 AM »
You have to kill the node process that runs chat.js.
Do this to find out the process ID:
Code: [Select]
ps aux | grep CHAT
This will show the process (if any) that runs anything by the name of CHAT.
Then just run sudo kill NNN

goryri

  • Newbie
  • *
  • Posts: 35
Re: RaspberryPi home automation gateway
« Reply #7 on: January 16, 2014, 03:50:44 PM »
The command "ps aux | grep CHAT" did not work for me. I could write random text after grep and still get the same result. What worked for me was ps aux | grep "[c]hat.js". Tanks again

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6022
  • Country: us
    • LowPowerLab
Re: RaspberryPi home automation gateway
« Reply #8 on: January 16, 2014, 08:16:05 PM »
Well.. yes .. linux is case sensitive ;)