-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: telemetry from i2c sensor not sent in DeviceTelemetryModule packages #5139
Comments
Hi, thank you for the report. I checked the code for the BMP-280 and on first glance it looks like it should be working I noticed the log lines you focused on were for DeviceTelemetryModule. For the BPM-280, the log lines to look for are EnvironmentTelemetryModule. |
Most of the modules are not yet supported on linux |
@fifieldt Thank you for diggin in... the the complete output does not list any EnvironmentTelemetryModule notices: INFO | 21:48:47 0 Using /dev/i2c-1 as I2C device. @garthvh thanks for notice! you mean f.e. sending EnvironmentTelemetryModule is here is a feature request? Maybe does come later? |
Thanks for the extra logs @xinrag . it looks like the EnvironmentTelemetryModule isn't starting up. As Garth hints, it might just be disabled due to the architecture. Fixable, but I'll need to set up a development environment to try and work out why :) |
I'm having the same issue using native/portduino on a pi zero 2. Devices are detected:
However as with OP, there is nothing in the logs from the Happy to help debug in any way or run test builds. I have an environment setup on a pi 4 to compile native/portduino for my pi zero so I'd be happy to compile and test any branches with a possible fix. |
@fifieldt If you can show me the points of interest in the code I'd be happy to take a stab at getting this working. |
Someone on the discord also seeing this. The new protobuf requires the "has_VALUE" to be called to indicate that there is actual data to be encoded or it just skips it. So for any actual values need to call |
I think I found it. Since environmentalTelem code is combining data from two sensors and the has_XXXX functions are being called on the individual sensor packets, when the data is combined into another telem packet object the has_XXX are not called again on the new packet.
|
This should fix the case for AHTX0 #5277 |
testing 2.5.12 atm here and poorly my system stoll does not send this env data. :/ |
Yeah I think the bug I found was different and hijacked this issue so
sounds probably be reopened.
…On Sun, Nov 10, 2024, 5:50 AM Stephan Laufer ***@***.***> wrote:
testing 2.5.12 atm here and poorly my system stoll does not send this env
data. :/
can I help?
still no EnvironmentTelemetryModule notices in the stdout log of the
meshtasticd and so no telemetry informations found with the client...
—
Reply to this email directly, view it on GitHub
<#5139 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7QJRZO55COI5H3UWM244TZ756EHAVCNFSM6AAAAABQRM2WMCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRWG44DKMZSHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I think I am having this issue as well. My device is a Heltec ESP32 v3.1 ordered from Amazon. I have attached a BMP280 to pins 17 and 18 and the temperature and pressure values are shown on the display and are visible in the Android Meshtastic App when connected via Bluetooth. But my "gateway" node (same hardware, but connected to my wifi with MQTT enabled) only receives device stats (like battery, airutil, chutil), no environment telemetry. The MQTT template sensors in Home Assistent already work, I can see the values from the device, just the environment values are missing. I'm writing this for two reasons: One, to provide more insights. Two, to get notified when a fixes firmware is released. 😅 |
A small update. I had some free time on my hands and was able to poke around a bit with the $ ./meshtastic --port /dev/ttyUSB1 --request-telemetry environment --dest '!12345678'
Connected to radio
Sending environment_metrics telemetry request to !12345678 on channelIndex:0 (this could take a while)
Telemetry received:
environmentMetrics:
temperature: 19.77
relativeHumidity: 47.13965
barometricPressure: 1011.6044 |
All right, a bit more investigation revealed that the sensor node, in fact, is publishing telemetry data. It just happens on a different MQTT topic than expected. This is (part of) my sensor:
- name: "Node 1 Humidity"
unique_id: "node_1_humidity"
state_topic: "msh/EU_433/2/json/PKI/!12345678"
state_class: measurement
value_template: >-
{% if value_json.from == 1129923668 and value_json.payload.relative_humidity is defined %}
{{ (value_json.payload.relative_humidity | float) | round(2) }}
{% else %}
{{ this.state }}
{% endif %}
device_class: "humidity"
unit_of_measurement: "%" This is what I receive on the MQTT topic {
"channel": 0,
"from": 1129923668,
"hop_start": 2,
"hops_away": 0,
"id": 3798185952,
"payload": {
"barometric_pressure": 1011.80029296875,
"current": 0,
"gas_resistance": 0,
"iaq": 0,
"lux": 0,
"relative_humidity": 56.6611328125,
"temperature": 5.88000011444092,
"voltage": 0,
"white_lux": 0,
"wind_direction": 0,
"wind_gust": 0,
"wind_lull": 0,
"wind_speed": 0
},
"rssi": -103,
"sender": "!12345678",
"snr": 0.5,
"timestamp": 1732370418,
"to": 862507976,
"type": "telemetry"
} Please note: I can get these messages when I manually issue the CLI command from my last post. So far I have seen no automatic messages on my MQTT broker. Additionally I receive two messages on the topic. The first one has all measurements set to 0, but since it has a different 1st message (contains measurement values set to from: 862507976 2nd message (contains actual values) from: 1129923668 I'm not exactly sure what's going on here, but I'm taking one step at a time. 😃 I hope this may be useful to somebody stumbling across this like I did. I am not affected by the bug initially described in this issue. Please excuse the additional noise. |
Category
Other
Hardware
Linux Native
Firmware Version
2.5.6.d55c08d
Description
meshtasticd_2.5.6.d55c08d_arm64.deb
mestatic-2.5.3
raspberry pi 3b+ with bookworm
SPI Hat with SX1262
i2c bmp-280 is recognized...:
Oct 24 17:15:46 dc8lz-mesh meshtasticd[1647]: INFO | 17:15:23 0 Using /dev/i2c-1 as I2C device.
Oct 24 17:15:46 dc8lz-mesh meshtasticd[1647]: INFO | 17:15:23 0 Scanning for i2c devices...
Oct 24 17:15:46 dc8lz-mesh meshtasticd[1647]: INFO | 17:15:23 0 BMP-280 sensor found at address 0x76
Oct 24 17:15:46 dc8lz-mesh meshtasticd[1647]: INFO | 17:15:23 0 1 I2C devices found
Telemetry is enabled:
"telemetry": {
"deviceUpdateInterval": 15,
"environmentUpdateInterval": 15,
"environmentMeasurementEnabled": true,
"environmentScreenEnabled": false,
"environmentDisplayFahrenheit": false,
"airQualityEnabled": false,
"airQualityInterval": 0,
"powerMeasurementEnabled": false,
"powerUpdateInterval": 0,
"powerScreenEnabled": false
},
Packages does not contain the sensor informations...:
Oct 24 17:22:46 dc8lz-mesh meshtasticd[1647]: INFO | 15:21:08 345 [DeviceTelemetryModule] (Sending): air_util_tx=0.381472, channel_utilization=3.780000, battery_level=101, voltage=0.000000, uptime=345
Oct 24 17:22:46 dc8lz-mesh meshtasticd[1647]: INFO | 15:21:08 345 [DeviceTelemetryModule] Sending packet to mesh
Sidenote: can read out the bmp-280 with a simple python script.
Can you help me out? Found a bug?
Thank you!
btw: powersaving disabled
Relevant log output
The text was updated successfully, but these errors were encountered: