GithubHelp home page GithubHelp logo

brewpi-tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brewpi-tools's Issues

PHP5 issues with Raspian Stretch

As a total noob with Raspian Pi I'm having 'fun' with the brew pi install - the issue being that it appears the new version of Raspain Stretch has been 'upgraded' to PHP7, removing all PHP5 code, so the brew pi tools install fails. It seems there are some workarounds for the OS, although I'm still working on persuading them to work... Meanwhile is there any likelyhood of the brewpi tools being upgraded to use PHP7?

this is the line in the install that causes the issue :
sudo apt-get install -y apache2 libapache2-mod-php5 php5-cli php5-common php5-cgi php5

none of libapache2-mod-php5 php5-cli php5-common php5-cgi php5 are included in the Raspian Stretch

install script doesn't work

following instructions per this article: http://docs.brewpi.com/en/latest/automated-brewpi-install/automated-brewpi-install.html and I get this:

pi@raspberrypi:~ $ git clone https://github.com/BrewPi/brewpi-tools.git ~/brewpi-tools
Cloning into '/home/pi/brewpi-tools'...
remote: Counting objects: 479, done.
remote: Total 479 (delta 0), reused 0 (delta 0), pack-reused 479
Receiving objects: 100% (479/479), 138.44 KiB | 0 bytes/s, done.
Resolving deltas: 100% (288/288), done.
pi@raspberrypi:~ $ sudo ~/brewpi-tools/install.sh

Checking for Internet connection...
Success!


Checking whether this script is up to date...

/home/pi/brewpi-tools is up-to-date.

***** Installing/updating required packages... *****

Reading package lists...
Building dependency tree...
Reading state information...
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libapache2-mod-php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package php5-cgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libapache2-mod-php5' has no installation candidate
E: Package 'php5-cli' has no installation candidate
E: Package 'php5-common' has no installation candidate
E: Package 'php5-cgi' has no installation candidate
E: Package 'php5' has no installation candidate



*** ERROR ERROR ERROR ERROR ERROR ***
----------------------------------
See above lines for error message
Setup NOT completed

bummer.......

Install.log file

We should make an install.log file to assist in troubleshooting installations. This log would be a mirror of all text printed to screen and input by the user, so we can see exactly what did and didnt work, and what settings the user used.

Remove from x import *

Wildcard imports make the code hard to read.

from git import *
Repo()

is harder to read than

import git
git.Repo()

When importing parts of modules, make it explicit, so a reading can see where things come from at the top of the file:
from git import Repo

Maybe the imports should be excepted too, like in brewpi.py

Update scripts for Windows

Our update script does a few things that are very much oriented at Linux. On Windows, we could skip those parts, but the git actions to update the repo and updating the controller should still work.

The update script can check on which platform it is running and still do most of the actions when not running on Linux.

Check for net connection

Prior to running, install.sh should check for a working network connection, otherwise downloads will fail.

While not likely, a user might image an sd card, copy the installer file to the card (not knowing it needs to download more data) and boot the Pi from it without connecting it to a network (or configuring wifi properly, etc) the installer will fail and leave the user in a 'bad' state as some, but not all, of the install did take place.

Git stash fails when user.name and user.email are not set

On a fresh pi, git stash failed because user.name and user.email were not set in the git config.

When doing a stash, git wants to store the user with the stash and fails.

Most users will probably not have this set up, because they only pull. We need to catch this error and offer an easy way to configure the settings.

Updater fails when there is no crontab

***** Updating cron for the brewpi user... *****

no crontab for brewpi

*** ERROR ERROR ERROR ERROR ERROR ***

See above lines for error message
Setup NOT completed

Wrong language!

Line 142:

else
case "$webPath" in
y | Y | yes | YES | Yes)
webPath="/var/www";;
* )
pass;;
esac

pass is Python, not bash! (or am I wrong?)

Update URL

Reported by Azuu

install.sh references a URL that is no longer in existence.

Updater should update Arduino hex file version

Currently, the updater just says 'don't forget to update the hex file, too'. We should have a way of a) checking the version of the Arduino hex file and if it is compatible with the current version of BrewPi, and b) download the hex file and update that as well

Run install.sh as sudo?

Please review commit 958620f..ab5da69 - I think it will 'clean up' the code a bit and prevent some unforseen errors. You see this check in enterprise code quite often.

False up-to-date msg if repo check fails

Checking whether the update script is up to date
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
/home/geo/BrewPi/brewpi-tools is up-to-date.

We'll need to error check connections, otherwise we get a false up-to-date message

Use pip instead of apt-get for python package dependencies

The python packages on apt are often very outdated, we should not rely on it.
The latest version is also different for various operating systems. (Linux flavors or Windows).

It would be better to install the packages from pip. The installer and upgrade script should be modified for this.

Related issue (demonstrates the problem with psutil):
BrewPi/brewpi-script#47

Move everything in this repo to the script directory?

There is no reason the script cannot update itself: the python scripts are loaded in memory and can just be overwritten with a new version while the old version is still running.

This will be less confusing for users.

Remove hardcoded paths to repos

Update script has many hardcoded paths to the repo's. These should be removed:
Check the default location, if the repo is not found there, prompt.

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.