Coder Social home page Coder Social logo

octopipanel's Introduction

OctoPiPanel v0.2-dev

OctoPiPanel creates a simple interface on a small screen to control OctoPrint.
OctoPiPanel requires Pygame to be installed. Pygame can be downloaded from http://pygame.org.
OctoPiPanel is developed by Jonas Lorander ([email protected]).

https://github.com/jonaslorander/OctoPiPanel

This is a (slow) work in progress.

Simplified BSD-2 License:

Copyright 2014 Jonas Lorander. All rights reserved.

Setup

Requirements

OctoPiPanel can be run on Windows as well to ease development.

Pi TFT Setup

Follow the DIY Installer Script setup at Adafruit to set up the Pi TFT correctly. https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/easy-install

Getting and installing OctoPiPanel

The setup is pretty basic. You'll be needing Python 2.7 which should be installed by default, Git, and pip.

cd ~
sudo apt-get install python-pip git
git clone https://github.com/jonaslorander/OctoPiPanel.git
cd OctoPiPanel
sudo pip install -r requirements.txt

Settings

  • You need to activate the REST API in you OctoPrint settings and get your API-key with Octoprint Versions older then 1.1.1, otherwise you will be fine.
  • Put the URL to you OctoPrint installation in the baseurl-property in the OctoPiPanel.cfg file. For instance http://localhost:5000 or http://192.168.0.111:5000.
  • Put your API-key in the apikey-property in the OctoPiPanel.cfg file.
  • By default the background light och the displays turns off after 30 seconds (30 000 ms). This can be changed by editing the backlightofftime-property in the configuration file. Setting this value to 0 keeps the display from turning off the background light.
  • If you have a display with a different resolution you can change the size of OctoPiPanel window using window_width- and window_height-properties in the configuration file.

Running OctoPiPanel

Start OctoPiPanel by browsing to the folder of the Python-file and execute
sudo python ./OctoPiPanel.py &
In a screen session (auto start scripts will be coming later). Yes, sudo must be used for the time being.

Automatic start up

Make OctoPiPanel.py executable and then copy the script files to their respective folders and make the init script executable:

cd ~/OctoPiPanel
chmod +x OctoPiPanel.py
sudo cp scripts/octopipanel.init /etc/init.d/octopipanel
sudo chmod +x /etc/init.d/octopipanel
sudo cp scripts/octopipanel.default /etc/default/octopipanel

Then add the script to autostart using sudo update-rc.d octopipanel defaults.

This will also allow you to start/stop/restart the OctoPiPanel daemon via

sudo service octopipanel {start|stop|restart}

Update OctoPiPanel

Stop OctoPiPanel and then issue this command to update:

cd ~/OctoPiPanel/
git pull
sudo pip install -r requirements.txt

If you would like to switch branch to devel, do this:

cd ~/OctoPiPanel/
git pull
git checkout devel
sudo pip install -r requirements.txt

Then you can start OctoPiPanel again.

Attributions

PygButton courtesy of Al Sweigart ([email protected])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.