Turning on/off the lamp from a smartphone
Our home automation project is nearly finished, but one important thing remains: we need to ensure that it's possible to control the light using a remote device, such as a smartphone. First of all, we need to check on the board whether the web server is present:
$ ps | grep server 295 root 2732 server.init
If the server for some reason hasn't auto-started, we can try to manually start it using this command:
$ /etc/init.d/server-packt-init start starting Nodejs app: server.init... done. root@raspberrypi2:~# info - socket.io started listening on *:3344
If we manually perform some changes to the web server directly on the Raspberry Pi, we can restart the web server by using this command:
$ /etc/init.d/packt-server restart stopping Nodejs app: server.init... stopped node (pid 295) done. starting Nodejs app: server.init... done.
Now, we can start the web browser on our smartphone and go to http://my_rpi_ipaddress:3344
. You will see the same...