Skip to content

Update28 may #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions source/after-install/device-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,21 @@ Configuring your devices

Since BrewPi 0.2, the hardware setup is dynamic and flexible: you can install and uninstall hardware from the web interface. This is all done from the `Device Configuration` tab in the web interface. From the device manager you can assign hardware (temp sensors, SSRs, etc.) to functions.

The current implementation of the device manager is a bit complicated and basic, but we are working on a more user friendly interface. I hope that this document will help you set it up.
The current implementation of the device manager is a bit complicated and basic, but we are working on a more user friendly interface. This document will help you set it up.

Your devices just after programming
-----------------------------------
If you have just uploaded a HEX file to your Arduino and the EEPROM was reset, it will depend on your shield version which devices are already installed.

RevC shields
Arduino RevC shields
^^^^^^^^^^^^
For RevC shields no devices are installed by default.

RevA shields
Arduino RevA shields
^^^^^^^^^^^^^
For RevA shields your devices are set up just like they were in version 0.1 for backwards compatibility. A heater, cooler and door switch are already installed. Also, 2 temperature sensors are installed as 'First device on bus'. You will notice that the 2 temperature sensors are also listed under `Detected devices`, based on their address.

If you would like to switch from 'First device on bus' to address based assignment, remove the 2 installed temperature sensors by setting their function to `None` and clicking apply. After that you can install the detected sensors based on their address. A RevA shield has two OneWire ports. You can connect multiple sensors to both if you use address based sensors.

Receiving the device list
-------------------------
Click `Refresh device list` to receive an updated list of installed and detected devices from the Arduino. To be able to receive the device list, the BrewPi script has to be running.
Click `Refresh device list` to receive an updated list of installed and detected devices from the controller. To be able to receive the device list, the BrewPi script has to be running.

Installed Devices
^^^^^^^^^^^^^^^^^
Expand Down
17 changes: 4 additions & 13 deletions source/after-install/program-arduino.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
Programming your Arduino with BrewPi
====================================
Uploading a new hex file to your Arduino can be done straight from the BrewPi web interface.
The serial port is read from the config file (``/home/brewpi/settings/config.cfg``), so make sure the settings are correct.
If this file does not contain port settings, BrewPi uses the defaults from (``/home/brewpi/settings/defaults.cfg``)
BrewPi defaults to ttyACM0 and when it cannot find it, it tries ttyACM1.
If your serial port is one of these, you don't have to do anything.
The serial port used by BrewPi is read from the config file (``/home/brewpi/settings/config.cfg``). In most cases, the default serial port is ``/dev/ttyACM0``. If typing ``ls /dev/ttyACM*`` shows ttyACM0 or ttyACM1, then you do not need to change anything.

The default should normally work (``/dev/ttyACM0``), but if your script fails to start because the serial port is not found, run this to see the candidates:
If BrewPi fails to start because it was unable to detect your serial port, you'll want to update the config file with the appropriate path. If this occurs, running ``ls /dev/ttyA*`` will reveal potential candidates for of these situations.

.. code-block:: bash

ls /dev/ttyA*

It is definitely not ``ttyAMA0``, that is the internal serial port.
Official Arduinos normally appear as ttyACM0 or if that is already taken, ttyACM1.
Arduino clones sometimes appear as ttyUSB0 or similar. If that is the case, add these lines to (``/home/brewpi/settings/config.cfg``):
Note: It is definitely not ``ttyAMA0``, that is the internal serial port.
Arduino clones sometimes appear as ttyUSB0 or similar. If that is the case, add these lines to ``/home/brewpi/settings/config.cfg``:

.. code-block:: bash

Expand Down
61 changes: 61 additions & 0 deletions source/after-install/program-spark.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Programming your Spark with BrewPi
====================================
The serial port used by BrewPi is read from the config file (``/home/brewpi/settings/config.cfg``). In most cases, the default serial port is ``/dev/ttyACM0``. If typing ``ls /dev/ttyACM*`` shows ttyACM0 or ttyACM1, then you do not need to change anything.

If BrewPi fails to start because it was unable to detect your serial port, you'll want to update the config file with the appropriate path. If this occurs, running ``ls /dev/ttyA*`` will reveal potential candidates for of these situations.

Note: It is definitely not ``ttyAMA0``, that is the internal serial port.
Arduino clones sometimes appear as ttyUSB0 or similar. If that is the case, add these lines to ``/home/brewpi/settings/config.cfg``:

.. code-block:: bash

port = /dev/ttyUSB0
altport = /dev/ttyUSB1


Updating your Spark firmware
----------------------------------------

To program your Spark from the web interface, take the following steps:

#. Run the update script from the brewpi-tools repo (usually installed to /home/brewpi/brewpi-tools):

.. code-block:: bash

python updater.py

If the script asks you which branch you would like to check out, select the 'develop' branch.
If the script asks you to switch to the master branch, select 'no'.

When the script asks you if you wish to check your controller version firmware and update it with the most recent version from GitHub, select 'yes'.

<<Insert what to do if not up to date>>

#. When the updater script asks you update the device, select 'no'.

#. If you haven't already, plug in your temperature sensors and connect the Spark to your Pi via a USB cable. Once the BrewPi Hardware Test screen loads, take note of the alphanumeric string that is listed above each temperature probe for later use- these are the OneWire addresses you will use the web UI to assign a role to each probe.

#. Log on to your BrewPi web interface by entering the Raspberry Pi's IP address into a web browser.
The IP is displayed when the installer finishes, or by typing ``ifconfig`` at the shell (look for inet addr).
The LCD display in the upper left hand corner should display "Testing" when first loaded. If the page says 'script not running' after waiting up to 60 seconds, you should start the BrewPi script via the button on the right.
This is automatically done by the CRON job within one minute if you click the 'start script' button.
If you have not set up CRON yet, you can manually start the script with:

.. code-block:: bash

sudo -u brewpi python /home/brewpi/brewpi.py

#. Open the maintenance panel by clicking the "Maintenance panel" button and go to the `Reprogram controller` tab.

#. Download the HEX file appropriate for your setup from http://dl.brewpi.com/brewpi-avr/stable.
You can also compile your own hex file with Atmel Studio.
Make sure you have the right file for your Arduino type (UNO or Leonardo) and the right shield (Rev A or Rev C).
Only the first 100 BrewPi shields were rev A. If you bought one recently, you have Rev C.

#. The BrewPi script will automatically restart after programming and report which version of BrewPi it has found on the Arduino.


Troubleshooting
---------------
* If you're prompted with an error: "cannot move uploaded file" rerun the fix permissions script in ``sudo sh /home/brewpi/fixPermissions.sh``.
* If saving devices in the device manager does not work, your EEPROM was probably not reset properly. Try reprogramming without settings and devices restore.
Binary file added source/images/0387409f38fa3fc0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/06533194de350bcd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/5798542a9da21c27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/b4d18a853846d5ab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/f1f6d40f0faeb89c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/images/f9c47b7172af8d0f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Install and update scripts are available to do most of the work for you. After f
If you really want to, you can still do your setup manually or just check the manual setup guide to see what the install script will do for you.

.. toctree::
:maxdepth: 2
:numbered: 2
:maxdepth: 3
:numbered: 3

installing-your-pi/rpi-setup
automated-brewpi-install/automated-brewpi-install.rst
Expand Down
19 changes: 11 additions & 8 deletions source/installing-your-pi/rpi-setup.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
Basic configuration of your Raspberry Pi
========================================
This step by step guide will help you to set everything up on your Raspberry Pi and Arduino.
This step by step guide will help you to set everything up on your Raspberry Pi and Arduino, Spark, or Photon.

Installing Linux on your Raspberry Pi
-------------------------------------
The easiest cross-platform way to install Linux on your Raspberry Pi is using the NOOBS installer.
In most cases, the Raspberry Pi comes with an SD card pre-loaded with NOOBS, which lets you select an operating system to install. If your Pi did not come with NOOBS already loaded on it, please follow section 1.1.1 . Otherwise, please proceed to 1.2 .

Installing NOOBS/Rasbpian from scratch
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If your Pi came with an SD card with NOOBS already on it (or the OS of your choice), you can skip this section.

#. Go to the `Raspberry Pi download page <http://www.raspberrypi.org/downloads>`_
#. Download the NOOBS zip file.
Expand All @@ -14,7 +18,6 @@ The easiest cross-platform way to install Linux on your Raspberry Pi is using th
#. Put the SD card in your Raspberry Pi and boot it.
#. You will get a menu to choose which OS you want to install, choose Raspbian.


Windows users can also use `Win32DiskImager <http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml>`_
to write the image to the SD card. If you have an old image on your card and cannot remove the partition with Windows,
`SD Formatter <https://www.sdcard.org/downloads/formatter_3/>`_ can help you to format the SD card before writing the image.
Expand All @@ -26,7 +29,8 @@ You can change the password in the next step.

Configuring your system
-----------------------
SSH is enabled by default in the image you installed.
If you installed Raspbian, SSH is enabled by default in the image you installed. The default login credentials for the image are username ``pi`` and password ``raspberry``.

If you have an Ethernet cable connected, you may SSH into the Pi to begin your configuration.
The wired ethernet port is set to receive a dynamic IP address using DHCP. To find out which IP it got, use your router's web interface.

Expand All @@ -45,8 +49,7 @@ If the basic system settings menu doesn't come up automatically, type:
Setting up WiFi
---------------

I am using an Edimax EW-7811un WiFi dongle. The latest image has built in support for this dongle. I can highly recommend this dongle.
The dongle is based on a Realtek 8192CU or 8188CUS, but the 8192cu driver that ships with Raspbian works for both.
Older Raspberry Pi models require a USB WiFi dongle for wireless networking (I am using an Edimax EW-7811un WiFi dongle, I can highly recommend it). The newer Raspberry Pi 3's have integrated WiFi capabilities and do not require a USB WiFi dongle.

To improve the stability of your WiFi, it is recommended to disable power management:

Expand All @@ -72,7 +75,7 @@ And add this line (replace the IP with your routers IP address, the standard gat

.. code-block:: bash

* * * * * ping -c 1 192.168.0.1
* * * * * ping -c 1 192.168.X.X


Setting up a static IP address
Expand Down Expand Up @@ -103,7 +106,7 @@ My /etc/network/interfaces file looks like this:

The right IP addresses depend on your home network setup.
You can run ifconfig before editing the interfaces and write the automatically assigned addresses down.
However, it is recommended to pick a static Ip address that is outside of your router's DHCP range.
It is recommended to pick a static IP address that is outside of your router's DHCP range (for example, if your router normally assigns IPs that start around 192.168.1.5, pick a higher last number, such as 192.168.1.200)

Finally, you will need to restart your network interfaces for these changes to occur:

Expand Down