GithubHelp home page GithubHelp logo

Comments (12)

DTTerastar avatar DTTerastar commented on May 23, 2024 1

No.

from espresense.

corgan2222 avatar corgan2222 commented on May 23, 2024

I fully agree. @DTTerastar seams to working on it allready. #53 #67

For me personally, a simple whitelist would do the job perfectly fine.

from espresense.

DTTerastar avatar DTTerastar commented on May 23, 2024

ESP32s aren't a full linux environment. They can't do nearly as much as a pi. We only have a few kbs of memory! Also, C++ is a bad place to try a build a ton of functionality. I do think I can add some filtering, but I don't think it's really needed. Mqtt passing a few extra packets is no big deal. I attempted to have the esp listen for packets AND request a gap characteristic and it totally broke the esp... So treating them more like sensors nodes and using real smarts in python is more the direction I see this project going... But hey PRs are accepted if you have the programming chops. I'm really a c# programmer, not a C++ guy this is totally new to me.

from espresense.

DTTerastar avatar DTTerastar commented on May 23, 2024

The other thing is the "barrage" is mostly because of noise reading rssi. You really need multiple nodes to correlate the rssi and figure out if the rssi is real or noise. If we could filter out all the rssi readings that are crap, we wouldn't need to report much into mqtt.

from espresense.

ivanvach avatar ivanvach commented on May 23, 2024

Well it is not a surprise that you run out of resources if you try running Linux on ESP32. I have commissioned software that does much more complex stuff on ESP32, however it was written in IDE Arduino environment and doesn't need or use any OS.

Regardless, supporting a white list will help you with both MQTT clutter and RSSI noise. Think about it.

from espresense.

ivanvach avatar ivanvach commented on May 23, 2024

Yes. C# and C++ are quite different. Congrats on making the transition.

from espresense.

DTTerastar avatar DTTerastar commented on May 23, 2024

I did find a bug that made the code to send more traffic than desired. The latest release honors the setting to skip sending an update if the position is < whatever distance you specify.

from espresense.

ivanvach avatar ivanvach commented on May 23, 2024

That's great Darrel !!! Thanks a lot. I will test it today and report back.

from espresense.

ivanvach avatar ivanvach commented on May 23, 2024

Noticed all great improvements but this particular problem is not resolved yet IMHO. I set it up very conservatively to report moves 7+ meters ONLY and to update in 20 sec. Still it produced 2500+ MQTT messages in 15 minutes that didn't contribute to presence detection. I did move the only BT device that needs monitoring once and ESPresence didn't register when it left the radius of 16 m. It did register the return.
My office where I test is not different than many others. I have few computers, a printer, Google Home speaker, few tablets but as I said I was moving only one. Everything else was stationary.
Part of MQTT log with time stamps is attached if someone wants to analyze it.
log1.txt

from espresense.

DTTerastar avatar DTTerastar commented on May 23, 2024

This is made to work with https://www.home-assistant.io/integrations/mqtt_room/

The rules of using that are you send nothing if > maxDistance, and you keep on sending messages if < maxDistance. I do agree that it's probably the worse way of using mqtt if you only have one base station. But the whole point of mqtt_room is to have hass figure out what room something is in.

from espresense.

ivanvach avatar ivanvach commented on May 23, 2024

Actually your reports (log) to the serial port are much nicer and useful than the MQTT.

  1. It reports the arrival once only as "new".

  2. It automatically removes the device as "del" if it didn't hear from it for certain time.

  3. When the device comes back it is reported as "new" again.

  4. Best of all it produced only 100 records in my 15 minutes test vs 2,500 useless MQTT records.

    1. to 3. above is sufficient to determine the presence in certain area. Please note that PIR sensor marks arrival as well. However if I "arrive" and lay on the couch for 2 hours reading a book than PIR senor will "think" that I'm gone and will turn off the lights. In this regard I wish that ESPresence is better and marks arrival as well as staying, which ESPresence does over serial interface but not over MQTT. Your point that object will move from one to another monitored area is not very strong as the object may leave the house as well and leave the system in believe that it is in the last area.

from espresense.

ivanvach avatar ivanvach commented on May 23, 2024

Can you please do this:

  1. send MQTT JSON ONLY when you send out the serial log records.
  2. Include the important info "new' or "del" in the JSON

If someone likes the MQTT clutter than make the above optional.

from espresense.

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.