Topher Webb – LTUAE

Switchdoc Labs SkyWeather Project

I have been a huge fan of Switchdoc Labs for a few years and had varying success getting to a point where I can leave the project alone to do its thing. This SkyWeather project is another one of those daily attention projects for me.

The board, and running of it is not the issue. For me, it is the power. Specifically, not being able to get through the night without a low-power shutdown.

I have bought 2x 6000mAh LIPO batteries from Core Electronics (Adafruit batteries), 2x 6000mAh laptop LIPO batteries, and also, in the last couple of days, I received 2x 10,000mAh LIPO batteries which I will attempt to use in the next week or so.

With a Raspberry Pi Zero running the show, I am using between 150-180mA at any given moment. That is with the wifi set to less frequent pings and HDMI switched off. I have googled some other power saving options, and tried to save as much power as possible. Even switching off the Pi0 power light which is negligible savings, but every little bit helps.

The SunAirPlus board from Switchdoc Labs has a maximum charging capacity of 1000mA and requires a 6v panel. I am using 2x 500mA 6v panels at the moment while I wait for a 1000mA panel to arrive. At time of writing this, I am sitting at 830mA input at 4.4W and drawing 173mA from the weather station.

Solar voltage is 5.29v and battery voltage is 3.81v

The Blynk app that Switchdoc Labs love to use is fantastic. I love graphs and this thing gives you plenty of graphs. My only criticism is that it has a 1h 6h 1d 2d graph option, but id love a 12h graph – but im pretty damn happy with the data output. A page for wind graphs would be nice also, but not a huge issue.

The SkyWeather python script links to Weather Underground and WeatherSTEM. I dont think you can access WeatherSTEM without an account there, and while I dont want to be negative about the service, the only benefit I see to it is the time lapse videos.

Time lapse videos! Yes! These are awesome. I am going to import another lot of python code to my re-install and create time lapse videos locally. Weather STEM has the videos set to reset at midnight miami time. This doesnt help for me, as it means its around 1.30pm local and therefore I need to cut and paste videos to have a daily vid.

Weather STEM is also set to fahrenheit also, and isnt the USA the only country left on the planet that uses imperial measurements? – just joking, not really joking.

Head to Switchdoc Labs and take a look at the project. Its a fun system with heaps of data to pour over and watch. I am going to build a complete 2nd system for testing python code and editing to export my data to WeeWX and Twitter so that I can break it a bunch of times while not destroy the live system outside.


This is, hopefully, a copy and paste section as I reinstall all the relevant modules to a fresh Raspbian minimal operating system.

The current (live) version im using is Jessie but this is being installed on 2019-07-10-raspbian-buster-lite

After you have installed the OS to a fresh sdcard, open Raspi-Config and turn on the camera, ssh and i2C. Change your timezone and local, and set your wifi up. Connect to your pi from a computer via SSH as it will be a LOT easier to copy and paste from a pc than running from the pi itself.

sudo apt-get update -y && sudo apt-get upgrade -y

sudo apt-get install python-smbus python-pip libi2c-dev pigpio python-numpy python-matplotlib build­essential python-mpltoolkits.basemap git -y

  • Build-Essential may throw errors

git clone
cd Adafruit_Python_PureIO
sudo python install

sudo pip install --upgrade setuptools pip
sudo pip install setuptools --upgrade
sudo pip install apscheduler

git clone
cd SDL_Pi_SkyWeather
cd Adafruit_Python_SSD1306
sudo python install

sudo apt-get install -y python-requests python-picamera python3-picamera pigpio python3-pigpio 

That should get you up and running, without SQL, to a point of being able to test and debug the hardware. Dont forget to edit your file. You should be able to get it to report something by just editing the device present global variables section.

To run it

cd SDL_Pi_SkyWeather
sudo pigpiod

sudo python

MySQL Install

sudo apt install mariadb-server
sudo mysql_secure_installation
sudo apt-get install python-mysqldb
sudo apt-get install apache2 php5 libapache2-mod-php5 ???
sudo apt-get install phpmyadmin
sudo nano /etc/apache2/apache2.conf

Now at the bottom of this file enter the following line:
Include /etc/phpmyadmin/apache.conf

sudo apt-get install libblas-dev liblapack-dev python-dev libatlas-base-dev gfortran python-setuptools python-matplotlib -y

sudo pip install scipy

This will take a while

sudo a2enmod rewrite
sudo systemctl restart apache2

cd SDL_Pi_SkyWeather/SkyWeatherSQL

sudo mysql -u user -p < WeatherPiStructure.sql

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: