Error setting Constant Mode with Spark [SOLVED]

Hi there,

Finally managed to finish the build and am trying to get my Spark up and running for a water test run. If I set beer or fridge constant mode if get the following errors in the logs:

Mar 15 2015 17:11:17 Unicode decode error: ‘utf8’ codec can’t decode byte 0xff in position 22: invalid start byte
Mar 15 2015 17:11:17 Line received was: L:["Mode Beer Const. ",“Beer --.- 25.1 ??”,“Fridge --.- 30.0 ??”,“Idling for 33m57”]

Any ideas ?

Strange, it looks like it is failing on the degree sign. Is this on a raspberry pi?

Can you check which version of simplejson you have installed?

First install pip:

sudo apt-get install build-essential python-dev python-pip

Then check the version:

pip freeze | grep simplejson

If it is older than mine (3.6.5) can you try if upgrading helps?

sudo pip install simplejson --upgrade

I will modify the installer to use pip for all python packages, so they are always up to date.

Wow they were much older on 2.5.2 even after a full apt update / upgrade on first build. I have updated to 3.6.5. strangely I rebooted the Pi after posting the error and it seemed to kick it all into life.

It is now running a sample profile and seems to be heating the fridge / water so will run it for a while and see what we get !

I am having the same error, but my version is yours:

Mar 28 2015 22:09:06 Unicode decode error: 'utf8' codec can't decode byte 0xff in position 22: invalid start byte
Mar 28 2015 22:09:06 Line received was: L:["Mode Beer Const. ","Beer 20.3 5.0 ??","Fridge 20.8 1.0 ??","Idling for 15m43"]

Version:

simplejson==3.6.5

But i get also ean error when i try to get the verison:

pi@brewpi ~ $ pip freeze | grep simplejson
Warning: cannot find svn location for distribute==0.6.24dev-r0
simplejson==3.6.5

I get the same error for distribute, but it is given the correct version for simplejson as is yours.

I found that the USB cable was quite sat in correctly so I shutdown the Pi and Spark and reseated the cable, and then booted both. I boot the Pi first and then the Spark and it then started to work

Thanks Mark for the tip.

I tried the procedure (switching off, checking cable, rebooting), but nothing changed.

Just a thought and I have no idea if this will fix it, but I also changed the setting in default.cfg to be Core as the board type.

/home/brewpi/settings/default.cfg

scriptPath = /home/brewpi/
wwwPath = /var/www/
port = /dev/ttyACM0
altport = /dev/ttyACM1
boardType = Core
beerName = My First BrewPi Run
interval = 120.0
dataLogging = active

1 Like

I had exactly the same problem and cured it by going to advanced settings in the web management and sending the Celsius setting to the Brewspark.
I had assumed that because “C” was shown in the box that it was set, but pressing the button beside it cured it for me.

1 Like

Cool! That solved the problem for me too! Thanks!