Code Monkey home page Code Monkey logo

Comments (5)

ascillato avatar ascillato commented on August 23, 2024

I made the PR #48 and #52 for making ESP-KNX-IP work for a modification to Sonoff Tasmota to add KNX IP to its features.

What do you think of these Pull Requests?

from esp-knx-ip.

envy avatar envy commented on August 23, 2024

Hi,

callbacks work for me, even without a webserver.

Also, your changes don't actually change anything? You just replaced the server != nullptr with a dedicated bool and moved the website registrations to another function. The UDP part at the end of __start is called with and without your patch and that is reponsible for registering a packet handler function.

Did you check with debugging enabled that really no packet arrives?

from esp-knx-ip.

ascillato avatar ascillato commented on August 23, 2024

Hi,

Yes, using the async-udp branch, I check with debug on (ESP_KNX_DEBUG) and there was no message on reception. Everything works for sending data, but for receiving, the __loop_knx(packet); was never called.

When I pass to the ESP-KNX-IP the object with the webserver, the __loop_knx(packet); is called again.

It seems that the ESPAsyncUDP Library requires to have the Webserver variable? I could not find why.

But just not passing the variable makes this behaviour.

I'm compiling using Arduino IDE and the lwIP v1.4. I was not using v2 because it has problems with sleep()

So, it is like you say, those changes seems to do nothing but only makes available the webserver object to the ESP-KNX-IP.

from esp-knx-ip.

envy avatar envy commented on August 23, 2024

I'm also using the async-udp branch with lwip 1.4 and as I said, I have no problems when passing nullptr for the webserver.

You can try adding a print into the lambda like so:

udp.onPacket([this](AsyncUDPPacket &packet) {
  DEBUG_PRINTLN("got packet");
  __loop_knx(packet);
});

to see if really no packet arrives.

from esp-knx-ip.

ascillato avatar ascillato commented on August 23, 2024

Hi,

I found the bug! Was not a problem of ESP-KNX-IP.

When I started to add KNX to Tasmota I was using the webpage of the library. So the knx.start(webserver); was after the declaration of the Tasmota webserver.

Then, when change to use knx.start(nullptr); I moved it to an internal Tasmota function that calls all the drivers on device start. And that start is BEFORE Wifi. That's why the UPD listen was not working.

Now everything works. I ran several tests and goes smooth, So, I'm closing this issue and the PR #52.

Nico, thanks a lot for your time. It is very appreciated 👍

from esp-knx-ip.

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.