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.
I also have issues with install both brewpi-esp8266 scrips and fermentrack on stretch. I get error with php on the scripts, and undescribed error with fermentrack. Both on stretch lite.
 
I also have issues with install both brewpi-esp8266 scrips and fermentrack on stretch. I get error with php on the scripts, and undescribed error with fermentrack. Both on stretch lite.

Got it running again, but now I cannot log in. Upon log in I get "Operational Error..... -
attempt to write a readonly database". This is on raspberry pi 3 with stretch. Any ideas? I have granted user access, so that should not be the issue.
 
Now I can not setup devices... From the log it states that when I attempt to add beer sensor:
Mar 19 2018 21:29:00 Received applyDevice request, updating to: {"c": 1, "f": 5, "h": 2, "j": 0.0, "a": "28FF96B881160383", "p": 12, "b": 0, "i": 0}
Mar 19 2018 21:29:05 Device updated to: {"i":0,"t":0,"c":-128,"b":-30,"f":-80,"h":64,"d":-2,"p":44}
Mar 19 2018 21:29:05 Controller debug message: ERROR 7: Invalid config for device owner type 2 beer=0 chamber=1
Mar 19 2018 21:29:05 Installed devices received: []
Mar 19 2018 21:29:05 Controller debug message: ERROR 3: Device definition update specification is invalid
Mar 19 2018 21:29:05 Available devices received: [{"f": 0, "c": 1, "j": 0.0, "b": 0, "v": 21.938, "a": "28FF96B881160383", "d": 0, "i": -1, "h": 2, "t": 0, "p": 12}, {"f": 0, "c": 1, "j": 0.0, "b": 0, "v": 22.0, "a": "28FFA75B8216046C", "d": 0, "i": -1, "h": 2, "t": 0, "p": 12}, {"f": 0, "c": 1, "x": 1, "b": 0, "d": 0, "i": -1, "h": 1, "t": 0, "p": 16}, {"f": 0, "c": 1, "x": 1, "b": 0, "d": 0, "i": -1, "h": 1, "t": 0, "p": 14}, {"f": 0, "c": 1, "x": 1, "b": 0, "d": 0, "i": -1, "h": 1, "t": 0, "p": 13}]
 
I keep getting error messages when trying to flash new firmware and access parts of the django site admin. I’m on stretch and raspberry zero.
 
the upgrade script.

Got it. I know the bug and pushed a fix for it last night - but thinking about it now, I think it’s possible the fix I pushed live would only work for people who make the upgrade in the future. New installs are unaffected. Let me see if I can pull together a fix from my phone and push it out - otherwise I may have to fix it this evening.
 
Now I can not setup devices... From the log it states that when I attempt to add beer sensor:
Mar 19 2018 21:29:00 Received applyDevice request, updating to: {"c": 1, "f": 5, "h": 2, "j": 0.0, "a": "28FF96B881160383", "p": 12, "b": 0, "i": 0}
Mar 19 2018 21:29:05 Device updated to: {"i":0,"t":0,"c":-128,"b":-30,"f":-80,"h":64,"d":-2,"p":44}
Mar 19 2018 21:29:05 Controller debug message: ERROR 7: Invalid config for device owner type 2 beer=0 chamber=1
Mar 19 2018 21:29:05 Installed devices received: []
Mar 19 2018 21:29:05 Controller debug message: ERROR 3: Device definition update specification is invalid
Mar 19 2018 21:29:05 Available devices received: [{"f": 0, "c": 1, "j": 0.0, "b": 0, "v": 21.938, "a": "28FF96B881160383", "d": 0, "i": -1, "h": 2, "t": 0, "p": 12}, {"f": 0, "c": 1, "j": 0.0, "b": 0, "v": 22.0, "a": "28FFA75B8216046C", "d": 0, "i": -1, "h": 2, "t": 0, "p": 12}, {"f": 0, "c": 1, "x": 1, "b": 0, "d": 0, "i": -1, "h": 1, "t": 0, "p": 16}, {"f": 0, "c": 1, "x": 1, "b": 0, "d": 0, "i": -1, "h": 1, "t": 0, "p": 14}, {"f": 0, "c": 1, "x": 1, "b": 0, "d": 0, "i": -1, "h": 1, "t": 0, "p": 13}]

@Thorrak - I´m still not able to set any devices. I have tried every solution I have found, but no success. Any ideas?
 
What device type are you using (ESP8266 or Arduino) and how is it connected (WiFi or Serial)?

Are you running under Python 2 or 3?

Are you using BrewPi-www or Fermentrack?

I'm having the same issue as @riisefrutti
Running ESP8266 with latest WiFi firmware and a fresh python 3 install of Fermentrack
 
What device type are you using (ESP8266 or Arduino) and how is it connected (WiFi or Serial)?

Are you running under Python 2 or 3?

Are you using BrewPi-www or Fermentrack?

@Thorrak I’m using esp8266, nodemcu, connected with WiFi.

Running python 3.

I’m using fermentrack.

Thank you!
 
@Thorrak I found the issue. Due to the esp8266 "riding" old settings it did not connect properly. Brewpiless was running behind it all and owned the wifisettings. I reloaded brewpiless FW then did eeprom clear, when I loaded FW for brewpi it got solved.

When having these issues make sure arduino sw deletes all eeprom settings, not only the sketch. This must have been my main issue.
 
I noticed something similar too, that after i did a fresh install of both Stretch, Fermentrack and a fresh flash of my ESP8266 (from serial to wifi and then back to serial again) i found that, when i set up my device it remembered all of my old probes, heater, coller etc, so i think the ESP must somehow retain old settings even when it's flashed?
 
Now that is out of the way I have to have a go at adding the OLEDs. Would including the display.h in the bin and adding support for the sdd1306
 
I noticed something similar too, that after i did a fresh install of both Stretch, Fermentrack and a fresh flash of my ESP8266 (from serial to wifi and then back to serial again) i found that, when i set up my device it remembered all of my old probes, heater, coller etc, so i think the ESP must somehow retain old settings even when it's flashed?

I guess so. I found that arduino has a setting that lets you choose delete eeprom sketch - sketch and wifi or all data. Mine was set to sketch by default.
 
I had a working version of Fermentrack running on a Pi Zero W (Arduino, wifi, Jessie) and ran the upgrade. I then ran the Python 3 upgrade and now I get a 502 error. I've tried reinstalling and get this error:

Starting Fermentrack supervisor: circusd: /home/fermentrack/fermentrack/utils/updateCronCircus.sh: line 37: /home/fermentrack/venv/bin/circusd: No such file or directory
failed, please see logfile.

This seems reminiscent of the circus errors I had when I first tried to install on Stretch a few months ago. Was that ever cleared up? Any suggestions for getting it running again?
 
Do you have an LCD hooked up? If so, try flashing the "WiFi Reset" firmware. It does a test of your DS18B20 sensors and will let you know if they might happen to be in parasitic mode (which could cause that)

Separately, with the RJ-11 breakout board - which version of the board do you have? Is it v1.1 (the one linked here)? Check the pinout text on the back of the board, and compare it to see. There was an earlier version (v1.0) which requires a different type of RJ-11 cable than most people have.
Now that flashing the the "Wifi Reset" isn't a problem anymore, I tried it but my DS18B20 isn't found. Any tips on were to start? I'm pretty sure the breakout board is v1.1...

Update: one of my cables work when I connect them directly to the ESP8266 but not through the breakout board. The RJ11 cable is completely new so I don't think that is the problem. Bad soldering?
 
Last edited:
I noticed something similar too, that after i did a fresh install of both Stretch, Fermentrack and a fresh flash of my ESP8266 (from serial to wifi and then back to serial again) i found that, when i set up my device it remembered all of my old probes, heater, coller etc, so i think the ESP must somehow retain old settings even when it's flashed?

Yeah - the "eeprom" doesn't get cleared when you flash a new firmware. It's nice when, say, upgrading between versions of the BrewPi firmware, but it sucks for new installations where the "eeprom" space may contain data that isn't consistent with what you would expect for BrewPi.

The "wifi reset" sketch also happens to delete/reinitialize the eeprom which makes things a bit easier.

I had a working version of Fermentrack running on a Pi Zero W (Arduino, wifi, Jessie) and ran the upgrade. I then ran the Python 3 upgrade and now I get a 502 error. I've tried reinstalling and get this error:

Starting Fermentrack supervisor: circusd: /home/fermentrack/fermentrack/utils/updateCronCircus.sh: line 37: /home/fermentrack/venv/bin/circusd: No such file or directory
failed, please see logfile.

This seems reminiscent of the circus errors I had when I first tried to install on Stretch a few months ago. Was that ever cleared up? Any suggestions for getting it running again?

Going on a tangent here, but I promise it's related (feel free to skip ahead to the tl;dr if you don't care to read a programmer rant) --

Apparently, Raspbian bundles a custom version of 'pip' with certain distributions which means that when you are doing things like - say - installing Fermentrack there isn't any guarantee that the environment you end up with is the environment you expect. For most installations this isn't a problem - the custom 'pip' creates virtualenvs that are disconnected from everything, you install your packages, and life goes on. Then there's things like "numpy" which are needed for specific gravity support. They can't (easily) be installed in a virtualenv. So what do you do?

You install with --system-site-packages. It's pretty much designed for situations like this. System site packages get included, but aren't prioritized over locally installed ones, and everyone is happy. Except - under Stretch - but not Stretch Lite! - system-site-packages has been rewritten to not actually do what it was designed to do, but to completely ignore the virtualenv and pretend to install packages globally. Except - oh wait - the Fermentrack user isn't 'sudo' and can't install packages globally that include executables -- like circus.

So yeah. I install/test under Stretch Lite and everything works, but under Stretch it doesn't. And beyond that the errors don't even make sense given the fact that everything should be segregated into its own environment.

tl;dr/conclusion:

I released a patch that should fix all this, thanks to the help of @georgedamonkey and @CadiBrewer . To make it work, redo the python 3 upgrade script -

As the 'pi' user, run:
curl -L install-python3.fermentrack.com | sudo bash
 
Now that flashing the the "Wifi Reset" isn't a problem anymore, I tried it but my DS18B20 isn't found. Any tips on were to start? I'm pretty sure the breakout board is v1.1...

Update: one of my cables work when I connect them directly to the ESP8266 but not through the breakout board. The RJ11 cable is completely new so I don't think that is the problem. Bad soldering?

I'm actually going to release new boards in the not-too-distant future that switch to using RJ-45 specifically to address this point. For the "v1.0" breakout board I assumed that RJ-11 cables were all straight through (where the lefthandmost pin on one end of the cable matched the lefthandmost pin on the other). This was apparently incorrect. For most phone cables, the wiring is actually crossover.

If the cable you have has color-coded wires inside, if say the Yellow wire was on the left on one end of the cable, for the v1.1 board it should be on the right on the other end of the cable. If it isn't color coded, you can tell based on how the "plugs" are attached.


"Straight" cable - Plugs are attached facing opposite directions:

7DC5AB38-1671-43B9-8DF0-1B05FF8F58D2.jpeg



"Crossover" cable - Plugs are attached facing the same direction:
5CE8DB11-5B13-4606-8BAF-A2B0A4AC3A0A.jpeg



Easy way to tell:
For most of the RJ-11 cables that I own, there is a "seam" running down the underside of one side of the cable. If both of the "clip" sides of the heads are on the same side (seam or no-seam) then it's crossover. Otherwise, it's straight.

Again - for v1.1 of the board, you need a 4 wire crossover cable.
 
I'm actually going to release new boards in the not-too-distant future that switch to using RJ-45 specifically to address this point. For the "v1.0" breakout board I assumed that RJ-11 cables were all straight through (where the lefthandmost pin on one end of the cable matched the lefthandmost pin on the other). This was apparently incorrect. For most phone cables, the wiring is actually crossover.

If the cable you have has color-coded wires inside, if say the Yellow wire was on the left on one end of the cable, for the v1.1 board it should be on the right on the other end of the cable. If it isn't color coded, you can tell based on how the "plugs" are attached.


"Straight" cable - Plugs are attached facing opposite directions:

View attachment 563038



"Crossover" cable - Plugs are attached facing the same direction:
View attachment 563037



Easy way to tell:
For most of the RJ-11 cables that I own, there is a "seam" running down the underside of one side of the cable. If both of the "clip" sides of the heads are on the same side (seam or no-seam) then it's crossover. Otherwise, it's straight.

Again - for v1.1 of the board, you need a 4 wire crossover cable.

And there you have it, my cables are straight. And I just can’t connect the cables on the board in a different way?
 
And there you have it, my cables are straight. And I just can’t connect the cables on the board in a different way?
You could still do it, the labels on the RJ11 breakout will be incorrect.

Door is now 3v3
GND is now OneWire Data
OneWire is now GND
3v3 is now Door

You could also buy a new cord for $1.
 
Has anyone had any issues getting the iSpindel to communcicate to Fermentrack?

I've gone through the set up process, when going into the iSpindel config i get an output of temp and tilt.

I'm pretty certain i've updated the info correctly, everything is on the same wifi network, i've got it updating every 15 seconds so i can see if anything is coming through, but nothing does.

port 80 gets to the website fine to so not that as far as i can tell? flashed firmware with most recent iSpindel bin as far as i can tell.

but i get no graph and no temperature of tilt output in Fermentrack.

Screen Shot 2018-03-22 at 19.41.18.png
Screen Shot 2018-03-22 at 19.45.51.png
 
attached is the info with tilt and temp so i'm not going mad it does work...??? just doesn't log to fermentrack?
 

Attachments

  • Screen Shot 2018-03-22 at 19.54.31.png
    Screen Shot 2018-03-22 at 19.54.31.png
    69.8 KB · Views: 30
Screen Shot 2018-03-22 at 20.26.37.png
Screen Shot 2018-03-22 at 20.27.10.png
Screen Shot 2018-03-22 at 20.26.53.png
Aside from the graph, do you see the temp/gravity appear in the “dashboard panels” on either the main fermentrack page or the devices dashboard?

no nothing that suggests that iSpindel is sending anything to fermentrack.
 

Attachments

  • Screen Shot 2018-03-22 at 20.26.37.png
    Screen Shot 2018-03-22 at 20.26.37.png
    189 KB · Views: 33
  • Screen Shot 2018-03-22 at 20.26.53.png
    Screen Shot 2018-03-22 at 20.26.53.png
    130.3 KB · Views: 25
Not sure whether the stderr.log will help but hopefully it's attached, spewing out errors at the moment but nothing in the last hour.
 

Attachments

  • d4.txt
    9.5 KB · Views: 22
Back
Top