DIY Shield JSON errors

I’m, having some trouble with the DIY shield… I downloaded Atmel studio and all the latest branches. I changed the config.h to use BREWPI_SHIELD_DIY. After uploading the newly compiled .hex file I get this output:

**** Arduino Program script started ****

Arduino Home /usr/share/arduino/

Settings will not be restored

Devices will not be restored

Checking old version before programming.

Found BrewPi v0.2.4, running commit 00000000, on an Arduino standard on port /dev/ttyACM0


Requesting old settings from Arduino...

Saving old settings to file oldAvrSettings-Mar-01-2015-08-48-45.json

Loading programming settings from board.txt

Checking hex file size with avr-size...

Program size: 25666 bytes out of max 32256

Programming Arduino with avrdude: /usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P /dev/ttyACM0 -U flash:w:"brewpi_avr.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf

result of invoking avrdude:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "brewpi_avr.hex"
avrdude: input file brewpi_avr.hex auto detected as Intel Hex
avrdude: writing flash (25666 bytes):

Writing | ################################################## | 100% 4.95s

avrdude: 25666 bytes of flash written
avrdude: verifying flash memory against brewpi_avr.hex:
avrdude: load data flash data from input file brewpi_avr.hex:
avrdude: input file brewpi_avr.hex auto detected as Intel Hex
avrdude: input file brewpi_avr.hex contains 25666 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.95s

avrdude: verifying ...
avrdude: 25666 bytes of flash verified

avrdude done. Thank you.



avrdude done!

Giving the Arduino a few seconds to power up...

Back up in 5...

Back up in 4...

Back up in 3...

Back up in 2...

Back up in 1...

Back up in 0...

Now checking which settings and devices can be restored...

Checking new version: Found BrewPi v0.2.4, running commit 00000000, on an Arduino standard on port /dev/ttyACM0


Resetting EEPROM to default settings

Arduino debug message: INFO MESSAGE 15: EEPROM initialized

No settings to restore!

No devices to restore!

**** Program script done! ****

If you started the program script from the web interface, BrewPi will restart automatically

Mar 01 2015 08:49:12 New program uploaded to Arduino, script will restart
Mar 01 2015 08:49:19 Notification: Script started for beer 'My First BrewPi Run'
Mar 01 2015 08:49:30 Found BrewPi v0.2.4, running commit 00000000, on an Arduino standard on port /dev/ttyACM0

Mar 01 2015 08:49:35 Installed devices received: []
Mar 01 2015 08:49:35 JSON decode error: Expecting object: line 1 column 1 (char 1)
Mar 01 2015 08:49:35 Line received was: h:[D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:35 Cannot process line from Arduino: {"i":-1,"t":0,"c":1,"b":0,"f":0,"h":2,"d":0,"p":10,"a":"28DE243E060000A2","j": 0.000}D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:35 Cannot process line from Arduino: ,{"i":-1,"t":0,"c":1,"b":0,"f":0,"h":2,"d":0,"p":11,"a":"28A2B83F0600005E","j": 0.000}D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:35 Cannot process line from Arduino: ,{"i":-1,"t":0,"c":1,"b":0,"f":0,"h":1,"d":0,"p":13,"x":1}D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:35 Cannot process line from Arduino: ,{"i":-1,"t":0,"c":1,"b":0,"f":0,"h":1,"d":0,"p":12,"x":1}]

Mar 01 2015 08:49:42 Installed devices received: []
Mar 01 2015 08:49:42 JSON decode error: Expecting object: line 1 column 1 (char 1)
Mar 01 2015 08:49:42 Line received was: h:[D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:42 Cannot process line from Arduino: {"i":-1,"t":0,"c":1,"b":0,"f":0,"h":2,"d":0,"p":10,"a":"28DE243E060000A2","j": 0.000}D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:42 Cannot process line from Arduino: ,{"i":-1,"t":0,"c":1,"b":0,"f":0,"h":2,"d":0,"p":11,"a":"28A2B83F0600005E","j": 0.000}D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:42 Cannot process line from Arduino: ,{"i":-1,"t":0,"c":1,"b":0,"f":0,"h":1,"d":0,"p":13,"x":1}D:{"logType":"I","logID":10,"V":[-1]}

Mar 01 2015 08:49:42 Cannot process line from Arduino: ,{"i":-1,"t":0,"c":1,"b":0,"f":0,"h":1,"d":0,"p":12,"x":1}]

Not sure what would cause JSON decoding errors ?

The pin mappings of the DIY shield match my device.

#elif BREWPI_STATIC_CONFIG==BREWPI_SHIELD_DIY

// pins
#define beerSensorPin    10
#define fridgeSensorPin  11

// Pay attention when changing the pins for the rotary encoder.
// They should be connected to external interrupt INT0, INT1 and INT3

#define rotaryAPin 2 // INT1
#define rotaryBPin 1 // INT3
#define rotarySwitchPin 0 // INT2


#define coolingPin 12
#define heatingPin 13
#define doorPin    A5

#define DISP_RS 9
#define DISP_RW 8
#define DISP_EN 7
#define DISP_D4 6
#define DISP_D5 5
#define DISP_D6 4
#define DISP_D7 3

#define BREWPI_INVERT_ACTUATORS 0

#endif

I’m trying to find the old DIY branch of code for the Arduino?
https://github.com/BrewPi/brewpi-avr/tree/master

This branch is mentioned several times in the old forum, but I don’t see it on GitHub. I realize I’m using an “un-supported” configuration and I’m ok with that, not looking for support really, just seeing if any of this old stuff is around.

With Elco not selling an Arduino shield anymore, we don’ thave much choice but to do DIY…

looks like you’re compiling with debug logging enabled - if you compile without debug logging the errors will disappear. Be sure that BREWPI_DEBUG is set to 0 in your config.h file.

Even with DIY it’s best to follow the RevC shield schematics rather than the old DIY setup. RevC has gone through several iterations and improvements.