Python script for streaming live data
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Python script for streaming live data to from a solar panel by means of a raspberry pi. Live datafeed from SunPi here

Installing everything needed for the raspberry pi

  • Configuring i2c required for the current sensors


    sudo raspi-config

    and activate i2c

    Go to sudo nano /etc/modules and add


    Then install these

    sudo apt-get update
    sudo apt-get install -y python-smbus i2c-tools

    Restart and check if working

    lsmod | grep i2c_

    Test hardware (remember to plug hardware in)

    sudo i2cdetect -y 1
  • Download and move the files for the current sensor

  • Install plotly

    Run these commands

    sudo apt-get install python-dev
    sudo apt-get install python-pip
    sudo pip install plotly

    Grab a copy of the example file

    Open and transfer to SunPi remove adc stuff and insert username, api, token

  • To start script on boot

    Open crontab

    sudo crontab -e

    and add

    @reboot (sleep 10; python /home/pi/SunPi/ &

    (& makes it run in the background)