Giter Club home page Giter Club logo

Comments (8)

OttoWinter avatar OttoWinter commented on July 20, 2024

Oh! Thank you so much! That would have been a nightmare to debug (I hope you didn't have to debug for too long... My mistake)

from esphome-core.

schumar avatar schumar commented on July 20, 2024

It wasn't "fun" to debug, in the end I used my Logic Analyzer and hooked it up to see what was going on :)
But don't worry, thanks a lot for esphomelib!

from esphome-core.

OttoWinter avatar OttoWinter commented on July 20, 2024

Oh noes... Sorry about that.

As a tip, you can set the debug level to VERY_VERBOSE and you will see the entire i2c traffic in the logs 😉 https://esphomelib.com/esphomeyaml/components/logger.html

from esphome-core.

schumar avatar schumar commented on July 20, 2024

Sorry for replying to this closed ticket, but I'm trying to debug an issue with TSL2561, and wanted to set the logging level as you suggested:

#define ESPHOMELIB_LOG_LEVEL ESPHOMELIB_LOG_LEVEL_VERY_VERBOSE
#include <esphomelib.h>
// [...]
    auto *log = App.init_log(230400);
    log->set_global_log_level(ESPHOMELIB_LOG_LEVEL_VERY_VERBOSE);

but I don't get any additional log entries :(

from esphome-core.

OttoWinter avatar OttoWinter commented on July 20, 2024

That would be because #define before an include only works with header-only libraries :)

So to set the log level to very verbose you need to set it inside platformio.ini:

[env:YOUR_ENV]
build_flags = -DESPHOMELIB_LOG_LEVEL=ESPHOMELIB_LOG_LEVEL_VERY_VERBOSE

from esphome-core.

schumar avatar schumar commented on July 20, 2024

Do you know an easy way to do this using Arduino?

from esphome-core.

OttoWinter avatar OttoWinter commented on July 20, 2024

Puh... that might be difficult. I've never really used the Arduino IDE before, but maybe this could help?

from esphome-core.

schumar avatar schumar commented on July 20, 2024

I decided to simply cheat, by modifying log.h :)

from esphome-core.

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.