BrewManiac+BMESP8266 V0.9

-use WebSocket instead of original ServerSideEvent. The new version of ESPAsyncWebServer breaksΒ the original ServerSideEvent.

-Simple Mash Steps is now the master branch. The Arduino code has to be updated also.

-Default baudrate changes to 115200.

16 thoughts on “BrewManiac+BMESP8266 V0.9

  1. vito: i have finally got to test my setup wired together. Wemos D1 mini and Arduino Nano… flashed with original settings on both boards, and latest uploaded files as of today.

    When the Arduino have booted up, i get the wifi logo up in right corner of the display, but suddenly i get a beeping sound and a ! on the same spot. I take it that there is serial trouble? i use 30cm long leads with TX-RX twisted… what could i try changing to get it to work?

  2. Hi Robert,

    I think it is the same problem as what I have with the 5V ready board. The cause of this problem is that Arduino can receive data from ESP8266, but ESP8266 cannot receive data from Arduino.
    The first time I trie 5V serial board, I used original quadrate rate of 38400. Exact the same thing happened. I then tried my development UNO platform and confirmed this issue. It took me a while to figure out a solution which is changing the baud rate. 115200 works on my UNO testing platform but still failed on my working platform. I have no idea. A worse news is that I burnt my working platform today, so I don’t know how to follow this issue.

    The only way I can think of is trying the baud rate, like 57600.

    Here is the detail explanation of what happens:
    The icon is shown when Arduino receives the initial setup data from ESP8266. ESP8266 expects “acknowledge” from Arduino, sent but never received. Soon after Arduino detects the fact that ESP8266 doesn’t “acknowledge” its status, temperature reading and other status, Arduino beeps and regards connection broken.

  3. How does one change the band rate to 57600? I tried looking at the code, but have no coding experience at all. should the change also be done at both esp and arduino software?

  4. Arduino:
    BrewManiac.ino: 55
    #define WiFiSerialBaudRate 115200

    config.h: 70
    #define BAUDRATE 115200

  5. Yeah, you are probably right – after reading that i have ordered level shifters, which i hoped was not needed. So there goes another long wait before i get the level shifters. Should have ordered them earlier if i knew this.

  6. Hi Vito and Robert!
    Do you find a solution for this problem?
    I have the same problem/
    I try to connect Arduino Nano and Nodemcu and get the wifi logo in the right corner of display. But IP on the display did not show. 3 line is empty.
    And of course when i connect to Nodemcu by wifi – he does not see arduino.

  7. What do you use as 5V-3.3V converter?
    The cause is that Arduino received data from ESP8266, but ESP8266 can’t receive data from Arduino.
    Check my other post, then you will know I am so helpless that I want to kiss Arduino goodbye.

  8. I don`t use converter, but i have wifi logo πŸ™‚

    Yes, i have read your plans about NodeMcu board and i will try your new program as soon as possible

  9. Hello Yuri!

    A few days ago i installed a 5v/3.3v logic level converter, and it instantly worked getting an IP. haven’t tested much though, so i don’t know if there is any issues with it.
    So i would order one if i were you.

  10. ESP8266(3.3V) -> Arduino(5V) should work fine. However, Arduino(5V) -> ESP8266(3.3V) is unpredictable. You might get a fried ESP8266 in the worst case.
    Here is how it work when power-up:
    1.ESP8266 send a “connection request” to Arduino.
    2.Arduino response the “connection request”. The wireless icon will be shown.
    3.ESP8266 requests settings and brew information from Arduino.
    4.ESP8266 send the IP information to Arduino.

    In your case, or my failed case, ESP8266 doesn’t receive the acknowledge from Arduino and it will keep trying for a few times, wait for about 30 seconds, and try again. Arduino does receive the “connection request”, shows the icon, and sends the response to ESP8266. Since ESP8266 can’t receive anything from Arduino, step 4 will not be executed, and the IP will not be shown.

  11. Hi Vito,

    Congratulations on your great work. IΒ΄m deal with one problem. All work fine, but I dinΒ΄t find where BMESP8266 send IP address to BrewManiac. Finded only in line 304 on bmesp8266.ino, but only to debug. No other code to send IP to BrewManiac only send NullIP as on line 406. How do I fix this because all the rest work fine.

    IΒ΄m using all the lastest version.


  12. Let me checked it when I am home.

    It have been a long time since my last time editing the code.
    The structure of ESP8266 + Arduino is too complicated to maintain. I couldn’t setup a reliable UART connection between ESP8266 and Arduino. Keeping the states of ESP8266 and Arduino synchronized is tedious. That is exact the reason I ditched Arduino and use ESP8266 only.

    There is not a simple solution to this issue because I put a constraint on the maximum size of data frame and designed a over complicated protocol. (It’s not really complicated but too complicated for its purpose.)
    Two ways I can think of to fix this is to change to protocol. Send the IP information after the connection between ESP8266 and Arduino is established.

    I don’t have the hardware platform, but I try modifying the code. Please check the GitHub.

  13. Hi Vito,

    First of all, thank you for your attention.

    I tried to fix it myself and merging its changes with mine, worked with the following changes:

    Change on BMESP8266.ino

    line 285
    + void displayIP(){ //From BrewManiacEX
    + IPV4Address ip;
    + ip.dword = WiFi.localIP();
    + bmWeb.setIp(ip.bytes);
    + }

    line 393
    – //bmWeb.setIp(WiFi.localIP());
    + displayIP();

    Change on BrewManiacProxy.h

    line 246
    + byte _ipAddressip[4];

    line 669
    – else memcpy(_ipAddress,ip,4);
    + else memcpy(_ipAddressip,ip,4);

    Change on BrewManiacWeb.cpp

    line 49
    – void BrewManiacWeb::setIp(uint8_t ip[])
    + void BrewManiacWeb::setIp(byte ip[])

    Change on BrewManiacWeb.h

    line 42
    – void setIp(uint8_t ip[]);
    + void setIp(byte ip[]);


  14. A little correction:

    Change on BrewManiacProxy.h

    line 245
    – byte _ipAddress[4];
    + byte _ipAddressip[4];

    Change on BrewManiacProxy.cpp

    Line 647
    – if(_ipAddressip[0] == 0 && _ipAddress[1]==0 && _ipAddress[2] ==0 && _ipAddress[3] ==0)
    + if(_ipAddressip[0] == 0 && _ipAddressip[1]==0 && _ipAddressip[2] ==0 && _ipAddressip[3] ==0)

    line 669
    – else memcpy(_ipAddress,ip,4);
    + else memcpy(_ipAddressip,ip,4);

Leave a Reply

Your email address will not be published. Required fields are marked *