This is a simple project to easily display Sikh Ithihasik events and Hukamnama from Sachkhand Sri Harmandir Sahib Darbar Sahib Amritsar.
Refreshes every two hours.
DEMO **Note that this demo was made for a 32 inch vertically mounted monitor and you will have to adjust font sizes according to your own display.
Although these set up instructions are written with use of a Raspberry Pi and a vertically mounted display, this can be easily modified for your own use case.
- Obtain Raspberry Pi and an micro SD card (minimum 8gb) and a display
- Make sure that your Raspberry Pi comes with wifi connectivity or you have access to an ethernet cable where you intend to use this. Internet access is needed!
- An old monitor or even an old laptop’s display which is no longer in use can work.
- This project functions best when the display is vertical so keep that in mind when choosing a display (needing a stand/mount). For using a horizontally oriented display, some modifications will be required.
- Install OS Raspbian
- Option 1: Use the Raspberry Pi Imager to flash Raspbian onto your micro SD card
- Option 2: Download the image and use a tool like Rufus or Etcher to flash Raspbian onto your micro SD card
-
Download project repository. Save it on a separate usb flash drive if possible. Otherwise save the files to the same sd card after flashing the os onto it first.
-
Insert SD card into Raspbery Pi, plug in mouse/keyboard and power on
-
Go through the on screen prompts to initialize/set up your raspberry pi. Install updates if prompted. Reboot.
-
Open the terminal. Run the following commands to update the list of available packages and then install apache2
sudo apt update
sudo apt install apache2 -y
-
Open the web browser and navigate to
html://localhost
. You should see the default apache page. -
Run the following commands in the terminal to get permissions to put files in the
www
folder.
sudo chown -R pi:www-data /var/www
sudo chmod u+rxw,g+rx-w,o-rwx /var/www
sudo chmod g+s /var/www
-
Open the file browser and navigate to
/var/www/html
. Place the project files you downloaded earlier into this directory. -
Run the following command in the terminal to go to rotate your display.
sudo nano /boot/config.
add the following lines to the bottom of the file
display_rotate=3
lcd_rotate=3
See here if any issues arise.
-
Open the web browser and navigate to
html://localhost
to verify that everything is showing up correctly. -
Next we'll configure your Raspbery Pi to open this automatically on start up and for the screen to not black out after a time period.Run the following in the terminal:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
At the bottom of this document add the following lines.
@xscreensaver -no-splash # to disable screen saver
@xset s off # to disable screen saver
@xset -dpms # to disable Display Power Management Signaling
@xset s noblank # to disable screen going blank
@chromium-browser –kiosk -http://localhost/ # to load chromium after boot and open the page in full screen mode
- reboot.
- Edit
hukamstyle.css
in thehukamnama
folder - Edit font sizes as needed
The default calendar used is a calendar published by Experience Sikhi. This includes Parkash, Gurgaddi, Joti-Jot of Guru Sahibaan as well as many important ethihasik dates and more. To change to a different Google calendar such as a personal calendar, follow the following:
- Go to Google Calendar website and go to the
Settings and sharing
page for the calendar that you would like to use - Scroll down to the
Integrate calendar
section and navigate to the url inPublic URL to this calendar
- Right click/double click and view page source. Copy this into
cal.html
located into thecalendar
folder and replace the existing contents. - Add the following line right below the existing css spreadsheet line
<link rel="stylesheet" type="text/css" href="styles.css">
- Add
https://calendar.google.com
to any relative links in thiscal.html
file. Examples:
src="/calendar/_/scs/calendar-static/_/js/k=calendar.emb…
href="//calendar.google.com/calendar/static/…
- Delete the line which has the following
<span id="calendarTitle">
.
Edit the index.html
file in the main project directory. Change the latitude
and longitude
to wherever you would like the weather to show. You can change the title by changing Brampton, Ontario, Canada to whatever your pind is.
Hukamnama-Calendar-Weather-Display uses the Gurbani Now API which fetches the hukamnama from SikhNet.com. Gurmukhi Font used are Raajaa by Paul Grosse and GurbaniAkhar by Kulbir S. Thind. Weather from Forecast.io/DarkSky.net Some code from this instructables project used.