LowPowerLab Forum

Hardware support => Projects => Topic started by: goryri on January 10, 2014, 05:20:01 AM

Title: RaspberryPi home automation gateway
Post by: goryri 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/ (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 .
Title: Re: RaspberryPi home automation gateway
Post by: Felix 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
Title: Re: RaspberryPi home automation gateway
Post by: goryri on January 13, 2014, 08:01:26 AM
Now I get a warning "warn - error raised: Error: listen EADDRINUSE" somthing wrong whit proxy ?
Title: Re: RaspberryPi home automation gateway
Post by: Felix 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?
Title: Re: RaspberryPi home automation gateway
Post by: goryri on January 13, 2014, 09:13:00 AM
It works now after I run "sudo service nginx restart". Tanks
Title: Re: RaspberryPi home automation gateway
Post by: goryri 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?
Title: Re: RaspberryPi home automation gateway
Post by: Felix 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
Title: Re: RaspberryPi home automation gateway
Post by: goryri 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
Title: Re: RaspberryPi home automation gateway
Post by: Felix on January 16, 2014, 08:16:05 PM
Well.. yes .. linux is case sensitive ;)