Coder Social home page Coder Social logo

Comments (9)

SwiCago avatar SwiCago commented on September 2, 2024 3

Thanks @dzungpv , @stewartadam , @markalston
Great work of finding a solution for everyone fast...Pull has been merged.

from heatpump.

dzungpv avatar dzungpv commented on September 2, 2024 1

@dzungpv It looks like your issue is that you are only setting the values for rxPin and txPin inside the

if (rx >= 0 && tx >= 0) {

test.

If on the initial call to connect, rx and tx are set to -1 then rxPin and txPin are not set but you use them on line 119.

_HardSerial->begin(bitrate, SERIAL_8E1, rxPin, txPin);

Maybe you could initialize them to -1 and add a test to check value before line 119 in case it is -1 and then fallback to the old

_HardSerial->begin(bitrate, SERIAL_8E1);

This is my guess to the issue anyway.

It is original code, I just store the custom RX TX pin for call in retry you can check change here: dzungpv@ce460c3 and 4 of my units running fine since, 3 esp8266 and 1 esp32
Update: because I am using custom pin so ESP32 not show error @SwiCago you can check the PR to fix the bug

from heatpump.

stewartadam avatar stewartadam commented on September 2, 2024 1

Just tried it, confirmed working! Thank you @dzungpv and @markalston

from heatpump.

prashker avatar prashker commented on September 2, 2024 1

Teamwork!

from heatpump.

SwiCago avatar SwiCago commented on September 2, 2024

@prashker , this relates to the commit you made, can you review pls

from heatpump.

prashker avatar prashker commented on September 2, 2024

@SwiCago if I'm reading the above correctly, my commit works - it is subsequent commits breaking communication.

@stewartadam seems to indicate that problem is immediately after my commit, which would be ce460c3 by @dzungpv

from heatpump.

dzungpv avatar dzungpv commented on September 2, 2024

@SwiCago if I'm reading the above correctly, my commit works - it is subsequent commits breaking communication.

@stewartadam seems to indicate that problem is immediately after my commit, which would be ce460c3 by @dzungpv

I am running for months without any issue. Both with esp8266 and esp32. With my changes, if you are not set the custom UART pin on ESP32, it use default settings. @stewartadam can you try my project, it is not ESPHOME but you can try to test if the bug happen with this lib or ESPHOME implementation

from heatpump.

markalston avatar markalston commented on September 2, 2024

@dzungpv It looks like your issue is that you are only setting the values for rxPin and txPin inside the

if (rx >= 0 && tx >= 0) {

test.

If on the initial call to connect, rx and tx are set to -1 then rxPin and txPin are not set but you use them on line 119.

_HardSerial->begin(bitrate, SERIAL_8E1, rxPin, txPin);

Maybe you could initialize them to -1 and add a test to check value before line 119 in case it is -1 and then fallback to the old

_HardSerial->begin(bitrate, SERIAL_8E1);

This is my guess to the issue anyway.

from heatpump.

dzungpv avatar dzungpv commented on September 2, 2024

@stewartadam Can you check latest change?

from heatpump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.