Native ESP8266 BrewPi Firmware - WiFi BrewPi, no Arduino needed!

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.
Just to avoid any hickups in my system, Jessie has been freshly installed now. Fermentrack is on it`s way in.

EDIT:
Oh, crap, I was to fast ....
Sorry, will let system be untouched until we fix it :)
 
Just to avoid any hickups in my system, Jessie has been freshly installed now. Fermentrack is on it`s way in.

EDIT:
Oh, crap, I was to fast ....
Sorry, will let system be untouched until we fix it :)

No worries - I've opened an issue on GitHub to track unicode support until we can get it tested/working. There's no reason in this day & age that Fermentrack needs to be ASCII only! When I'm in front of a device I can test with, I'll go through and see if the fix I just pushed through corrected the issue.
 
First Chamber went well, when adding the second one. I still get this when I try to configure pins.

Unable to reach brewpi-script. Try restarting brewpi-script.
 
No worries - I've opened an issue on GitHub to track unicode support until we can get it tested/working. There's no reason in this day & age that Fermentrack needs to be ASCII only! When I'm in front of a device I can test with, I'll go through and see if the fix I just pushed through corrected the issue.

Upgraded to the latest and renamed one of my chambers to something with norwegian characters.

"ascii' codec can't encode character u'\xe6' in position 2: ordinal not in range(128)"

Same error
 
First Chamber went well, when adding the second one. I still get this when I try to configure pins.

Unable to reach brewpi-script. Try restarting brewpi-script.

Can you send over the last few lines in the "stderr" log for that controller? Curious as to where it's dying.

Upgraded to the latest and renamed one of my chambers to something with norwegian characters.

"ascii' codec can't encode character u'\xe6' in position 2: ordinal not in range(128)"

Same error
Doh. I'll take a look when I'm home and can actually test. Thanks for testing that!
 
Good news, a eeprom reset after last update fixed all issues :) Everything is running ok now.
That sayd, I think it should be noted that the D1 mini - has some "erase" issues, when reflashing.

I think a lot of small issues actually is related to fragmented data when flashing new "firmware" on top of others.
 
A special thanks to #Thorrak - amazing job, and amzing support you offer. Thanks a bunch - yet again :)
 
Upgraded to the latest and renamed one of my chambers to something with norwegian characters.

"ascii' codec can't encode character u'\xe6' in position 2: ordinal not in range(128)"

Same error

This should work now. You can use unicode (including emoji!) in controller names & brewery names. You still cannot use it in beer names - primarily because beer names determine file names, and some file systems might not support unicode.

Blame old technology for not being future proof. :(
 
After a good night of sleep - I woke up to the "Cannot receiveLCD text fromController/Script" from Chamber number two again.
@Thorrak - anything I should send to you? To check out what is going on?
 
After a good night of sleep - I woke up to the "Cannot receiveLCD text fromController/Script" from Chamber number two again.
@Thorrak - anything I should send to you? To check out what is going on?


If you could, the last few lines of the device's "stderr" log, and the last few lines of the brewpi_spawner log.
 
Seems like I can`t find any filenames like that.

I tried to run sudo find -name brewpi_spawner*.* and it only shows a file ending with .py
Can`t find any file named stderr*.*
 
Seems like I can`t find any filenames like that.

I tried to run sudo find -name brewpi_spawner*.* and it only shows a file ending with .py
Can`t find any file named stderr*.*

For the device's stderr log you should be able to click into the device dashboard, then in the device menu at the top choose the last option ("configure device" if I recall correctly). There will be links to two log files there - stderr and stdout.

For the spawner log, the file should be at /home/fermentrack/fermentrack/log/fermentrack-brewpi-spawner.log
 
It`s "Mange Device/View Logs"

This is the last lines. Seems it stoppet logging 22:04:27

""
Apr 18 2017 21:49:51 {"BeerTemp": 2.12,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:50:22 {"BeerTemp": 2.13,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:50:53 {"BeerTemp": 2.15,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.93,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:51:24 {"BeerTemp": 2.16,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:51:54 {"BeerTemp": 2.16,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:52:25 {"BeerTemp": 2.17,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:52:56 {"BeerTemp": 2.18,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:53:27 {"BeerTemp": 2.18,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:53:58 {"BeerTemp": 2.19,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:54:28 {"BeerTemp": 2.19,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:54:59 {"BeerTemp": 2.18,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:55:30 {"BeerTemp": 2.17,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.94,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:56:01 {"BeerTemp": 2.17,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.96,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:56:32 {"BeerTemp": 2.17,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 3.98,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:57:03 {"BeerTemp": 2.17,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:57:33 {"BeerTemp": 2.19,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:58:04 {"BeerTemp": 2.21,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:58:35 {"BeerTemp": 2.24,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:59:06 {"BeerTemp": 2.26,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 21:59:37 {"BeerTemp": 2.27,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:00:08 {"BeerTemp": 2.28,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:00:39 {"BeerTemp": 2.27,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:01:09 {"BeerTemp": 2.26,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:01:40 {"BeerTemp": 2.26,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:02:12 {"BeerTemp": 2.26,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:02:42 {"BeerTemp": 2.27,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:03:13 {"BeerTemp": 2.28,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:03:44 {"BeerTemp": 2.28,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
Apr 18 2017 22:04:27 {"BeerTemp": 2.28,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
""

Spawner log:
""
2017-04-18 15:11:36 [912] | INFO:brewpi-spawner:New BrewPi device found: dev-cokacola
2017-04-18 15:12:52 [912] | INFO:brewpi-spawner:New BrewPi device found: dev-electrolux
2017-04-18 18:45:26 [912] | INFO:brewpi-spawner:Device: dev-electrolux should be stopped, stopping
2017-04-18 18:45:41 [912] | INFO:brewpi-spawner:Device: dev-electrolux should be stopped, stopping
2017-04-18 18:46:12 [912] | INFO:brewpi-spawner:New BrewPi device found: dev-electrolux
2017-04-19 05:35:43 [16022] | INFO:brewpi-spawner:New BrewPi device found: dev-cokacola
2017-04-19 05:35:43 [16022] | INFO:brewpi-spawner:New BrewPi device found: dev-electrolux
""
 
It`s "Mange Device/View Logs"

This is the last lines. Seems it stoppet logging 22:04:27

""
...
Apr 18 2017 22:04:27 {"BeerTemp": 2.28,"BeerSet":null,"BeerAnn":null,"FridgeTemp": 4.00,"FridgeSet": 4.50,"FridgeAnn":null,"State":3}
""

Thanks for posting that - Do you happen to have the stderr log for the device? I think that one may be the stdout log.
 
Actually: A micro bug, the stderr shows the stdout and vica verca.

""
Apr 19 2017 13:55:04 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 13:57:18 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 13:57:24 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 13:57:24 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 13:59:39 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 13:59:44 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 13:59:44 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:01:58 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:02:04 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:02:04 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:04:18 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:04:24 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:04:24 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:06:39 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:06:44 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:06:44 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:08:58 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:09:04 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:09:04 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:11:18 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:11:24 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:11:24 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:13:39 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:13:44 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:13:44 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:15:59 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:16:04 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:16:04 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:18:18 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:18:24 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:18:24 Connecting to BrewPi esp1659303.local on port 23
Apr 19 2017 14:20:38 Unable to connect to BrewPi esp1659303.local on port 23. Exiting.
Apr 19 2017 14:20:44 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 14:20:44 Connecting to BrewPi esp1659303.local on port 23
""
 
I think the problem is kind of strange. From the raspberry pi I can ping the ip address, but not the mDNS name.
On the other fridge, there is no such problem. mDNS works just fine when I ping.
 
Got it up and running again.
Here is a fresh stderr.log

""
Apr 19 2017 17:41:40 Available devices received: []
Apr 19 2017 19:02:18 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 19:02:18 Connecting to BrewPi 192.168.8.167 on port 23
Apr 19 2017 19:02:26 Successfully connected to controller.
Apr 19 2017 19:02:26 Notification: Script started for beer 'Lagring'
Apr 19 2017 19:02:36 Checking software version on controller...
Apr 19 2017 19:02:36 Found BrewPi v0.2.4, running commit 00000000, running on an ESP 8266 on port 192.168.8.167:23

Apr 19 2017 19:02:36 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Apr 19 2017 19:02:36 Bound to TCP socket on port 2539, interface localhost
Apr 19 2017 19:02:37 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.063}, {"a": "28FF176B5516038B", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 4.938}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 2, "h": 1, "p": 16, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 14, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 1, "i": 4, "h": 1, "p": 13, "t": 2, "v": 0, "x": 1}]
Apr 19 2017 19:02:38 Available devices received: []
Apr 19 2017 19:04:08 Error: controller is not responding to new data requests. Exiting.
Apr 19 2017 19:04:12 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 19:04:12 Connecting to BrewPi 192.168.8.167 on port 23
Apr 19 2017 19:06:27 Unable to connect to BrewPi 192.168.8.167 on port 23. Exiting.
Apr 19 2017 19:06:32 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 19:06:32 Connecting to BrewPi 192.168.8.167 on port 23
Apr 19 2017 19:08:47 Unable to connect to BrewPi 192.168.8.167 on port 23. Exiting.
Apr 19 2017 19:08:52 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 19:08:52 Connecting to BrewPi 192.168.8.167 on port 23
""

Think this is more usefull. @Thorrak
 
It went down after only a few minutes

This is the same - from the fridge who runs - ok

<type 'exceptions.TypeError'>: 'NoneType' object is not callable
Apr 19 2017 16:44:56 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 16:44:56 Connecting to BrewPi esp9591654.local on port 23
Apr 19 2017 16:45:13 Successfully connected to controller.
Apr 19 2017 16:45:13 Notification: Script started for beer 'TicTac APA'
Apr 19 2017 16:45:23 Checking software version on controller...
Apr 19 2017 19:02:06 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 19 2017 19:02:06 Connecting to BrewPi 192.168.8.119 on port 23
Apr 19 2017 19:02:13 Successfully connected to controller.
Apr 19 2017 19:02:13 Notification: Script started for beer 'TicTac APA'
Apr 19 2017 19:02:23 Checking software version on controller...
Apr 19 2017 19:02:24 Found BrewPi v0.2.4, running commit 00000000, running on an ESP 8266 on port 192.168.8.119:23

Apr 19 2017 19:02:24 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Apr 19 2017 19:02:24 Bound to TCP socket on port 2712, interface localhost
Apr 19 2017 19:02:25 Installed devices received: [{"a": "28FF04C258160410", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 16.188}, {"a": "28FFE2145816045E", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 18.5}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 2, "h": 1, "p": 16, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 14, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 1, "i": 4, "h": 1, "p": 13, "t": 2, "v": 0, "x": 1}]
Apr 19 2017 19:02:25 Available devices received: []
Apr 19 2017 19:02:25 Controller debug message: INFO MESSAGE 12: Received new setting: tempFormat = C
Apr 19 2017 19:02:26 Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMax = 35.0
Apr 19 2017 19:02:26 Controller debug message: INFO MESSAGE 12: Received new setting: tempSetMin = -8.0
 
It went down after only a few minutes
...

Mine is also not working again :(

I can ping the ESP from the pi using both the name and the IP address. I do feel my fridge is a little far from my router so the wifi could have dropped at some stage, resulting in this locked up state

more logs: http://filebin.net/fermentrack/amadio20apr-fermentrack_logs.tgz

I have two hypotheses for what may be causing these issues:

1. The controller is losing connection to the router, and for some reason isn't reconnecting. The WiFi connection code is only explicitly called during the initial boot sequence and while there should be a reconnection watchdog, it may not be functioning correctly.

2. For some reason, the controller thinks that brewpi-script is connected to it when - in fact - it isn't. Since the controller will only "talk" with the first device that connects to it, this results in it being "silent" and not sending the version/LCD info.


I have fixes for the first potential issue in brewpi-esp8266.v0.81-test.wifi.bin and fixes for both the first and second issue in brewpi-esp8266.v0.81-test2.wifi.bin on GitHub. I'd say start with test2 - If that works, I'll delete the other one and make that v0.81.

The way that issue #2 is fixed is by making it so that whenever something connects to the controller, it drops all previous connections. This means that if you have two instances of brewpi-script (or a manual telnet connection) attempting to connect to a controller at once, it will appear to constantly drop connection. Something to keep in mind!
 
I have two hypotheses for what may be causing these issues:

1. The controller is losing connection to the router, and for some reason isn't reconnecting. The WiFi connection code is only explicitly called during the initial boot sequence and while there should be a reconnection watchdog, it may not be functioning correctly.

2. For some reason, the controller thinks that brewpi-script is connected to it when - in fact - it isn't. Since the controller will only "talk" with the first device that connects to it, this results in it being "silent" and not sending the version/LCD info.


I have fixes for the first potential issue in brewpi-esp8266.v0.81-test.wifi.bin and fixes for both the first and second issue in brewpi-esp8266.v0.81-test2.wifi.bin on GitHub. I'd say start with test2 - If that works, I'll delete the other one and make that v0.81.

The way that issue #2 is fixed is by making it so that whenever something connects to the controller, it drops all previous connections. This means that if you have two instances of brewpi-script (or a manual telnet connection) attempting to connect to a controller at once, it will appear to constantly drop connection. Something to keep in mind!

I think you are on to something in #2 - Since I`m able to ping the IP address, it`s on the Wifi. It`s more than possible it has some dropouts, but so does chamber number 1 (control bozes sits side by side)

Any advice for cleaning the Flash 100% before flashing?
 
I tested the serial firmware last night and everything is fine except the ESP broadcast as an open AP the whole time.

Thorrak, I did a few searches for turning the ESP radio off and there are various solutions, mainly for saving power when using batteries. Do you think something needs to be included in the serial firmware to keep the radio off? Although you did say that the ESP should't even know it has a radio as the code is not present in the firmware.

I'm confident I've done a complete wipe of all previous firmware on the ESP as it does not now remember my WiFi credentials. Also, when I connect to the ESP AP and access IP 192.168.4.2 the page is blank. It would be nice to turn off the ESP AP to prevent anyone trying to mess with it.

Thanks
 
There IS something strange going on with those D1 boards. I have posted this erlier, but - if I reset my cards (all 5 of them) Flash number one - connects to it, then configure it for my WIFI, the next cards - connects to the WIFI by it selves. This is absolutly insane.

Nothing is stored in either Arduino IDE - if I go that route, and nothing is stored in the bin file - if I choose that route.
Still - this does happen.

So there is something strange. An ID - which is not known? I do not know, but the cards connects to my WIFI net.
(it`s like, oh, there you are, here is the credentials)

But- Tonight, I`m going to reset the "gpio way" - There is apparently a true reset if we do the following: On the Wemos D1 Mini to reset; connect D3 to GND for 5 seconds.

Anyone tried it?
 
I look forward to see if all cards starts as normal after erase and reflash tonight.
 
There IS something strange going on with those D1 boards. I have posted this erlier, but - if I reset my cards (all 5 of them) Flash number one - connects to it, then configure it for my WIFI, the next cards - connects to the WIFI by it selves. This is absolutly insane.

Nothing is stored in either Arduino IDE - if I go that route, and nothing is stored in the bin file - if I choose that route.

I tested the serial firmware last night and everything is fine except the ESP broadcast as an open AP the whole time.

Thorrak, I did a few searches for turning the ESP radio off and there are various solutions, mainly for saving power when using batteries. Do you think something needs to be included in the serial firmware to keep the radio off? Although you did say that the ESP should't even know it has a radio as the code is not present in the firmware.

I'm confident I've done a complete wipe of all previous firmware on the ESP as it does not now remember my WiFi credentials. Also, when I connect to the ESP AP and access IP 192.168.4.2 the page is blank. It would be nice to turn off the ESP AP to prevent anyone trying to mess with it.


So in diagnosing the issue last night I went through the code associated with the WiFi AP generation, and I have a hypothesis -- for both why this is happening, and why I haven't yet seen the same exact issue on my side.

There's a "protected" part of the flash memory that stores Wifi credentials which isn't cleared automatically when the ESP is flashed. What I think is happening is that it stores both the WiFi network info (SSID and password) -- as well as the connection type (access point vs. connected to an actual network). That is, if you flash the WiFi firmware, let it boot, and flash the serial firmware before you connect to a network, it will save the configuration of being an access point.

Where I think I went wrong was assuming the WiFi libraries were where the WiFi connection code lived. Apparently, it's in the boot loader which we don't overwrite. Since we don't overwrite the boot loader, and we don't overwrite the WiFi connection settings, we end up seeing what you and @stbernts are describing -- "ghost" access points, or pingable, inactive controllers.

The solution is simple at least - I'll add the WiFi libraries to the Serial firmware, and just explicitly disable everything (and delete any saved credentials for good measure). Should be a relatively quick fix - I'll attempt to get it in tonight.

I think you are on to something in #2 - Since I`m able to ping the IP address, it`s on the Wifi. It`s more than possible it has some dropouts, but so does chamber number 1 (control bozes sits side by side)

Any advice for cleaning the Flash 100% before flashing?

I don't know if you can explicitly overwrite the area of memory where the WiFi credentials are saved unfortunately from esptool. The reset firmware does it (as well as testing a few other issues). If you want, flash the reset firmware, hit the reset button, wait a minute or two, and then flash the WiFi firmware. That should get you as close to a "factory" reset as you can get.
 
Ok. I`l try to flash with the brewpi-esp8266.v0.81-test2.wifi.bin and cross my fingers :)
 
Update:
Did a reset of the D1 mini by following this page.
(http://www.pratikpanda.com/completely-format-erase-esp8266-flash-memory/)

Flashed both of my D1 mini with the new Firmware:
(brewpi-esp8266.v0.81-test2.wifi.bin)

Both card came up in AP mode (card two, who has been the good one, had to be flashed two times)

First card managed to connect to Wifi. Tried to configure sensor etc. Not able to save. Did a reset eprom - all went well.

Second card - connect to Wifi was ok. Went straight to eprom reset. The rest worked like a sharm.

So far - both Fermentors are up and running (longest success so far) But, the troubled one - is not connected to fridge/heater @ the moment. But it has dropped out whitout anything hooked up to the Sainsmart several times.

I`m crossing all my fingers this time - and I hope @Thorrak has solved the problem. Mostly for his sake - not for mine. I can live with bugs, it`s free, it`s nice and in a category where nobody should "whine".

Thanks again Thorrak, you are truly a devoted and service minded person :)

+1
 
I started with a huzzah feather at first but I couldn't get it's wifi setup, so I bought the recommended board and after three restarts it seems to be running fine other than this interface issue and the entry value units seems stuck on °C which is not a big deal.

The interface won't update a new brew. Any words of advice? If not I will reformat and start from scratch. .
 
I started with a huzzah feather at first but I couldn't get it's wifi setup, so I bought the recommended board and after three restarts it seems to be running fine other than this interface issue and the entry value units seems stuck on °C which is not a big deal.

The interface won't update a new brew. Any words of advice? If not I will reformat and start from scratch. .

Hey there. The interface shouldn't be stuck on °C. If you're using Fermentrack, go to the device dashboard, in the device menu choose "Manage Device/View Logs", and change the temperature format to whatever you want it to be (see: fahrenheit).

One day someone should add Rankine/Kelvin for variety, but today is not that day.

If you're using brewpi-www, the setting should be in the usual place (under one of the advanced configuration menus near the bottom) but I don't recall where, offhand. If you can't find it, post back here and I'll pop my brewpi-www SD card back in and see if I can find it.


As far as the interface issue, what do you mean that it won't update a new brew? Are you using Fermentrack or brewpi-www?
 
Hey there. The interface shouldn't be stuck on °C. If you're using Fermentrack, go to the device dashboard, in the device menu choose "Manage Device/View Logs", and change the temperature format to whatever you want it to be (see: fahrenheit).

One day someone should add Rankine/Kelvin for variety, but today is not that day.

If you're using brewpi-www, the setting should be in the usual place (under one of the advanced configuration menus near the bottom) but I don't recall where, offhand. If you can't find it, post back here and I'll pop my brewpi-www SD card back in and see if I can find it.


As far as the interface issue, what do you mean that it won't update a new brew? Are you using Fermentrack or brewpi-www?

I'm running brewpi-www. It's running sample data. When I go to change it, it say I have done so successfully, but it doesn't change.

I'm just learning of fermentrack. I may start over with that.

The temp reads in F if if I choose it, but the spot to change the beer constant stays in C.
 
@Thorrak

Here is the stderr log from the first esp8266 - I just remembered this might be something you would like to take a look at.
Might tell you something usefull - why eprom reset is needed - I`m not sure.

Apr 20 2017 21:27:52 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 20 2017 21:27:52 Connecting to BrewPi esp1659303.local on port 23
Apr 20 2017 21:27:59 Successfully connected to controller.
Apr 20 2017 21:27:59 Notification: Script started for beer ''
Apr 20 2017 21:28:09 Checking software version on controller...
Apr 20 2017 21:28:09 Found BrewPi v0.2.4, running commit 00000000, running on an ESP 8266 on port esp1659303.local:23

Apr 20 2017 21:28:09 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Apr 20 2017 21:28:09 Bound to TCP socket on port 2739, interface localhost
Apr 20 2017 21:28:10 Installed devices received: []
Apr 20 2017 21:28:12 Available devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 5.625}, {"a": "28FF176B5516038B", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 6.563}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 16, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:28:42 Device updated to: {"i":0,"t":0,"c":39,"b":0,"f":-120,"h":1,"d":33,"p":-86,"x":41}
Apr 20 2017 21:28:42 Controller debug message: ERROR 7: Invalid config for device owner type 2 beer=0 chamber=1
Apr 20 2017 21:28:42 Installed devices received: []
Apr 20 2017 21:28:42 Controller debug message: ERROR 3: Device defifination update specification is invalid
Apr 20 2017 21:28:42 Available devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 5.625}, {"a": "28FF176B5516038B", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 6.563}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 16, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:29:04 Resetting controller to factory defaults
Apr 20 2017 21:29:09 Controller debug message: INFO MESSAGE 15: EEPROM initialized
Apr 20 2017 21:29:09 Installed devices received: []
Apr 20 2017 21:29:10 Available devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 5.625}, {"a": "28FF176B5516038B", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 6.563}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 16, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:29:48 Device updated to: {"i":0,"t":1,"c":1,"b":0,"f":5,"h":2,"d":0,"p":12,"a":"28FF809C57160456","j": 0.000}
Apr 20 2017 21:29:48 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.625}]
Apr 20 2017 21:29:48 Available devices received: [{"a": "28FF176B5516038B", "c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 2, "j": 0.0, "p": 12, "t": 0, "v": 6.563}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 16, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:30:08 Device updated to: {"i":1,"t":1,"c":1,"b":1,"f":9,"h":2,"d":0,"p":12,"a":"28FF176B5516038B","j": 0.000}
Apr 20 2017 21:30:08 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.688}, {"a": "28FF176B5516038B", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 6.563}]
Apr 20 2017 21:30:08 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 16, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:30:20 Device updated to: {"i":2,"t":3,"c":1,"b":0,"f":2,"h":1,"d":0,"p":16,"x":1}
Apr 20 2017 21:30:20 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.688}, {"a": "28FF176B5516038B", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 6.563}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 2, "h": 1, "p": 16, "t": 3, "v": 0, "x": 1}]
Apr 20 2017 21:30:20 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 14, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:30:35 Device updated to: {"i":3,"t":3,"c":1,"b":0,"f":3,"h":1,"d":0,"p":14,"x":1}
Apr 20 2017 21:30:35 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.688}, {"a": "28FF176B5516038B", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 6.563}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 2, "h": 1, "p": 16, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 14, "t": 3, "v": 0, "x": 1}]
Apr 20 2017 21:30:35 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 13, "t": 0, "x": 1}]
Apr 20 2017 21:30:51 Device updated to: {"i":4,"t":2,"c":1,"b":0,"f":1,"h":1,"d":0,"p":13,"x":1}
Apr 20 2017 21:30:51 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.688}, {"a": "28FF176B5516038B", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 6.625}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 2, "h": 1, "p": 16, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 14, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 1, "i": 4, "h": 1, "p": 13, "t": 2, "v": 0, "x": 1}]
Apr 20 2017 21:30:51 Available devices received: []
Apr 20 2017 21:31:05 Notification: Restarted logging for beer 'Lagring'.
Apr 20 2017 21:31:32 Notification: Fridge temperature set to 4.5 degrees in web interface
Apr 20 2017 21:31:32 Controller debug message: INFO MESSAGE 12: Received new setting: mode = f
Apr 20 2017 21:31:32 Controller debug message: INFO MESSAGE 12: Received new setting: fridgeSet = 4.5
Apr 20 2017 21:33:34 Error: controller is not responding to new data requests. Exiting.
Apr 20 2017 21:33:39 Connection type WiFi selected. Trying TCP serial (WiFi)
Apr 20 2017 21:33:39 Connecting to BrewPi esp1659303.local on port 23
Apr 20 2017 21:33:46 Successfully connected to controller.
Apr 20 2017 21:33:46 Notification: Script started for beer 'Lagring'
Apr 20 2017 21:33:56 Checking software version on controller...
Apr 20 2017 21:33:57 Found BrewPi v0.2.4, running commit 00000000, running on an ESP 8266 on port esp1659303.local:23

Apr 20 2017 21:33:57 BrewPi version received was 0.2.4 which this script supports in 'legacy' branch mode.
Apr 20 2017 21:33:57 Bound to TCP socket on port 2739, interface localhost
Apr 20 2017 21:33:59 Installed devices received: [{"a": "28FF809C57160456", "c": 1, "b": 0, "d": 0, "f": 5, "i": 0, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 5.75}, {"a": "28FF176B5516038B", "c": 1, "b": 1, "d": 0, "f": 9, "i": 1, "h": 2, "j": 0.0, "p": 12, "t": 1, "v": 6.625}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 2, "h": 1, "p": 16, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 14, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 1, "i": 4, "h": 1, "p": 13, "t": 2, "v": 0, "x": 1}]
Apr 20 2017 21:33:59 Available devices received: []
Apr 20 2017 22:03:06 Controller debug message: INFO MESSAGE 18: Negative peak detected: 6.1, estimated: 4.5. Previous cool estimator: 5.000, New cool estimator: 3.906.
 
I'm running brewpi-www. It's running sample data. When I go to change it, it say I have done so successfully, but it doesn't change.

I'm just learning of fermentrack. I may start over with that.

The temp reads in F if if I choose it, but the spot to change the beer constant stays in C.

Ahh, that makes sense. Everything should work - I'll have to take a look at the beer logging point to see if I missed something when backporting the BrewPi-script changes.

As far as the beer constant temperature units not changing - there is a known bug where it doesn't change until you refresh the page. Is it staying set as the wrong units when you refresh, or does it update? If it doesn't update on refresh, let me know - that is (again) me potentially missing one of the BrewPi-www compatibility options when doing the back port from Fermentrack.
 
I tested the serial firmware last night and everything is fine except the ESP broadcast as an open AP the whole time.

The fix for this should be incorporated in v0.9 of the firmware, now posted on GitHub. The differences between v0.8 and v0.9 of both the WiFi and Serial firmwares are as follows:


v0.9 WiFi Differences:
  • Added explicit "disconnect" check for spotty WiFi connections
  • The controller now disconnects existing clients when a new connection is received (rather than disconnecting the new client)
  • Note - this is the same as the "test2" firmware (but has a higher version number)


v0.9 Serial Differences:
  • WiFi libraries are now included with the Serial firmware
  • WiFi is explicitly turned "off" during boot

As always, let me know if you run into any problems!
 
Fermentrack v0.1

We are proud to announce the soft release of Fermentrack - a fermentation temperature controller web interface. Fermentrack is a replacement web interface for BrewPi and enables the control of one or multiple BrewPi fermentation temperature controllers from a single web portal.

Key Features:
Simultaneous support of multiple controllers (“Multi-Chamber” support)
Native WiFi connection support
Streamlined device configuration workflow
Simplified installation process


Release Notes:
This soft release currently exclusively supports ESP8266-based controllers connected via WiFi. Support for serial controllers is forthcoming, with support for Arduino controllers soon behind. While there will be periodic, tagged numbered releases there is no specific release schedule and new features will be added continuously. As new features are added to the repo Fermentrack will periodically prompt to upgrade.

Fermentrack relies upon Nginx for managing connections to the web app and is currently intended to be installed on a freshly configured Raspbian install.


Installation:

Fermentrack can be installed via a quick, web-based installation script. To install, simply type:

Code:
curl -L install.fermentrack.com | sudo bash

into the terminal when connected to your Raspberry Pi.

For additional information on the installation process, review the installation script contained within the fermentrack-tools repo.

Documentation:

Written documentation is available at: https://thorrak.github.io/fermentrack/

Additionally, the installation/usage of Fermentrack is documented via a series of videos on YouTube:
Step 1. Installing Fermentrack - YouTube
Step 2. Configuring Fermentrack - YouTube
Step 3. Configuring a Controller - YouTube
Step 4. Creating a Fermentation Profile - YouTube

Licensing
Fermentrack is licensed under the MIT license.


Contributing
Interested in helping develop Fermentrack, write/update/fix documentation, or reporting bugs? Awesome! Bugs & issues can be easily reported on GitHub via the issue tracker. Pull requests are always welcome.

One area in which help is especially welcome is with the user interface - While the user interface isn’t bad, it certainly could use some improvements. If you have ideas (or can help with recreating it) please let us know!


Key Thanks
I am immensely thankful for the contributions of @rocket4x4 who has been a key contributor/collaborator in this project. Additional thanks go to Elco & the BrewPi team for designing the original web interface as well as the BrewPi controller. Separately, thanks goes to all the participants in this thread for providing feedback and ideas as Fermentrack was being developed.

followed these and i have it up and running. now to order another esp8266 or 2.

thank you!
 
Back
Top