Legacy, script will not start


#1

Hi!

I got this almost complete setup from a guy who was running it on a laptop and not a Raspberry Pi. He had followed theese instructions: https://www.homebrewtalk.com/forum/threads/howto-make-a-brewpi-fermentation-controller-for-cheap.466106/ as alot of the links did not work, I have been looking online all day for different guides, and slowly getting somewhere. Using a combination of https://dotps1.github.io/homebrewing/2018/01/22/brewing-your-own-brewpi.html https://community.brewpi.com/t/raspberrypi-to-arduino/3199 and http://diybrewpi.wikia.com/wiki/Setting_Up_Your_RPI and some comments on the last one, I have finally been able to install it succesfully and update with change to legacy, and updating the firmware for the andruino (chinesee version).

So after all this when i open the brewpi url on a different computer on the network it says script not running. The only other error message I can find is on the Device Configuration where it says: Error while receiving device configuration:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Do you have any advice on what I can try to fix this?

Thanks!
Aleks


#2

Ignore the JSON error. The script is not running or ui the can’t find it. Check for errors in the logs of the python script. And if he ran it on a laptop, there is a good chance he started the script manually. The UI button will probably not work.


#3

Hi! thanks for your reply! I found this in the stderr.txt file:

Traceback (most recent call last):
  File "/home/brewpi/brewpi.py", line 21, in <module>
from BrewPiUtil import printStdErr
  File "/home/brewpi/BrewPiUtil.py", line 22, in <module>
import autoSerial
  File "/home/brewpi/autoSerial.py", line 21
{'vid': 0x1a86, 'pid': 0x7523, 'name': "Uno-Clone"}
^
SyntaxError: invalid syntax

I do have some experience with python, but I have no clue how to fix this, any help would be apreciated!

EDIT: I realised this is the line I added to find my andruino clone, although I dont understand why it gives me a syntax error, as it is the same as previous lines, I tried removing it, but then I get this error:

 Sep 28 2018 02:04:03   Notification: Script started for beer 'My First BrewPi Run'
 Sep 28 2018 02:04:13   Checking software version on controller... 
 Sep 28 2018 02:04:23   Warning: Cannot receive version number from controller. Your controller is either not programmed or running a very old version of BrewPi. Please upload a new version of BrewPi to your controller.
Traceback (most recent call last):
  File "/home/brewpi/brewpi.py", line 415, in <module>
    startBeer(config['beerName'])
  File "/home/brewpi/brewpi.py", line 289, in startBeer
    changeWwwSetting('beerName', beerName)
  File "/home/brewpi/brewpi.py", line 222, in changeWwwSetting
    wwwSettingsFile = open(wwwSettingsFileName, 'r+b')
IOError: [Errno 13] Permission denied: '/var/www/html/userSettings.json'

#4

Check your python for whitespace correctness, or perhaps the trailing comma the line before.

For the second error check file ownership.