Skip to content
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] Not able to send Telemetry using BLE connector #1522

Open
vjvivek1983 opened this issue Sep 12, 2024 · 0 comments
Open

[BUG] Not able to send Telemetry using BLE connector #1522

vjvivek1983 opened this issue Sep 12, 2024 · 0 comments
Assignees
Labels

Comments

@vjvivek1983
Copy link

I am using a Thingsboard installation on EC2 machine as a server and I have a Raspberry PI 5 as the gateway. I am trying to fetch telemetry from a NRF node via BLE which sends the readings through advertisement message only. For that I have created a BLE connector on TB with the following configuration:
{
"passiveScanMode": false,
"devices": [
{
"name": "TEST",
"deviceType": "BLE",
"MACAddress": "FA:96:BD:45:08:XX",
"pollPeriod": 5000,
"connector_type": "ble",
"type": "hex",
"showMap": false,
"timeout": 10000,
"connectRetry": 5,
"connectRetryInSeconds": 0,
"waitAfterConnectRetries": 10,
"telemetry": [
{
"key": "temperature",
"dataSourceType": "advertisement",
"valueExpression": "[0:1]"
},
{
"key": "humidity",
"dataSourceType": "advertisement",
"valueExpression": "[0:2]"
}
],
"attributes": []
}
],
"logLevel": "DEBUG",
"name": "Rpi_BLE",
"enableRemoteLogging": true,
"id": "ed894e3c-2a34-4581-b959-25568e426157"
}

I do not see the device created on Thingsboard at all. Hence no telemetry also. While checking the logs I see the following:

2024-09-12 11:23:54 - |DEBUG| - [hex_bytes_ble_uplink_converter.py] - hex_bytes_ble_uplink_converter - convert - 57 - {'telemetry': [{'temperature': 58}, {'humidity': 77}], 'attributes': []}
2024-09-12 11:23:54 - |DEBUG| - [ble_connector.py] - ble_connector - __process_data - 138 - {'telemetry': [{'temperature': 58}, {'humidity': 77}], 'attributes': []}
2024-09-12 11:23:54 - |INFO| - [ble_connector.py] - ble_connector - __process_data - 143 - Data to ThingsBoard {'telemetry': [{'temperature': 58}, {'humidity': 77}], 'attributes': []}
2024-09-12 11:23:54 - |ERROR| - [tb_utility.py] - tb_utility - validate_converted_data - 74 - deviceName is empty in data: {"telemetry": [{"temperature": 58}, {"humidity": 77}], "attributes": []}
2024-09-12 11:23:54 - |ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1015 - ['ed894e3c-2a34-4581-b959-25568e426157'] Data from Rpi_BLE connector is invalid.

Your Server Environment

own setup

Deployment: monolith
Deployment type: deb
ThingsBoard Version : Latest
Community or Professional Edition: Community
OS Name and Version: Ubuntu
Connectivity

Gateway
Device vendor and model - Raspberry PI

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, please add screenshots to help explain your problem.

Additional context
Please feel free to add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants