• We have a new forum and it needs your help! Homebrewing Deals is a forum to post whatever deals and specials you find that other homebrewers might value! Includes coupon layering, Craigslist finds, eBay finds, Amazon specials, etc.

Wireless Brewpi Via Wifi

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

seeflat

New Member
Joined
Jan 16, 2016
Messages
2
Reaction score
0
It would be debian jessies py version as it installs 2.7 on ubuntu 14.
That didn't even cross my mind 😳

Did you have any of the same issues I had with invalid commands? I'm really banging head against the wall on this
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
As threatened, I've cobbled together a soup-to-nuts procedure to outfit an Arduino running BrewPi (an UNO R3, in this case) with Wifi capability, replacing the USB tether.

Much of this is predicated on turning an esp-03 module into something actually useful. If one starts with a more robustly constructed esp module, a lot of that will have been done already.

And as far as I can tell, pretty near any esp8266 module can be made to work. Some need more bits and pieces added than others, and it's very important to know if a module comes with a 5V to 3.3V regulator (can't really do this easily without it), but otherwise it should work.

The forums have a 30 day expiration for editing your own posts so if anyone finds something that needs fixing let me know. After 30 days, I'll have to appeal to a higher authority, and ain't nobody got time for dat ;)



Wifi-Serial Module for BrewPi

Hardware needed:

- esp8266 module

I used an ESP-03 purchased from here: http://www.amazon.com/gp/product/B00OSWGA8M/?tag=skimlinks_replacement-20 for $7.80 delivered (Prime). This is a minimal ESP8266 implementation and lacks a 5V to 3.3V regulator, as well as header pins. As we'll be using this module on a 5V-based Arduino, a 3.3V supply has to be provided somewhere.

View attachment 321607

Alternatively, there are ESP8266 modules on the market with full IO breakout headers and integrated 5V to 3.3V regulators that can spare the need for soldering.

- FTDI USB-Serial Convertor Module

Genuine FTDI-chip module purchased from here: http://www.amazon.com/gp/product/B00HSX3CXE/?tag=skimlinks_replacement-20 for $6 delivered (Prime). Without this item, you'll need to come up with an alternative method to load the ESP8266 firmware needed to act as a transparent network-serial bridge.

View attachment 321608

- mini USB plug to USB A plug cable (to connect FTDI module to USB host)
- Dupont jumpers
- (2) 1K 1/8-1/4W axial lead resistors
- (1) 2K 1/8-1/4W axial lead resistor
- header
- the minimum number of pins needed is 7
- I cut up a header strip to make a 2x8 header

Optional:
- ld1117v33 fixed 3.3V output LDO regulator
- (2) 1uF 10V or higher capacitors
- 5VDC power supply (eg: wall-wart)
- LEDs for Power and CONN status
- 200-300 ohm resistors for LEDs


Firmware:

- esp-link
I used Release 1.0.4 available here: https://github.com/jeelabs/esp-link/releases/tag/v1.0.4
Download esp-link.tgz for the .5MB flash on ESP-03

- BrewPi AVR hex file: I've used both 0.2.4 and 0.2.10 successfully


Software:

FTDI driver:

- Drivers for FTDI adapters are available here: http://www.ftdichip.com/Drivers/VCP.htm
Specifically, I used the setup executable from here: http://www.ftdichip.com/Drivers/CDM/CDM v2.12.10 WHQL Certified.exe
Execute the file and it will install automagically.

ESP Flasher Utility:

- I used XTCOM_UTIL on Windows, zip file available here: https://drive.google.com/folderview?id=0B3dUKfqzZnlwRXBnV2NzUUNJUms&usp=drive_web
This just needs to be unzipped, then run the executable directly.

Terminal Emulator for Raspbian on Raspberry Pi (optional, for testing):

- I used Minicom
- Install minicon on RPi:
- $ sudo apt-get update
- $ sudo apt-get install minicom


Assumptions:

- Running Raspian Wheezy
- If using Jessie, references to the /var/www/brewpi folder change to /var/www/html/brewpi

- Arduino UNO R3 or equivalent up and running BrewPi on a USB port or Bluetooth module

- An available computer/tablet/phone with Wifi capability and a web browser


Wiring the ESP-03

For a minimal implementation, follow the wiring diagram below. Provide header connections for 5VDC, GND, RX, TX and RESET. Also, provide an extra GND header pin to allow connecting RESET/GPIO0 to GND for programming the ESP.

Note the resistor divider on the RX input. This shifts an incoming 5V-derived TX signal to a compatible level for the 3.3V RX input on the ESP8266, allowing safe connection to a 5V Arduino.

Also, I show a 1K pull-down resistor for GPIO15, but this can be omitted and a straight connection from GPIO15 to GND used instead. However, this would pre-empt using any of the ESP-Link modes that use GPIO15.

View attachment 321610

I built this module on a 2" x 1-1/8" piece of 100mil perf board. I provided three LEDs (for Power, CONN and SER status), and brought out all of the ESP8266 IO pins to the 18 pin header, along with extra GND pins and the inputs to the LEDs. This allows me to configure the module to use any of the ESP-Link modes by using Dupont jumpers.

As all of my UNOs are equipped with home-made LCD shields with provision to connect 3.3V Bluetooth Serial modules, they already have a level-shifter for the outbound TX signal, so I omitted that from my ESP boards.

View attachment 321611

Flashing the ESP-03

- Be sure to move the jumper on the FTDI adapter to the "5V" position.

- Connect the ESP module to the FTDI adapter

ESP Module FTDI Module
VIN ------------- VCC
GND ------------- GND
RXD ------------- TXD
TXD ------------- RXD

- Jumper ESP-03 pins

CH_PD to 3.3V (hard-wired in schematic)
GPIO0 to GND (temporary jumper)
GPIO15 to 1K Pull Down or GND (hard-wired in schematic)

- Connect the FTDI adapter to a USB port on the system to be used to flash the ESP-03.

- Open Control Panel - Devices And Printers
- You should see device "FT232R USB UART"
- Right-click on the FT232R icon, select Properties
- Click the Hardware tab
- Check to see which USB Serial Port is being used (XTCOM_UTIL supports only COM ports 1-6).
- Click the list entry for USB "Serial Port"
- Click the Properties button
- Click the Port Settings tab
- Change the settings here to:
- Bits Per Second = 115200
- Data Bits = 8
- Parity = None
- Stop Bits = 1
- Flow Control = None
- Click the Advanced button
- Change the COM Port Number setting to COM1, COM2...or COM6.
- "OK" your way back up and out of the FT232R USB UART Properties dialog and back to the desktop.


- Launch XTCOM_UTIL.exe
- Click Tools - Config Device

View attachment 321612

- Change COM No setting to the COM port you selected when configuring the FTDI adapter.
- Change Baud Rate to 115200
- Click the Open button
- A pop-up "Operation Succeeded" should appear.
- Click the OK button.
- Click the Connect button
- Should get a message indicating successful connection,
- Click the OK button, then dismiss the Conf Device page.

- Click API TEST - Flash Image Download

View attachment 321613

- Browse to the location of the esp-link folder and select the boot_v1.4(b1).bin file
- Set the program Address Offset (hex): to 0x00000
- Click the DownLoad button
- should get an Operation Succeeded message
- Dismiss the Flash Image Download page.

[NOTE: I found I had to reboot the ESP to upload the second and third code blocks, thus the following steps]

- Momentarily disconnect the VCC connection to the ESP-03, then connect it again.

- Back in XTCOM_UTILITY, Click Tools - Config Device
- Make sure the COM port is set correctly
- Click the Open button
- A pop-up "Operation Succeeded" should appear.
- Click the OK button.
- Click the Connect button
- Should get a message indicating successful connection,
- Click the OK button, then dismiss the Conf Device page.

- Click API TEST - Flash Image Download
- Browse to the location of the esp-link folder and select the blank.bin file
- Set the program Address Offset (hex): to 0x7e000
- Click the DownLoad button
- should get an Operation Succeeded message
- Dismiss the Flash Image Download page.

- Momentarily disconnect the VCC connection to the ESP-03, then connect it again.

- Back in XTCOM_UTILITY, Click Tools - Config Device
- Make sure the COM port is set correctly
- Click the Open button
- A pop-up "Operation Succeeded" should appear.
- Click the OK button.
- Click the Connect button
- Should get a message indicating successful connection,
- Click the OK button, then dismiss the Conf Device page.
- Click API TEST - Flash Image Download
- Browse to the location of the esp-link folder and select the user1.bin file
- Set the program Address Offset (hex): to 0x01000
- Click the DownLoad button
- This file takes awhile to transfer
- should get an Operation Succeeded message
- Dismiss the Flash Image Download page.
- Exit the XTCOM_UTILITY

- Unplug the FTDI adapter from the USB host, and disconnect it from the ESP-03.
- Remove the jumper from ESP GPIO0 to GND


Initial ESP-03 Configuration

- On the ESP module, remove the GND connection to GPIO0.
- Connect power to the ESP-03.

- esp-link initially comes up with the ESP in Access Point mode.
- use a WiFi enabled host device (laptop, cell phone, etc) to find the ESP access point SID
- my ESP-03 came up as ESP-F3B019
- connect to the ESP access point
- launch a browser with url http://192.168.4.1/
- this brings up the esp-link home page

View attachment 321620

- Click on the Wifi button on the left edge of the page

View attachment 321622

- write down the Wifi MAC address (especially if you use MAC filtering on your WiFi Access Point(s))
- From the Wifi Association table, select the desired Network SSID
- Enter the Wifi Password for the selected WiFi access point
- Click the Connect! button
- note the Wifi State information to verify the ESP has connected and obtained a valid IP address
- Click the Switch to STA mode hot spot.

- Change the Special Settings to use a Static IP address
- Enable Static IP
- Enter the desired Static IP Adress (eg: 192.168.1.230)
- Enter the Net Mask (typically, 255.255.255.0)
- Enter the Gateway Address (the LAN address of your router) (eg: 192.168.1.251)
- Click the Change button.
- Verify the Wifi State information has been updated per the Static IP settings

- Click on the Home button
- note the Pin Assignment section. Here you can change how the ESP IO are used.
- esp-bridge:
- GPIO12 = hardware Reset output than can be used to reset the Arduino
- GPIO0 = CONN LED output (active LOW, connect LED anode to 3.3V)
- GPIO14 = SER LED output (active LOW, connect LED anode to 3.3V)
- GPIO13 = ISP

- esp-01 (AVR) RECOMMENDED
- GPIO0 = hardware Reset output than can be used to reset the Arduino
- GPIO2 = CONN LED output (active LOW, connect LED anode to 3.3V)

- wifi-link-12:
- GPIO0 = CONN LED output (active LOW, connect LED anode to 3.3V)
- GPIO1 = ISP
- GPIO2 = SER LED output (active LOW, connect LED anode to 3.3V)
- GPIO3 = hardware Reset output than can be used to reset the Arduino - GPIO13: connect to TX of microcontroller
- GPIO15: connect to RX of microcontroller


- CONN LED:
- Very short flash once a second: not connected to a network and running as AP+STA,
i.e. trying to connect to the configured network
- Very short flash once every two seconds: not connected to a network and running as AP-only
- Even on/off at 1HZ: connected to the configured network but no IP address (waiting on DHCP)
- Steady on with very short off every 3 seconds: connected to the configured network with an IP address
(esp-link shuts down its AP after 60 seconds)

- SER LED:
- SER LED will blink briefly every time serial data is sent or received by the esp-link.

- Click on the uC Console button at the left edge of the page

View attachment 321621

- on this page you can change the ESP8266 serial port baud rate to match up with the target device
- when connected to an RPi, be sure to match the terminal emulator command with the baud rate setting
- I did my testing on the RPi at 115200 baud without issue
- when connected to an UNO running BrewPi, set the baud rate here to 57600.



Optional: Testing the ESP using an RPi

This procedure can use any ESP-Link mode other than wifi-link-12 (that mode uses different GPIO pins for RX/TX).

- Jumper ESP-03 pins
CH_PD 3.3V
GPIO15 1K Pull Down

- Wire ESP to Raspberry Pi
- ESP VCC to Raspberry Pi 5V
- ESP GND to Raspberry Pi GND
- ESP RXD to Raspberry Pi (GPIO14, Pin 8)
- ESP TXD to Raspberry Pi (GPIO15, Pin 10)

View attachment 321626

- Power-up the ESP
- Power-up the Raspberry Pi

- Connect to the ESP network port
- using Putty, Telnet to IP Address:port 23 (eg: 192.168.1.230:23)
- Putty settings:
- Terminal
- disable Implicit CR every LF
- enable Implicit LF every CR
- Local echo = Force On
- Local line editing = Auto

- On Raspberry Pi, connect to serial port
- I use Putty from my Windows system to log into the R'Pi, then run minicom to connect to the serial port
- [email protected] ~ $ minicom -b 115200 -o -D /dev/ttyAMA0

- Now you can type in either terminal session to push data back and forth



Connecting to Arduino UNO (R3)

- Jumper ESP-03 pins
CH_PD 3.3V (hard-wired in schematic)
GPIO15 1K Pull Down (hard-wired in schematic)

- Wire ESP module to Arduino UNO R3 (or BrewPi shield)
- ESP GND to Shield GND
- ESP VCC to Shield VCC (5V)
- ESP RXD to Shield TXD
- ESP TXD to Shield RXD
- GPIO0 to UNO RESET input (Optional: required for uploading new BrewPi firmware only)

- Change BrewPi settings:

NOTE: These edits are only valid for the latest version of the BrewPi host application.
I believe this is now the latest version found in the "legacy" branch.
I had to update from my existing installation which was over a year old.

/home/brewpi/brewpi4/BrewPiUtil.py
- Change
ser = serial.Serial(port, baudrate=baud_rate, timeout=time_out)
To
ser = serial.serial_for_url(port, baudrate=baud_rate, timeout=1)

/home/brewpi/brewpi4/brewpi.py
- Change
inWaiting = ser.inWaiting()
To
inWaiting = ser.readline()

- Change
newData = ser.read(inWaiting)
To
newData = inWaiting


/home/brewpi/brewpi4/settings/config.cfg
- Change
port = /dev/ttyACM0 (typical USB device ID for UNO)
To
port = socket://192.168.1.230:23 (ie: use your locally defined IP address with port 23)


Launch Chrome and load the BrewPi page, open the Log window, enable Auto refresh, then click Start Script.
You should see some lines in the log that look like this:

Nov 30 2015 23:53:03 Opening serial port
Nov 30 2015 23:53:03 Notification: Script started for beer 'RPINTS BrewPi4 Test7'
Nov 30 2015 23:53:13 Checking software version on controller...
Nov 30 2015 23:53:13 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.230:23


Programming Arduino with avrdude

avrdude does not recognize "socket://192.168.1.230:23" for a port definition, so you can't flash the BrewPi hex file directly from within the BrewPi gui.

Instead, open a terminal session and run avrdude manually using the following command format (note that this is a single long-assed command!)

Code:
$ sudo /usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P net:192.168.1.230:23 -U flash:w:"brewpi-arduino-uno-revC-0_2_10.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf
Be sure to use the full path to the hex file!


Cheers!
I found that the line :

/home/brewpi/brewpi4/BrewPiUtil.py
"- Change
ser = serial.Serial(port, baudrate=baud_rate, timeout=time_out)"

was slighlty different and had one extra parameter which I have forgotten, but changed

"To
ser = serial.serial_for_url(port, baudrate=baud_rate, timeout=1, "extra parameter)


also I could not find any of this to change, so did nothing
"
/home/brewpi/brewpi4/brewpi.py
- Change
inWaiting = ser.inWaiting() "


I did change this:

"/home/brewpi/brewpi4/settings/config.cfg
- Change
port = /dev/ttyACM0 (typical USB device ID for UNO)
To
port = socket://192.168.1.230:23 (ie: use your locally defined IP address with port 23)"

I restarted brewpi and got this:
[email protected]:/home/brewpi# sudo -u brewpi python /home/brewpi/brewpi.py
Jan 18 2016 20:01:30 Opening serial port
Jan 18 2016 20:01:30 Notification: Script started for beer 'My First BrewPi Run'
Jan 18 2016 20:01:31 Checking software version on controller...
Jan 18 2016 20:01:31 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://10.1.1.15:23

Jan 18 2016 20:01:37 {"BeerTemp":null,"BeerSet":null,"BeerAnn":null,"FridgeTemp":null,"FridgeSet":null,"FridgeAnn":null,"State":0}
Jan 18 2016 20:01:38 {"BeerTemp":null,"BeerSet":null,"BeerAnn":null,"FridgeTemp":null,"FridgeSet":null,"FridgeAnn":null,"State":0}

and it seems to be working!
 
Last edited by a moderator:

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
View attachment ImageUploadedByHome Brew1453121374.340262.jpg
This is the setup so far. Only the 3m one wire temp probe arrived. I ordered 1x 3m for the fermenter and 5x 1m from different supplier on eBay.

So I can go into the device list and the probe is detected.
View attachment ImageUploadedByHome Brew1453121557.014246.jpg

I can apply "Beer Temp" to it.

If I close maintenance panel and restart the script, no temperature is detected. Is this because brewpi needs 2 sensors detected to work?
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
Did you have any of the same issues I had with invalid commands?
The container exits when run for me built from the dockerfile and I'm not sure why as I've only made one myself, but I installed a jessie vm using your config. I only had to remove servername from the nginx settings, you don't need that in a container as you want it to be portable.

Otherwise when do you see the error & does it work in a vm?

Here's my logs.

Code:
[email protected]:/home/brewpi/logs# tail -f *
==> stderr.txt <==
 Jan 19 2016 08:09:01   Opening serial port
 Jan 19 2016 08:09:01   Notification: Script started for beer 'My First BrewPi Run'
 Jan 19 2016 08:09:11   Checking software version on controller...
 Jan 19 2016 08:09:11   Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://10.69.69.51:23


==> stdout.txt <==
Jan 19 2016 08:09:23  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.18,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:24  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.18,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:25  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.18,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:27  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.18,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:28  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.18,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:29  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.17,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:32  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.17,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:33  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.17,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.50,"State":0}
Jan 19 2016 08:09:35  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.17,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.44,"State":0}
Jan 19 2016 08:09:36  {"BeerTemp": 25.76,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.17,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.44,"State":0}
Jan 19 2016 08:11:38  {"BeerTemp": 25.70,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.12,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 26.69,"State":0}

==> stderr.txt <==
 Jan 19 2016 08:11:55   Installed devices received: [{"a": "28CA0A290700006A", "c": 1, "b": 1, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 26.125}, {"a": "28E7EA290700004C", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 25.75}, {"a": "288AE72907000029", "c": 1, "b": 1, "d": 0, "f": 6, "i": 2, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 26.75}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 3, "h": 1, "p": 5, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 4, "h": 1, "p": 6, "t": 3, "v": 0, "x": 1}]
 Jan 19 2016 08:11:57   Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 2, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 19, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 4, "t": 0, "x": 1}]

==> stdout.txt <==
Jan 19 2016 08:13:40  {"BeerTemp": 25.75,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 26.20,"FridgeSet":null,"FridgeAnn":null,"RoomTemp": 27.06,"State":0}

==> stderr.txt <==
 Jan 19 2016 08:19:17   Device updated to: {"i":0,"t":1,"c":1,"b":1,"f":5,"h":2,"d":0,"p":18,"a":"28CA0A290700006A","j": 0.000}
All my temps are close as the door is open.

d.
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
If I close maintenance panel and restart the script, no temperature is detected. Is this because brewpi needs 2 sensors detected to work?
I don't think so, do you see the temp in the maint panel when you detect devices? Do you see the communication for the device changes you make in the log file?

The last temp sensors I purchased, one of them reports 85c until it's had power for a minute, it's quite odd as none of the others have.

d.
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
I don't think so, do you see the temp in the maint panel when you detect devices? Do you see the communication for the device changes you make in the log file?

The last temp sensors I purchased, one of them reports 85c until it's had power for a minute, it's quite odd as none of the others have.

d.

This is exactly what I see when I change settings.

View attachment ImageUploadedByHome Brew1453157061.691226.jpg

I changed the probe Beer, Chamber, Room, Beer and this is what it is reporting.
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
Ok. I checked the read values box, refreshed and it reports 85 degrees.

I waited a bit now it's 24.9 but not reporting this in the LCD display.
 

day_trippr

A bad time to be an empath.
Joined
May 31, 2011
Messages
32,304
Reaction score
13,201
Location
Stow, MA
View attachment 331019
This is the setup so far. Only the 3m one wire temp probe arrived. I ordered 1x 3m for the fermenter and 5x 1m from different supplier on eBay.

So I can go into the device list and the probe is detected.
View attachment 331020

I can apply "Beer Temp" to it.

If I close maintenance panel and restart the script, no temperature is detected. Is this because brewpi needs 2 sensors detected to work?
I honestly don't know the answer off-hand, but I can imagine without a "chamber" temperature probe BrewPi may simply say "eff it".

If I get a chance tonight I'll see what happens if I disconnect all but the beer probe...

Cheers!

[edit] Meh, I had a spare minute and a free minion as an experimental subject (I asked, it didn't answer ;)).
The answer is: you need at least a Beer and a Chamber sensor for the control functions to work.
Otherwise the AVR goes into an Idle state, tracking temperatures but not doing anything to affect them...
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
Ok all working. When I checked in the terminal it said invalid configuration.

So I just messed around with device slots and function until it worked.

All good.
 

day_trippr

A bad time to be an empath.
Joined
May 31, 2011
Messages
32,304
Reaction score
13,201
Location
Stow, MA
While you won't be able to run a Beer Constant or Beer Profile, if you set your one probe to be the Chamber Temperature probe, I bet you can run in Fridge Constant mode, fwiw...

Cheers!
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
While you won't be able to run a Beer Constant or Beer Profile, if you set your one probe to be the Chamber Temperature probe, I bet you can run in Fridge Constant mode, fwiw...



Cheers!

I have got the probe set as Beer Temp as I want the long probe for that purpose. But I have set it off mode just to log temperatures.

I think I have the hang of assigning the devices now.

I'm glad this wasn't a wifi communication problem. All the config setting has been done over wifi so I am pretty sure all is good with that.
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
And thank you to everyone for all the help and advice in setting this up.

[emoji106][emoji3]
 

day_trippr

A bad time to be an empath.
Joined
May 31, 2011
Messages
32,304
Reaction score
13,201
Location
Stow, MA
When I was thrashing my way through getting wifi running on BrewPi I found a shaky network stack would result in the host BrewPi code "shooting" the AVR by clearing its eeprom. I gotta say by about the 30th time re-entering all the Device configuration settings it almost pissed me off enough to dig into the host-side code to find that function and kill it ;)

So, ime, if you can set your Devices up and they are maintained through a power cycle, you're in good shape...

Cheers!
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
Did you have any of the same issues I had with invalid commands?
I just updated my image to use your one line patch / head of legacy branch and it passes all the basic tests for me too.
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
I had something go wrong and brewpi stop reporting temps and there was a message on the LCD display to reflash the arduino.

I had put everything (UNO, WIFI etc) into a plastic chinese takeaway container to hide coloured wires from little fingers. I think the box must have been moved (by bigger fingers) and it unplugged a wire which could have shorted out. Anyway wires were unplugged when I opened the lid.

I reconnected correctly (AFAIK) and I got the WIFI up and could reset the baud rate etc from the ESP page. I could not start the python script. So I tried to flash over WIFI.

It didn't work and this is the command and message I get when I try to flash.

sudo /usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P net:10.1.1.15:23 -U flash:w:/home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex -C /usr/share/arduino/hardware/tools/avrdude.conf

ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device
avrdude: stk500_recv(): programmer is not responding
ioctl("TIOCMGET"): Inappropriate ioctl for device

avrdude done. Thank you.

I used Xloader on my windoze machine to reflash, and it is up and running. If I am going to get a WIFI signal all the way out to the shed, I am going to need to reflash over WIFI to make it worth my while.

I have tried to re-flash again now I know everything should be working and same result.
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
You need to change the baud rate in the esp web console to 115200 to flash, and have the reset pin wired and confiugred on the esp web page.
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
You need to change the baud rate in the esp web console to 115200 to flash, and have the reset pin wired and confiugred on the esp web page.
I have got reset to GPIO12 and I know it works because I can reset from the esp page.

I'll try again.



Stopped script in the terminal.

Changed baud to 115200 and reset mirocontroller.

used this command in terminal
sudo /usr/share/arduino/hardware/tools/avrdude -F -e -p atmega328p -c arduino -b 115200 -P net:10.1.1.15:23 -U flash:w:/home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex -C /usr/share/arduino/hardware/tools/avrdude.conf

get this message back in terminal.
ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device

avrdude: stk500_recv(): programmer is not responding

hmmm
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
Ok solved it!

I had to change the command, I needed to use m328p

sudo /usr/share/arduino/hardware/tools/avrdude -F -e -p m328p -c arduino -b 115200 -P net:10.1.1.15:23 -U flash:w:/home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex -C /usr/share/arduino/hardware/tools/avrdude.conf
Then I got this.
ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "/home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex"
avrdude: input file /home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex auto detected as Intel Hex
avrdude: writing flash (26896 bytes):

Writing | ################################################## | 100% 12.54s

avrdude: 26896 bytes of flash written
avrdude: verifying flash memory against /home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex:
avrdude: load data flash data from input file /home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex:
avrdude: input file /home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex auto detected as Intel Hex
avrdude: input file /home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex contains 26896 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 10.40s

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

avrdude: safemode: Fuses OK
ioctl("TIOCMGET"): Inappropriate ioctl for device

avrdude done. Thank you.
And changed the baud rate back to 57600 in esp......

restarted python script.

and it works.
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
Since I got my wifi up and running I thought I'd document what worked for me.



I am running Wheezy on an old computer connected to the home network.



I got the pictured Arduino compatible wifi board from ebay.





From the esp-link github page I followed the directions.

https://github.com/jeelabs/esp-link/releases/tag/v2.1.7



I just followed the instructions verbatum to install esptool.py



1)install ez_setup.py





2)install esptool.py



$ git clone https://github.com/themadinventor/esptool.git

$ cd esptool

$ python setup.py install

$ cd ..

$ esptool.py -h




The instructions to flash the esp8266 board are as follows:

$ curl -L https://github.com/jeelabs/esp-link/releases/download/v2.1.7/esp-link-v2.1.7.tgz | \tar xzf -



$ cd esp-link-v2.1.7



$ esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash -fs 32m -ff 80m \0x00000 boot_v1.4\(b1\).bin 0x1000 user1.bin 0x3FE000 blank.bin


Now, I actually had to install "curl" 1st

I used this as a guide

http://www.jasom.net/how-to-install-curl-command-manually-on-debian-linux



$ cd /usr/local/src



$ wget http://curl.haxx.se/download/curl-7.36.0.tar.gz



$tar -xvzf curl-7.36.0.tar.gz

$rm *.gz

$cd curl-7.6.0



$apt-get install build-essential



$ ./configure



$ sudo make

$ sudo make install



$ /etc/init.d/apache2 restart


Then I ran





then plugged in the wifi unit and used



$ esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash -fs 32m -ff 80m \0x00000 boot_v1.4\(b1\).bin 0x1000 user1.bin 0x3FE000 blank.bin


I found the esp-link web interface as oulined earlier.



On the wifi tab I logged I set my ip to fixed and chose 10.1.1.15 to be consistent with the home network addressing and I selected my home network SSID and entered the password.



I then went to the modem/router web interface and made sure I found the esp device and set it as a static IP on the network too.



On the home tab on the esp-link interface

I used the pin assignments

reset - gpio12

conn led - gpio0

serial led - gpio14

UART - normal

rx pull up check-box checked



Then I did:

$ sudo nano /home/brewpi/BrewPiUtil.py
and changed

"ser = serial.Serial(port, baudrate=baud_rate, timeout=time_out, write_timeout=0)"



to

ser = serial.serial_for_url(port, baudrate=baud_rate, timeout=1, write_timeout=0)


and then

$ sudo nano /home/brewpi/settings/config.cfg


and changed

"port = /dev/ttyACM0" (mine was actually port = /dev/ttyUSB0)

to

port = socket://10.1.1.15:23




I then wired the esp board to the arduino and started the python script again.

$ sudo -u brewpi python /home/brewpi/brewpi.py


Wiring from Arduino to esp8266 board.

5V --> VIN

GND --> GND

tx --> rx

rx --> tx

RES --> D12



To be able to flash the Uno with the hex this is the command I used



$ sudo /usr/share/arduino/hardware/tools/avrdude -F -e -p m328p -c arduino -b 115200 -P net:10.1.1.15:23 -U flash:w:/home/brewpi/Downloads/brewpi-arduino-uno-revC-0_2_10.hex -C /usr/share/arduino/hardware/tools/avrdude.conf


note the m328p is slightly different than others used in this thread, but that is what my version of avrdude needed.

espboard.jpg


esp_link.jpg


esp_wierd.jpg
 

day_trippr

A bad time to be an empath.
Joined
May 31, 2011
Messages
32,304
Reaction score
13,201
Location
Stow, MA
Great write-up, thanks for sharing :mug:
What's the price of that wifi shield?

Were your changes to the various BrewPi files consistent with what's been documented here?

Cheers!
 

mattrox

Well-Known Member
Joined
Oct 8, 2015
Messages
284
Reaction score
58
Great write-up, thanks for sharing :mug:
What's the price of that wifi shield?

Were your changes to the various BrewPi files consistent with what's been documented here?

Cheers!


I hit reply too early and have added the changes to the files.

The cost was $15 AUD and I did not have to solder seperate components together and it does the 5V/3.3V thing for you.

easy peezy lemon squeezy!
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
First just a thanks to all here for the info to do this.
Finally got back to having a play with this. Ive got a backup pi2 running my ferment chamber for now so beer production is still underway.:D
I have been running my main multi instance on an old laptop running wheezy.
I managed to build a board to flash the esp01 modules and programmed them with the expressif flash tool for the latest firmware and then with esp-link
They talk to the network so all good
I tried with the mattrox route first but for some reason the curl option was playing up so i went to the daytrippr option and flashed via expressif flash tool through windows.
I changed one of the instances as per daytrippr instructions and bolted the esp module to my homemade shield to a UNO.
Success it all worked.

Now for the ugly bit....the instance drops out with some errors.
I dont have the reliability as yet and have attached my brewpi instance, hoping to get some tips on improving this.
Cheers Gerry
May 24 2016 22:07:01 Opening serial port
May 24 2016 22:07:01 Notification: Script started for beer 'Wifi2'
May 24 2016 22:07:11 Checking software version on controller...
May 24 2016 22:07:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 24 2016 22:07:38 Installed devices received: []
May 24 2016 22:07:41 Available devices received: [{"a": "289E6B5706000052", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 18, "t": 0, "v": 85.0}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 2, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 5, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 6, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 19, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 4, "t": 0, "x": 1}]
May 24 2016 22:08:24 Device updated to: {"i":0,"t":1,"c":1,"b":0,"f":6,"h":2,"d":0,"p":18,"a":"289E6B5706000052","j": 0.000}
May 24 2016 22:08:36 Device updated to: {"i":0,"t":1,"c":1,"b":0,"f":6,"h":2,"d":0,"p":18,"a":"289E6B5706000052","j": 0.000}
May 24 2016 22:10:50 Setting profile 'Sample Profile' as active profile
May 24 2016 22:10:50 Notification: Profile mode enabled
May 24 2016 22:11:00 Setting profile 'Sample Profile' as active profile
May 24 2016 22:11:30 Notification: Temperature control disabled
May 24 2016 22:12:35 Notification: Restarted logging for beer 'wifi3'.
May 24 2016 22:17:01 Opening serial port
May 24 2016 22:17:01 Notification: Script started for beer 'wifi3'
May 24 2016 22:17:11 Checking software version on controller...
May 24 2016 22:17:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

Woo hoo working!


May 24 2016 22:35:34 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 740, in
ser.write("t") # request new from controller
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe

woops
maybe and update to Python??

May 24 2016 22:36:01 Opening serial port
May 24 2016 22:36:01 Notification: Script started for beer 'wifi3'
May 24 2016 22:36:11 Checking software version on controller...
May 24 2016 22:36:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 24 2016 22:56:12 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 730, in
ser.write('l')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 24 2016 22:57:01 Opening serial port
May 24 2016 22:57:01 Notification: Script started for beer 'wifi3'
May 24 2016 22:57:11 Checking software version on controller...
May 24 2016 22:57:12 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 24 2016 23:20:22 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 736, in
ser.write('s')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 24 2016 23:21:01 Opening serial port
May 24 2016 23:21:01 Notification: Script started for beer 'wifi3'
May 24 2016 23:21:11 Checking software version on controller...
May 24 2016 23:21:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 730, in
ser.write('l')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 110] Connection timed out
May 24 2016 23:40:01 Opening serial port
May 24 2016 23:40:01 Notification: Script started for beer 'wifi3'
May 24 2016 23:40:11 Checking software version on controller...
May 24 2016 23:40:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 24 2016 23:59:49 Serial Error: connection failed ([Errno 113] No route to host))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 730, in
ser.write('l')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 25 2016 00:00:01 Opening serial port
May 25 2016 00:00:01 Notification: Script started for beer 'wifi3'
May 25 2016 00:00:11 Checking software version on controller...
May 25 2016 00:00:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 25 2016 00:16:27 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 740, in
ser.write("t") # request new from controller
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 25 2016 00:17:02 Opening serial port
May 25 2016 00:17:02 Notification: Script started for beer 'wifi3'
May 25 2016 00:17:12 Checking software version on controller...
May 25 2016 00:17:12 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 25 2016 00:36:56 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 730, in
ser.write('l')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 25 2016 00:37:01 Opening serial port
May 25 2016 00:37:01 Notification: Script started for beer 'wifi3'
May 25 2016 00:37:11 Checking software version on controller...
May 25 2016 00:37:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 25 2016 00:55:34 Serial Error: connection failed ([Errno 113] No route to host))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 730, in
ser.write('l')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 25 2016 00:56:02 Opening serial port
May 25 2016 00:56:02 Notification: Script started for beer 'wifi3'
May 25 2016 00:56:12 Checking software version on controller...
May 25 2016 00:56:12 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 25 2016 01:11:01 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
May 25 2016 01:12:42 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 736, in
ser.write('s')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 25 2016 01:13:01 Opening serial port
May 25 2016 01:13:01 Notification: Script started for beer 'wifi3'
May 25 2016 01:13:11 Checking software version on controller...
May 25 2016 01:13:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port socket://192.168.1.218:23

May 25 2016 01:29:18 Serial Error: connection failed ([Errno 110] Connection timed out))
Traceback (most recent call last):
File "/home/brewpi/brewpi3/brewpi.py", line 730, in
ser.write('l')
File "/usr/local/lib/python2.7/dist-packages/serial/urlhandler/protocol_socket.py", line 174, in write
raise SerialException("socket connection failed: %s" % e)
serial.serialutil.SerialException: socket connection failed: [Errno 32] Broken pipe
May 25 2016 01:31:01 Opening serial port
May 25 2016 01:31:01 Notification: Script started for beer 'wifi3'
May 25 2016 01:31:11 Checking software version on controller...
May 25 2016 01:31:31 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.
May 25 2016 03:51:01 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit

flash board1.png


flash board2.png


wifi uno shield1.JPG


wifi uno shield2.JPG
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
Looks like you are powering the lm117 on the shield via the 5v pin on the arduino? This won't provide enough current as it's already going through a voltage regulator on the arduino and will cause the wifi to drop out.

I run another cable from the power source to the voltage reg on the shield directly.
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
Thanks dibbz. I'll have a look. I have some direct supply pins on the shield for that purpose. I read somewhere that that vin pin (not the 5 v pin) bypassed the uno regulator that's why I jumpered to it. I'll try it direct.
 

day_trippr

A bad time to be an empath.
Joined
May 31, 2011
Messages
32,304
Reaction score
13,201
Location
Stow, MA
VIN is one diode drop below whatever is plugged into the Uno's barrel connector.
It totally bypasses the 5V linear regulator, so no additional loading on that part.
So, a well regulated 9V wall wart should show ~8.4V on VIN.

It appears the link stays up for around 20 minutes then barfs. Curious.
What version of BrewPi is installed (not the Uno firmware - the rest of the package running on the host)?

Cheers!
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
Ah yes, I'd never used that pin personally but it looks like it should be ok. Do you get any packet loss if you ping it for a few minutes? Other thing you could do is power the esp on your programmer board and ping it for some time to see if the power source makes a difference.

It'll be either power, esp-01 or wifi quality I guess.
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
Thanks for the tips lads. I went back and dug a bit deeper.
Power off vin is fine. So no dramas there.
I then pinged the unit and was getting some losses.
I downloaded and sifted the brewpi log and it is about 20min between each reconnection error.
I then dug through the wheezy install and found a logger so turned it on and it showed a lot of garble about connections and issues.
I then plugged in a lan cable (wifi still in as well). Connection garble on logger cleaned up dramatically and brewpi ticked along fine with no issue.
I turned off the wifi and it didn't work with the lan only.
I turned the wifi and lan on and left it to run.
So it's now working and ran fine today for about. 5 hours until the battery in the laptop died because I forgot to plug it in.
Bit of work to do to get the lan and wireless sorted out yet.
I'm now going to stick the wifi arduino in the shed overnight to test its stability through the steel roller door.
Getting closer[emoji106][emoji481][emoji481]
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
Well I spoke too soon.:confused:
The wifi was flaky and even with the LAN hardwired it didn't last too long before it dropped out. It was really a wifi card problem. I chased down the logs and google and found the issue was the old laptop wifi card in 802.11n doesnt play nice with wheezy and the driver i am using. I disabled n using this link
http://ubuntuforums.org/showthread.php?t=2041403
and now touch wood its up and running.
Ill leave it for a few days on the test bench and see how it goes.
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
Better range than Bluetooth so I'll have a go at the wifi solution for a while. Means I can have just an arduino and esp01 unit for each fridge or fermenter. Actually also like the idea of a wired Pi in the shed running multiple Bluetooth instances. But would mean I'd have to pull a cable.
Here's a shot of a probe in a small keggerator that holds two kegs while gassing up. Change in temp range is with no fan and then with fan on as measured with the wifi brewpi. Thanks again guys for the inspiration and instructions. View attachment ImageUploadedByHome Brew1465097324.866174.jpgView attachment ImageUploadedByHome Brew1465097346.975020.jpg
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
Been working fine so moving on to using it for a brew. I did notice that if I lose power(disconnect) power from the arduino/ wifi and reconnect power, It says script running but nothing's is being logged. If I stop script in gui and restart it starts up again and works fine. Btooth version doesn't have this issue. Btooth will restart automagically when power is reconnected. Any tips here ? Cheers gez
 

dibbz

Active Member
Joined
Aug 26, 2014
Messages
40
Reaction score
7
I don't have any issues after a reconnection. Do you have port and altport both set to the same address in /home/brewpi/settings/config.cfg ?

I lose the device settings after a power outage, spotted this, https://community.brewpi.com/t/devi...ewpi-rev-c-with-bluetooth-but-ok-with-usb/939

I flashed both of mine over wifi but i'll drag the laptop outside and program and reset them via usb to see if it fixes my problem, when one's free.
 

gezzanet

Well-Known Member
Joined
May 21, 2014
Messages
222
Reaction score
28
Location
Newcastle
thanks dibbz. Im interestd as to how it goes.
My setup has the port set to the wifi socket and altport=dev/null.
I loaded my arduino with xloader via usb.

When I plug the power back to the arduino/wifi, the GUI window reports script running but the GUI graph wont update even if i reload the browser window. If i stop and restart the script through the browser the graphs are fine. No biggie just not an auto update like the buetooth. It may well be that i stuffed something else in playing around with the wifi setup.:D
 

joel75

New Member
Joined
Sep 18, 2016
Messages
3
Reaction score
0
hi together,
i had a working brewpi setup with an uno. now i changed it to esp8266. i have the ai-thinker esp8266 and the wemos d1 r2. both are running. the problem is that the d18b20 temperature sensors make some problems.
i can see them in "device configuration" - they also show the temperature there. but i cannot save them there.
stderr shows:
Sep 18 2016 21:16:07 Finding a log message here should not be possible, report to the devs!
Sep 18 2016 21:16:07 Line received was: Dev Address: (P, Target Address: @?p?
Sep 18 2016 21:16:07 Controller debug message: ERROR 7: Invalid config for device owner type 2 beer=0 chamber=1
Sep 18 2016 21:16:07 Device updated to: {"i":1,"t":0,"c":39,"b":0,"f":112,"h":1,"d":32,"p":22,"x":-74}
Sep 18 2016 21:16:07 Controller debug message: ERROR 3: Device defifination update specification is invalid
do you have any idea what i can do here?

thanks
joel
 

joel75

New Member
Joined
Sep 18, 2016
Messages
3
Reaction score
0
any idea?
i have reinstalled the raspberry and the esp8266 - but same problem...
 
2
Top