BrewPi@ESP8266, no need of RPI and Arduino.

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
It's my fault. I will fix it ASAP. Please open Config.h

comment out 224, and uncomment 225, like this

//#define BREWPI_OLED128x64_LCD 1
#define BREWPI_IIC_LCD 1

Thank you very much, will test this :)

EDIT: On Arduino IDE 1.6.9 this solved the problem -when I did a verify :)
Will flash when I get home from work, but should be no problem I think :)

One board completed flash on Arudino IDE 1.6.9 and one board on Arduino IDE 1.8.0 (if anybody need to know)
Look forward to test this, the less HW involved, the better in my opinion. This is realy "less" (y)
 
I am sorry to tell you a bad news.
There is an architectural defect of using IO expander to support rotary encoder.

The facts:
1. I2C on ESP8266 is implemented by software.
2. Interrupt is necessary to support rotary encoder because of the natural of rotary encoder. Using polling is not possible, at least not possible on Arduino nor ESP8266.
3.There is another I2C device, the LCD.

The problem happens when the program is using I2C to update the LCD and the interrupt is triggered and then the Interrupt Service Routine tries to access I2C for rotary encoder status.
The communication to LCD will be disrupted, and after that the status of LCD is non-deterministic.

I can't figure out a solution for this issue., really. The only solutions I have are
1. one wake-up button
This is not really a solution, but it is convenient for waking-up LCD, which is what I need for the input.

2. three buttons instead of rotary-encoder

Please don't plan to use rotary encoder for this project.
 
@pocketmon Is there some way to define the Wifi before uploading the sketch?
I have flashed one card this evening. All went well. The two next ones - It shows up with a rather strange SSID before the 3 minutes is over. Then - it is as if the WIFI shuts-down.

Not possible for me to find any AP. The list of wifi networks does not show any new..
 
Reflash does not seem to fix the problem I have either.

EDIT: This Sketch works ok on both of the boards I`m having a hard time getting to work.

http://www.esp8266learning.com/wemos-webserver-example.php

Here is what the serial monitor reports.

SPIFFS.being() Success*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Already connected. Bailing out.
*WM: IP Address:
*WM: 192.168.8.153
WiFi Done!
please start sntp first !
Thu Jan 12 01:04:35 2017

HTTP Update server started

HTTP server started
BroadCast:D:{"logType":"W","logID":3,"V":[]}
pm open,type:2 0

This is rather strange, Now it shows a IP adress, and it is already connected to my home network SSID with password.
What is going on here?

How could this board connect to my network? Weird...
 
@pocketmon - I realy do not know how - but both of the cards has connected to my wifi network - selected the right SSID and password - and works ok. All that is fine - but how is this possible?
 
@pocketmon - I realy do not know how - but both of the cards has connected to my wifi network - selected the right SSID and password - and works ok. All that is fine - but how is this possible?

I had two issues in development.
1. ESP8266 might not connect to AP after AP mode.
2.ESP8266 sometimes fail to boot on software RESET(WDT reset).

The second issue is strange, but it happens from time to time. Since we don't have access to the booting code. I've surveyed this issue for a while but couldn't find a good answer.

The first issue is the real issue. Sometimes, it succeeds, but there's a period I always had failed result. I don't know why. Maybe it's a timing issue. I've played, tried some tuning, but couldn't find a solution.
I then designed to do a software reset after WiFi network information is "saved". In most case, the system will connect to the "saved" network after RESET.

Conclusion: You were not lucky to have these two issues at the same time. Fortunately, the network setup usually is rarely run. You will be fine after.
 
I had two issues in development.
1. ESP8266 might not connect to AP after AP mode.
2.ESP8266 sometimes fail to boot on software RESET(WDT reset).

The second issue is strange, but it happens from time to time. Since we don't have access to the booting code. I've surveyed this issue for a while but couldn't find a good answer.

The first issue is the real issue. Sometimes, it succeeds, but there's a period I always had failed result. I don't know why. Maybe it's a timing issue. I've played, tried some tuning, but couldn't find a solution.
I then designed to do a software reset after WiFi network information is "saved". In most case, the system will connect to the "saved" network after RESET.

Conclusion: You were not lucky to have these two issues at the same time. Fortunately, the network setup usually is rarely run. You will be fine after.

Both came up - so I`m happy, wiring tonight :) an probably testrun one of the 4 units later in the evening :)
 
Not possible to save the detected devices - known issue? It lists both of my temp probes, the D6 (sensors) D7 (Heating) and D5 (Cooling) also D4 which I do not use at the moment.

Doesnt seem to save at all....

To bad, I`m almoust there....
 
Not possible to save the detected devices - known issue? It lists both of my temp probes, the D6 (sensors) D7 (Heating) and D5 (Cooling) also D4 which I do not use at the moment.

Doesnt seem to save at all....

To bad, I`m almoust there....


I have this issue on my Arduino builds, that's the reason I add a button for EEPROM erase.
 
I have this issue on my Arduino builds, that's the reason I add a button for EEPROM erase.

Good thinking, worked perfect. Have some trouble with relay not kicking in. Have to open the boxes and check mye wiring. Suspect mixup of 3.3 and 5 volt pins.
 
Running for 48 hours on two fridge chambers now. I think it`s quit stable, so I will go on and put beer in the kegerator, build one more, and use it for my two fermenter chambers (y) Great job putting this together :) +1
 
Check this shameless BrewPi knockoff.
Given the fact that NodeMcu has 4MB flash, not to use the space might be a waste.
Although I intended to make it look like BrewPi, the result makes me feel a little embarrassed (yet satisfied) because it look like a cheap knockoff, (yep, it is).
Per my calculation, 3MB file space of 4MB flash will last over half a year before running out. However, I don't have such confidence on the robustness of ESP8266 system.

[Edit] The local logging function is not yet on GitHub. I will push the code after running it for at least one week or two. BTW, I am not fermenting anything but putting a keg in my fermenting fridge, so the chart doesn't look quite right.

@pocketmon - any news on this? would love this feature :)
 
@pocketmon - any news on this? would love this feature :)

I stated the test since 28 Dec, last year.
I found a glitch that prevented display of chart and fixed it on 6th Jan.
The test is ongoing. Although single one test doesn't really mean anything, I want to know how they system performs for a log of at least 2 weeks.
ESP8266 runs at 80Mhz with 96K data ram. There must be some limitation. I would like to know that before we hit it.

(I already push the code to Github but not yet "release" it. You can try if you dare.)

Check current status of my test. I am not fermenting anything, and the two sensors are just placed inside my mini fridge. The "B" annotation means "Beer constant", the "F" means "Fridge constant", and the "R" means the system reset(The time I flashed fixed code.).

bpl.jpg
 
Noob here... what does this offer that a Raspberry Pi 3 + Arduino Uno + 2-relay module dosn't offer?
 
Noob here... what does this offer that a Raspberry Pi 3 + Arduino Uno + 2-relay module dosn't offer?

You can replace the Raspberry Pi 3 & Arduino Uno with this device. It's not technically a full BrewPi implementation (and it requires some cloud support) but it provides most of the same functionality with less hardware.
 
Noob here... what does this offer that a Raspberry Pi 3 + Arduino Uno + 2-relay module dosn't offer?

What does Raspberry Pi 3 offer that a Mac Pro doesn't offer?
The answer is the same:
a few bucks... :mug:

Frankly speaking, you might save less money than a sack of grain but other than cost, SIMPLICITY is the key advantage of this project.

Just setup one ESP8266 by flashing it. No need to connect two devices, and setup RPI by following the long instruction including OS installation, web server setup, python installation(note the version!), script setup, driver installation, and etc.

The smaller footprint of ALL system is also a big plus for me. My project boxes are not large enough, neither do I want to buy another for RPI. If I could buy RPI Zero for $5 a few months ago, there might not be this project.
 
I am sorry to tell you a bad news.
There is an architectural defect of using IO expander to support rotary encoder.

The facts:
1. I2C on ESP8266 is implemented by software.
2. Interrupt is necessary to support rotary encoder because of the natural of rotary encoder. Using polling is not possible, at least not possible on Arduino nor ESP8266.
3.There is another I2C device, the LCD.

The problem happens when the program is using I2C to update the LCD and the interrupt is triggered and then the Interrupt Service Routine tries to access I2C for rotary encoder status.
The communication to LCD will be disrupted, and after that the status of LCD is non-deterministic.

I can't figure out a solution for this issue., really. The only solutions I have are
1. one wake-up button
This is not really a solution, but it is convenient for waking-up LCD, which is what I need for the input.

2. three buttons instead of rotary-encoder

Please don't plan to use rotary encoder for this project.


Hi pocketmon. Great work on this.

I'm a noob in these mcu devices, but do you think you could replace the I2C display with an SPI display with built in touch screen (using the ILI9351 library for display and XP2046 library for touch)?

The touch screen would act as wake up and control. Or does the esp8266 run out of I/O?

Apologies if this has already been discussed.


Dave
 
Hi pocketmon. Great work on this.

I'm a noob in these mcu devices, but do you think you could replace the I2C display with an SPI display with built in touch screen (using the ILI9351 library for display and XP2046 library for touch)?

The touch screen would act as wake up and control. Or does the esp8266 run out of I/O?

Apologies if this has already been discussed.


Dave

Not enough PINs available for SPI.
You usually don't play the controller like playing a phone. Touch screen seems fancy but unnecessary.
 
We can only hope manufacturers upgrade the Wemos further, the original mini came out with 4mb flash the mini pro now has 16mb flash.
 
Just cheking in to let you all know that all three of my fridges is running smoooth as silk. I`m running the latest "if you dare" firmaware. No problem with logging temp @all :) Great Work!
 
This has worked perfectly for me as well. It may be operator error, but I was not able to get it to log to ThingSpeak with the newest version (with local logging). I reflashed to the previous release and the same parameters worked...

Either way, very intuitive and reliable.
 
This has worked perfectly for me as well. It may be operator error, but I was not able to get it to log to ThingSpeak with the newest version (with local logging). I reflashed to the previous release and the same parameters worked...

Either way, very intuitive and reliable.

oops. My bad.
Fixed. Please get the new code.

TL;DR
I don't want to create another page, so I use the same page for local and remote log. The processing of remote log configuration was accidentally broken.

BTW, I don't like the setting of remote logging and want to change it. The input will be a format that looks like format of printf. For example,
Code:
field1=%b&field2=%f&api=whateveritis&whateverwithinlimit
The format:
%b: beer temperature
%B: beer setting
%f: fridge temperature
%F: fridge setting

Will that be better?
 
BTW, I don't like the setting of remote logging and want to change it. The input will be a format that looks like format of printf. For example,
Code:
field1=%b&field2=%f&api=whateveritis&whateverwithinlimit
The format:
%b: beer temperature
%B: beer setting
%f: fridge temperature
%F: fridge setting

Will that be better?

In my opinion: Yes :)
 
That was quick! I'll grab the new code tonight.

TL;DR
I don't want to create another page, so I use the same page for local and remote log. The processing of remote log configuration was accidentally broken.

BTW, I don't like the setting of remote logging and want to change it. The input will be a format that looks like format of printf. For example,
Code:
field1=%b&field2=%f&api=whateveritis&whateverwithinlimit
The format:
%b: beer temperature
%B: beer setting
%f: fridge temperature
%F: fridge setting

Will that be better?

I like that format, very simple. Probably wouldn't hurt if there was a little legend displayed on the page so I wouldn't have to find this thread each time I go in to change it lol.
 
Trying to compile brewpiless....

getting this error.

Arduino: 1.6.11 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 921600, 4M (3M SPIFFS)"

RotaryEncoder.cpp:199: error: 'PCF8574' does not name a type

PCF8574 pcf8574(PCF8574_ADDRESS,PIN_SDA, PIN_SCL);

^

sketch\RotaryEncoder.cpp: In static member function 'static void RotaryEncoder::process()':

RotaryEncoder.cpp:259: error: 'pcf8574' was not declared in this scope

uint8_t p=pcf8574.read8();

^

exit status 1
'PCF8574' does not name a type

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Arduino 1.6.11
 
Trying to compile brewpiless....

getting this error.

Arduino: 1.6.11 (Windows 10), Board: "WeMos D1 R2 & mini, 80 MHz, 921600, 4M (3M SPIFFS)"

RotaryEncoder.cpp:199: error: 'PCF8574' does not name a type

PCF8574 pcf8574(PCF8574_ADDRESS,PIN_SDA, PIN_SCL);

^

sketch\RotaryEncoder.cpp: In static member function 'static void RotaryEncoder::process()':

RotaryEncoder.cpp:259: error: 'pcf8574' was not declared in this scope

uint8_t p=pcf8574.read8();

^

exit status 1
'PCF8574' does not name a type

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Arduino 1.6.11

you can find all the libraries in this pack:
https://dl.dropboxusercontent.com/u/70004161/library.zip
 
I set #define BREWPI_ROTARY_ENCODER in config.h to 0 and it compiled.

You really should disable the rotary encoder if you don't have it. Otherwise, the LCD backlight will be turned off after 3 minutes, and you have no way to turn it on again.
 
it compiled and uploaded (I copied all the libraries into the directory manually) but no SSID shows up when powered up.
 
You really should disable the rotary encoder if you don't have it. Otherwise, the LCD backlight will be turned off after 3 minutes, and you have no way to turn it on again.

I wont have a rotary encoder - the one I installed on my arduino version is barely used. The web front-end is much easier to use and I have a computer nearby.
 
Thats interesting - it connected to my secure wifi by itself...

maybe not so secure methinks....

Did you ever use that specific NodeMcu before?
The WiFi credential is stored in a special area on the flash. It won't be erased after re-flashed, or even format of SPIFFS.
 
Did you ever use that specific NodeMcu before?
The WiFi credential is stored in a special area on the flash. It won't be erased after re-flashed, or even format of SPIFFS.

Ah.... Thats it...

Nice feature!

I should read the datasheet
 
Did you ever use that specific NodeMcu before?
The WiFi credential is stored in a special area on the flash. It won't be erased after re-flashed, or even format of SPIFFS.

It`s not related to this, it happens on new - unused NodeMcu also.
This is what I tried to explain some weeks ago.

I did one flash of my first NodeMcu, the number two and three just connected. So there is something realy strange going on with this.
Those two boards had never been on my wifi before.
 
It`s not related to this, it happens on new - unused NodeMcu also.
This is what I tried to explain some weeks ago.

I did one flash of my first NodeMcu, the number two and three just connected. So there is something realy strange going on with this.
Those two boards had never been on my wifi before.

Well, then something I don't know happened.
As far as I know, ESP8266 will use saved WiFi information to connect on power on. If there is no information there, it should not connect anything.
By no means ESP8266 knows anything about your network.
 
I wont have a rotary encoder - the one I installed on my arduino version is barely used. The web front-end is much easier to use and I have a computer nearby.

When I get time I'm going to look into the details of this project more; I dropped the rotary encoder from my Arduino project due to the complications of debouncing it. I guess I should have wrote some functions to handle interrupts from the rotary encoder input, but it was going to make the sketch a lot bigger, so I went with push buttons. I tried some caps, a quality rotary encoder, and even a schmitt trigger, but still had lots of problems. I think think the software control is where I'm headed eventually anyway since I'm better at web design.
 
When I get time I'm going to look into the details of this project more; I dropped the rotary encoder from my Arduino project due to the complications of debouncing it. I guess I should have wrote some functions to handle interrupts from the rotary encoder input, but it was going to make the sketch a lot bigger, so I went with push buttons. I tried some caps, a quality rotary encoder, and even a schmitt trigger, but still had lots of problems. I think think the software control is where I'm headed eventually anyway since I'm better at web design.

IMO, rotary encoder is hard to handle.
First, it can't be processed in polling mode, unless the system runs nearly nothing.
Second, the debounce capacitors are needed, but even with the debounce capacitors, it doesn't feel like silk smooth.

The solo advantage I know is that only one small opening is needed.

I've supported the rotary encoder by IO expander, but I would rather use the web interface, which is easy and simple.
 

Latest posts

Back
Top