Brewpi-arduino assistance


#1

Hi all.
It is the first time I write and I have read many threads but I can not find an answer for this specific problem.

I am a Brewpi user with: RPI3 (RevC) + arduino UNO + tuned refrigerator from 3 years ago. It took me a lot of work to prepare everything, especially to tune the refrigerator, and I’ve been working very well with brewpi all this time.
The problem is that the Rpi3 SDcard is damaged and I lost the backup! I bought a new card but I have been trying for a few days to get a copy of Noobs compatible with Brewpi-arduino-Rpi3.

The problem is not to change or buy Spark … is that the system I had was cheap, efficient and I have everything ready to connect and take advantage of it.

So I would need a link to a noobs / iso compatible with my Raspberry Pi3 + arduino.

I have tried many things but finally the summary:

  1. NOOBS + wheezy present rainbow problem in boot (I suppose that by incompatibility with Rpi3).
  2. NOOBS + Jessie seems that everything is fine, but it presents an error when executing ‘sudo ./install.sh’ and gives error: 4 libraries are missing php5 + libapache2. (ERROR ERROR ERROR ERROR ERROR).

Any help will be welcome (links to download pls) and TY in advance.

F


#2

I think the easiest way to install is to follow our new docker install process:
https://wiki.brewpi.com/getting-started/raspberry-pi-docker-install

Then to switch to the arduino compatible legacy branch, run these commands:

docker exec -it brewpi bash
git fetch --unshallow
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git checkout legacy 
cd /var/www/html
git fetch --unshallow
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git checkout legacy
exit
docker commit brewpi

#3

Thank you very much Elco, the procedure is very well explained.

I have followed all the steps with great care without errors, but finally when I open the Chromium browser in RPI it is not possible to contact arduino: the typical msg appears in brewpi: “Can not receive LCD text from Phyton script”.

When entering “maintenance panel” + “device configuration” + “Refresh device list” (checked “read values”)
it is not possible to see devices: after a while there is a msg "Error while receiving device configuration: SyntaxError: Unexpected token C in JSON at position 0".

On the main screen of Brewpi, on the right, it shows "Script not running!" and it is not possible to activate it.

Some considerations:

I have no spark (only arduino).

So:
I have to do the whole procedure including the final part even though I do not have spark?

Where is the error and the solution?

Thank you very much Elco!


#4

Please check the log why the script is not running. Also check whether the pi sees the Arduino with

lsusb
ls /dev/ttyA*

#5

OK, there are the results:

Arduino connect solved: Change the USB port, shut down and on :slight_smile:
(The arduino port appears yet in lsusb command)

LOG in Brewpi:

stderr:
Feb 19 2019 00:36:50 Error: Received invalid message on socket: lcd

stdout:
This version of BrewPi is not compatible with Arduino. Please check out the legacy branch instead.

(It appears not to downgrade to legacy…)


#6

Yes sounds like something didn’t work in the steps above. Try them again and pay attention to any errors.


#7

I supposed it Elco. Ok, lets go:
I reboot RPI and check that both containers are running (Brewpi and portainer).

Open SSH in my Windows PC and login ok to RPI.

(I understand that should repeat this commands):
docker exec -it brewpi bash
git fetch --unshallow
git config remote.origin.fetch "+ refs / heads / *: refs / remotes / origin / *"
git fetch origin
git checkout legacy
cd / var / www / html
git fetch --unshallow
git config remote.origin.fetch "+ refs / heads / *: refs / remotes / origin / *"
git fetch origin
git checkout legacy
exit
docker commit brewpi

Here is the screen echo:

Excuse my null level of Linux… Had I forgotten something?
No changes on brewpi: “Cannot receive LCD text from Python script” :frowning:


EDIT: I proceed to Delete the brewpi container and recreate it.
2 times repeated the same procedure with the same error.


#8

BTW, I complete the procedure in " https://wiki.brewpi.com/getting-started/raspberry-pi-docker-install "…INCLUDING THE SPARK AT THE END.
(I dont know if it is correct to include this spark configuration…?)

No errors and everything aparently works until the manual commands at the end (to make arduino compatible)…but all the errors appears when trying downgrade to legacy (as screen shows).
I repeated all procedure from the begining (format SDcard) and all again the same :confounded:


#9

Thanks for the log, now I see what the problem is.
You have some modified files that prevent the branch switch.

Updated instructions with stashing the changes:

docker exec -it brewpi bash
git fetch --unshallow
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git stash
git checkout legacy 
cd /var/www/html
git fetch --unshallow
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin
git stash
git checkout legacy
exit
docker commit brewpi

#10

TY very much Elco. I will try this