I'm guilty of surfing the web and creating a backlog of projects and cool things to do.I found this tutorial for a family calendar using Dakboard some time ago. I had even given it a read through a few times, but I never actually pulled the trigger for one reason or another.
I'm not sure what convinced me to finally do it, but knowing myself, the best way to get started was to just buy the darn thing. I shot from the hip and purchased a Raspberry Pi Zero W and other supplies and decided to set to work.
Prologue: Preparing thineself
While waiting for my prize to arrive, I decided I should start laying out how I envisioned this project to go. I ideally, the process would go as follows.
I figured the first and best thing to do to start would be to build the actual Dakboard calendar and get it laid out the way I wanted it to look.
Building the Dakboard
Dakboard is has some pretty intuitive free options to create and lay out a family calendar for a variety of display orientations and types. Since the free version of Dakboard supports integration for one calendar, I decided to create a fresh calendar in Google and share it among my family members so they could add it it and have it appear on the display.
I configured the settings to include weather for my current location and added some custom pictures to display by linking a google album. The setup and configuration options in Dakboard were pretty intuitive to figure. With the easy part down, it was time to get familiar with Raspberry Pi OS.
Building the VM
It was time to actually start setting up the thing. I headed to Raspberry Pi's website to obtain a copy of Raspberry Pi OS and using that, I booted up a fresh VM in Virtualbox and set to work.
Ideally, I wanted the pi to boot up to the URL of my calendar automatically, hiding any navbars and the mouse cursor.
Unclutter is a nice option for hiding the mouse cursor on startup. I decided to start by installing that in the terminal.
sudo apt install unclutter
With that out of the way, I wanted to make sure to add that and chromium browser to my autostart to get the Pi to boot to there automatically.
To get to the autostart file, I entered the following:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
This opens the autostart file.
I added the following lines to the bottom of my autostart file:
@unclutter -idle 0.1
@chromium --start fullscreen --disable-session-crashed-bubble --disable-infobars --kiosk [My DakBoard URL]
I set unclutter to hide the cursor after 0.1 seconds on boot (basically instantly), and since my calendar won't have a mouse connected to it, it will remain as such.
I set chromium to do the following:
Doing so allowed my box to boot to my dakboard url automatically:
Alrighty, easy peasy enough and she works. Time to do it for real this time. Should be pretty similar right?
Right?
Doing it for real this time
It wasn't too long before my little Pi was delivered to my doorstep and it was time to get started. I started by writing the OS to a the SD card. Since this display would need to be configured to connect to the home network automatically, I needed to enable SSH from the onset.
This was accomplished by creating a blank file called ssh in addition to a file called wpa_supplicant.conf containing the following lines:
country=us
update_config=1
ctrl_interface=/var/run/wpa_supplicant
network={
scan_ssid=1
ssid="MyWifiNetworkSSID"
psk="MiWifiPassword"
}
Once that was done, I could safely inset the SD card into the Pi. As expected, the Pi booted and connected to the WiFi network automatically. Success!
It wouldn't be long before I would start running into some snags.
To start, the Pi 0w is so small that there are no full sized USB ports to be found on it. They opt instead for Micro USB. I had an adapter that accepted my mouse, but no matter what I did, it did NOT like the keyboard I had available for use. Without that keyboard, I had no way of opening the terminal on the Pi and editing the config files like I would need to.
I'd need to approach this differently than I had done in the VM.
Going headless - Impromptu setup through SSH (putty)
Thankfully, since I enabled SSH in the file explorer, my shouldn't have any issues connecting to the network. I verified this by hooking it up to a display temporarily and noting that it connected to the network.
Back on my main PC, I established an SSH connection to the Pi using Putty. Raspberry Pi's default hostname is raspberrypi with the default username as pi and password raspberry. I opted to change these first.
From there I opened the same autostart folder as I did initially in the VM and added the same settings as before.
... She wasn't wanting to start.
After some troubleshooting, I found that despite having the chromium browser installed, my little pi simply could not handle launching it. I needed to look into a more lightweight, alternative browser option. In the end, I opted for Midori and configured it as such
@midori -e Fullscreen [dakboardurl]
So far so good. Except she still wasn't wanting to launch in the autostart. After a few more mins of troubleshooting, I found that, unlike in the VM I needed to specify the display output for the pi. Configuring it to DISPLAY=: 0 finally allowed the browser to launch on startup and direct to my Dakboard URL. Pictured below are my final working settings:
@unclutter -idle 0.1
@export DISPLAY=:0
@midori -e Fullscreen [dakboard url]
Putting it all together
My plan was to mount the pi to the back of an old TCL Roku TV that I had laying around. I opted to use some 3M strips to mount the PI behind the display.
It was time to boot it up to see how it looked.
Yay, looking good!
Depending on how much my family likes / uses the Dakboard, I may look into their premium options for a cleaner layout. I also plan to work on building a nice frame to hide cables and achieve an overall cleaner look. Once I get around to that, I'll update this post.
All in all, this was my first real experience with SSH in the wild and was a very valuable learning experience. I'm looking forward to doing more Pi projects in the future.
-Syd
Comments