Git Product home page Git Product logo

Comments (13)

DurandA avatar DurandA commented on September 2, 2024

Can you tell us more about your setup? What operating system do you use? The first step is to set up the toolchain and then follow the steps until step 9.

Once this is done, you should update the configuration file according to your device. I personally use nRF Connect to explore the services and characteristics (e.g. hydrometer value) that are exposed by the BLE device before configuring.

The last step is to flash the ESP32 firmware using the make flash command.

from esp32-ble2mqtt.

hapklaar avatar hapklaar commented on September 2, 2024

Hi DurandA,

Thanks for responding. I was able to get it flashed and can even do OTA updates, after following the guide.

Didn't know about nRF connect, will check it out! Have been using BLE Scanner so far.

from esp32-ble2mqtt.

shmuelzon avatar shmuelzon commented on September 2, 2024

Hey @hapklaar,

Glad to hear you were able to set everything up!
The next step would be to get the information from the Tilt sensor. As far as I can tell, the Tilt uses the iBeacon standard to transmit its sensor readings with the major and minor values corresponding to temperature and gravity respectively, see here.
Since we already support iBeacons, this means that you should be able to get the readings without any modifications.

Let me know if you run into any issues.

Good day!

from esp32-ble2mqtt.

hapklaar avatar hapklaar commented on September 2, 2024

Hi @shmuelzon , good day to you too!

Had no issues receiving data from the Tilt>ESP>Pi using mosquitto. Already graphing it in Zabbix on my Pi.

Setup seems to be a little unstable however. Every few hours I have to reset the ESP to get new readings. Also haven't been able to get the log monitoring part working. After 'make remote-monitor' in msys32 shell no data is received. It just sits there at

hapkl@SLOEBER-10 MINGW32 ~/esp/esp32-ble2mqtt
$ make remote-monitor
Toolchain path: /opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0

from esp32-ble2mqtt.

shmuelzon avatar shmuelzon commented on September 2, 2024

Hey,

Regarding setup stability, have a serial connection open would be the best way to figure out what's going on but we can start with remote logging. Next time it fails, could you please also try to ping the ESP32 so we know if it's still connected to the WiFi network or not?
Also, different ESP-IDF versions give very different results. I'm personally using v3.1.2 and don't see these issues. If you're using something else, please try to switch to v3.1.2 first.

As for the remote logging feature, once it starts listening for log messages, is should print Listening on port xxxx. Since I don't see that message, either the Python script is not running or something else might be wrong. Could you please try to run the script manually with python remote_log.py?

Let me know...

from esp32-ble2mqtt.

hapklaar avatar hapklaar commented on September 2, 2024

I seem to be using a newer version:

hapkl@SLOEBER-10 MINGW32 ~/esp/esp-idf
$ git describe --tags --dirty
v4.0-dev-137-gce07a1057

When I run the python script directly, there is also no output.

Shall try 3.1.2 later today. Guess a make clean / make flash after changing $IDF_PATH to the 3.1.2 folder is required?

from esp32-ble2mqtt.

shmuelzon avatar shmuelzon commented on September 2, 2024

Guess a make clean / make flash after changing $IDF_PATH to the 3.1.2 folder is required?

I would suggest a rm -rf build sdkconfig sdkconfig.old to make sure nothing is left from the newer version as the configuration options would also be different and make clean doesn't remove that.

from esp32-ble2mqtt.

hapklaar avatar hapklaar commented on September 2, 2024

I redid everything with v3.1.2 and also new clone of your repo, but still no joy on remote-monitor. It's just sitting there doing nothing apparent. A 'make remote-monitor -d' show nothing special either, other than that its spawning a process after compiling:

Considering target file 'remote-monitor'.
 File 'remote-monitor' does not exist.
 Finished prerequisites of target file 'remote-monitor'.
Must remake target 'remote-monitor'.
Putting child 0x200570b0 (remote-monitor) PID 3676 on the chain.
Live child 0x200570b0 (remote-monitor) PID 3676
Live child 0x200570b0 (remote-monitor) PID 3676



from esp32-ble2mqtt.

shmuelzon avatar shmuelzon commented on September 2, 2024

I'm guessing make is doing its job but Python is giving us some trouble.

Which version of Python are you using? I've tested on both Python 2.7 and 3.7 but on macOS and Linux, haven't tried on Windows.
Maybe we can try to trace where the script is failing by running it as: python -m trace --trace remote_log.py?

Could you also share the "log" portion of your configuration?

from esp32-ble2mqtt.

hapklaar avatar hapklaar commented on September 2, 2024

Python version is 2.7.15

It's acting very strange looking at the trace, it seems to hang then continue at the same stages every time I execute python -m trace --trace remote_log.py. Eventually some logdata gets through though in big chunks. Apparently I just didn't wait long enough before.

Both trace and log output seems to halt for 40-60 seconds then another chunk is shown upon where output halts again.. Hard to explain, uploaded a vid of what is happening here

PS attached entire config.json for review
config.zip

from esp32-ble2mqtt.

shmuelzon avatar shmuelzon commented on September 2, 2024

Hey,

Sorry for the back-and-forth but since the outout was buffered, I can’t tell exactly where it really hangs. Could you please run python -u -m trace --trace remote_log.py so it will be unbuffered?

Thanks

from esp32-ble2mqtt.

hapklaar avatar hapklaar commented on September 2, 2024

Not a problem, really appreciate your help!

The buffering was actually the reason for the 'halts' in output. With -u it works just fine and shows trace + log without issue.

Without option -u it takes a while for log output to start, with -u I now have wireless logging. :)

I suspect, because logs are transmitted using UDP and WIFI on my ESP32 seems flaky at best, and the device was not near my access point, I was just missing packets.

from esp32-ble2mqtt.

shmuelzon avatar shmuelzon commented on September 2, 2024

This is probably just a difference in how output buffers are managed in Windows. I changed make remote-monitor to use -u be default.

from esp32-ble2mqtt.

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.