Sorry for the newbie linux questions, hoping to learn some JS and socket skills, and this example looked great for getting sensors/controls going via web control.
trying the chat.html example at
http://lowpowerlab.com/blog/2013/10/07/raspberrypi-home-automation-gateway-setup/ and got the first steps, the php and ssl working! cool...
But when I go to 192.168.0.22/chat.html .. the html appears, but no server action.. just "USERS" and spot to enter text it's the socket.io doesn't work. The Pi doesn't show any connections..
pi@raspberrypi ~/moteino $ node chat.js
info - socket.io started
when i 'inspect element' in chrome, it shows an error, ""Uncaught ReferenceError: io is not defined"
To put the "socket.io-client.js" file in my /var/www/default directory, i used "wget
https://raw.github.com/LearnBoost/socket.io-client/master/socket.io-client.js"
Do I need to do anything else at that point ?
Noticed that the chat.html refers to "<script src="socket.io.js"></script>" So tried changing it to src="socket.io-client.js". now chrome doesn't report a 404 for socket.io.js
Now chrome element inspector looks better, but under Resources, scripts, socket.io-client.js shows a "Uncaught Error: failed to require "socket.io" from "root"" ?! seems to be some debugging in the socket.io-client.js, but not sure what it's telling me!
I've tried changing the file permissions for socket.io-client.js
Tried renaming the socket.io-client.js file to socket.io.js and get "Uncaught error ReferenceError: io is not defined" in chrome.
where it said "YOUR_PI_ADDRESS" i put
var socket = io.connect('192.168.0.22', {'connect timeout': 1000});
running out of ideas.. have tried installing everything from scratch and still end up at this point.. any clues would be great!
thanks
dargs