Photon update (0.2.11), Script update (0.3.7) and Shop closes August 5-22

Photon Firmware
I have just released firmware 0.2.11. The main thing it adds is support for the Photon. If you have a Spark Core, don’t bother updating.

Script update
I have updated the BrewPi script to add support for the Photon in flashDfu.py. It can now flash a new Photon system image and the BrewPi firmware in one go.

I have also added automatic serial port detection. You can now change your setting in config.cfg to:
port = auto
and it will automatically look for Cores, Photons or Arduinos.

Shipping
Today I have received the first batch of enclosures for the BrewPi Spark. They were delivered a bit late, too late to ship out orders today. All open orders will ship on Monday.

BrewPi will be closed August 5-22
I’m going to Vietnam/Cambodia for 2 weeks for a well needed vacation. The shop will be closed and no orders will be processed during that time. If you want to order soon, do it now.

PWM Firmare
I am going to have a look if I can do a quick release of what I have now for PWM actuators. This would make BrewPi kinda suitable for mashing. This is not the mashing update that was promised, I cannot get that out before I go.
I could however release a modified firmware that drives the fridge actuators with PWM. For those that are really in need to use BrewPi for mashing, it could control BIAB in fridge constant mode and probably HERMS in beer mode too.

I applied the update before I noticed that, as a Core owner, I shouldn’t bother with the update. Now I am thinking I need to roll back. How do I do that?

Did you encounter any issues?

The build should work fine on the Spark Core, I just stated that it would not gain you much.
You should be able to upload the older release via the web interface (I have not actually tested this, I must admit).
I have been running testing the new release on the Spark Core for testing, so if you don’t encounter problems, don’t bother downgrading.

I am now getting the dreaded “Cannot receive LCD text from Python script”. I have rebooted the Pi a few times to no avail.

When I look in the log I see this:

Aug 02 2015 17:03:06 Opening serial port
Aug 02 2015 17:03:16 Errors while opening serial port:
Could not find compatible serial devices

Does the Spark Core beep when starting up?
I just realized that I have not tested the auto serial port detection on Linux yet.

Please add in your config.cfg:

port = /dev/ttyACM0
altport = /dev/ttyACM1

to disable automatic detection and just use the given values.

Yes, my Core was beeping twice during startup and then going to the usual screen.

Having applied Elco’s suggested changes to /home/brewpi/settings/config.cfg I am now able to start the script as expected, Hooray! Thanks for the timely help.

Fixed :smile:

Device on windows:

USB VID:PID=2B04:C006

Device on Linux:

USB VID:PID=2b04:c006

The obvious fix is to convert to lowercase before the regex.

Next time there is an update to the brewpi-tools repo (via updater.py) will I end up with the latest config.cfg file as a result, or will I need to revert my recent change manually?

That file is out of source control, because it is user config.
defaults.cfg are the fallback settings, and auto is the new default.

If you just remove the port settings from config.cfg, it will fall back to auto detect.

Hi Elco,

Just wondering if the interim PWM update is likely to happen before you go?

Cheers.

Yes, I will release what I have so far before I go.

It’s out :smile:

Preliminary PWM actuators release

I found time to add PI controllers for the fridge actuators and to modify the beer PID anti-windup to work better in combination with this.

Hi,

I am currently using my own temperature controller, but the BrewPi project looks very interesting. Due to the fact that I need only limited functionality I decided to buy Photon core and display, wired it together and tried to upload the firmware to the core. Upload of FW passed OK, but when board is restarted the Photon led lights white and USB open is not open for connection. The display is fully white, no picture at all. When I try to reset to the factory state, Photon works as expected.

I checked the wiring and it is OK. So question is if this could be caused by missing DS2482 chip which I have not added to board yet. What do you think? Or is there any way how to check the display communication? Digital probe indicates that pins used for display interface are not set to ouptu probably as there is Z state (high impedance). It seems to me that code is stucked somewhere in the init phase.

Thanks in advance.

I just tried to add the DS2482 to the board and the firmware is started OK. :sunglasses:

Has anyone started using the new firmware? I’m going to do the update tonight & have a play with heating water in BIAB pot to see what happens.

Any update @SwiftPint ? how did you go?

IF you have time to post your experience that would be awesome.

Unfortunately I’m not able to open the serial port after adding those port settings to config.cfg. Just hanging at “Opening serial port” Any suggestions?

File downloaded successfully
Now writing BrewPi firmware /home/brewpi/utils/downloads/0.3.0a/brewpi-0.3.0a-photon.bin
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x2b04 product = 0xd006
Opening DFU capable USB device… ID 2b04:d006
Run-time device DFU version 011a
Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash /0x08000000/03016Ka,01016Kg,01064Kg,07128Kg"
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuDNLOAD-IDLE, status = 0
aborting previous incomplete transfer
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash "
Downloading to address = 0x080a0000, size = 58164

File downloaded successfully
Error during download get_status
Error during download get_status
Programming done, now resetting EEPROM to defaults
Opening serial port
Aug 18 2015 23:43:27 Opening serial port

This turned out to be a permissions thing.

Aug 19 2015 18:40:02 Opening serial port
Aug 19 2015 18:40:12 Errors while opening serial port:
[Errno 13] Permission denied: ‘/dev/ttyAMA0’

I had to add pi to the tty group…

pi@BrewPi /home/brewpi/logs $ ls -l /dev/ttyAMA0
crw-rw---- 1 root tty 204, 64 Aug 19 18:36 /dev/ttyAMA0
pi@BrewPi /home/brewpi/logs $ sudo adduser pi tty
Adding user pi' to grouptty’ …
Adding user pi to group tty
Done.
pi@BrewPi /home/brewpi/logs $

Then I got a good connection…

Aug 19 2015 18:54:03 Opening serial port
Aug 19 2015 18:54:03 Notification: Script started for beer 'My First BrewPi Run’
Aug 19 2015 18:55:02 Opening serial port
Aug 19 2015 18:55:02 Notification: Script started for beer 'My First BrewPi Run’
Aug 19 2015 18:55:12 Checking software version on controller…
Aug 19 2015 18:55:12 Found BrewPi v0.3.0a build 0.3.0a-0-g2d15c1b, running on a Particle Photon with a V1 shield on port /dev/ttyACM0

I am getting the following error when running updater.py,and it’s been this way for a few days. I get through the earlier parts of the script OK, just not the firmware part:

Checking current firmware version…
Aug 22 2015 14:00:19 Opening serial port
Current firmware version on controller: 0.2.10

Checking GitHub for latest release…
Latest version on GitHub: 0.2.11

Version on GitHub is newer than your current version, downloading new version…
Downloading latest firmware…
Downloading firmware failed

Did you run it with sudo?
Are you sure the pi had a working connection to GitHub?