@@ -34,3 +34,33 @@ the - lead needs to be connected to ground (I chose pin 6).
3434
3535The web client only displays the indoor temperature and humidity values when connected to the
3636web server on ` localhost:8080 ` .
37+
38+ I can't guarantee that I'm recalling every important step I took to create my own set-up, but
39+ hopefully the following is a more-or-less complete guide to setting up a Raspberry Pi to
40+ automatically boot up as a full-screen astronomy/weather clock:
41+
42+ 1 ) Install the Chromium browser if it's not already installed:
43+ ` sudo apt-get install chromium-browser `
44+ 2 ) Install unclutter (this will hide your mouse cursor after 30 seconds of inactivity so it doesn't
45+ obscure the display): ` sudo apt-get install unclutter `
46+ 3 ) Install an up-to-date node.js. (You can find instructions for this step here: https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp .)
47+ 4 ) Copy the contents of this project's ` server ` folder to ` /home/pi/weather ` .
48+ 5 ) If you wish to use an indoor temperature/humidity sensor, follow the previously mentioned
49+ steps to install the BCM 2835 library and connect the sensor.
50+ 6 ) ` cd /home/pi/weather `
51+ 7 ) ` npm install `
52+ 8 ) Build the client project as described above, and copy the contents of the ` dist ` directory to
53+ ` /home/pi/weather/public ` .
54+ 9 ) Copy the included file ` weatherService ` to ` /etc/init.d/ ` . Make sure the file is owned by
55+ ` root ` is set to be executable. Follow the instructions listed inside that file to set up
56+ the necessary environment variables, including setting ` HAS_INDOOR_SENSOR ` to ` true ` if you're
57+ connecting an indoor temperature/humidity sensor.
58+ 10 ) Use the command ` sudo update-rc.d weatherService defaults ` to establish the service that
59+ starts up the weather server.
60+ 11 ) Copy the included files ` autostart ` and ` autostart_extra.sh ` to
61+ ` /home/pi/.config/lxsession/LXDE-pi/ ` and make sure they're executable. This launches the
62+ astronomy/weather clock client in Chromium, in kiosk mode (full screen, no toolbars). It also
63+ makes sure Chromium doesn't launch complaining that it was shut down improperly.
64+ 12 ) I'm not sure about the current copyright disposition of these fonts, but for improved
65+ appearance I'd recommend finding and installing the fonts "Arial Unicode MS" and "Verdana".
66+ These appear to be freely available for download without licensing restrictions.
0 commit comments