logo elektroda
logo elektroda
X
logo elektroda

Connecting OpenBeken Device to ThingsBoard: MQTT Configuration Issues

qrmonzergamal 555 4
ADVERTISEMENT
  • #1 21243567
    qrmonzergamal
    Level 2  
    hello,
    i want to connect openbeken device with thingsboard,
    i entered mqtt configuration and shown in thingsboard is the device is online but it didn't receive any data from openbeken device,
    anyone can help me?
  • ADVERTISEMENT
  • #2 21243950
    p.kaczmarek2
    Moderator Smart Home
    Hello. what kind of MQTT format do you need?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21243980
    qrmonzergamal
    Level 2  
    >>21243950 when I enter topic [ v1/devices/me/telemetry] in openbeken mqtt configuration the topic automatically changed to [v1/devices/me/telemetry/[Channel]/get] ,,
    the data can't reach thingsboard ,, is there any command that remove [/get] from automatic adding ?
  • ADVERTISEMENT
  • #4 21244048
    p.kaczmarek2
    Moderator Smart Home
    Ah, I see how this can be a problem! We didn't have a flag for that, but I've just created one for you. I didn't have time to test it yet, so maybe you can give it a try and tell me if it's working for you? Just wait for next release to build and do OTA. Then, you need to enable "never add get sufix" in flags.
    Here's my change:
    https://github.com/openshwprojects/OpenBK7231...mmit/94f370ba8a71fc43c00184072326b93d538bb480
    On a side note, can you tell me more about that ThingsBoard, what it is and how it looks like? Maybe once we get it working for you, you could make some screenshots and make a short "tutorial" telling how to pair OBK with it?
    Helpful post? Buy me a coffee.
  • #5 21244440
    qrmonzergamal
    Level 2  
    >>21244048 sure thingsboard is an iot platform ,, i will write post about it after my project finish,,
    i still have problem that thingsboard didn't receive data ,, the only data i received is STATE ,, i don't know what is the problem ,, i tried to write esp32 code with arduino code to test if the thingsboard works ,, and it works with arduino code ,, Screenshot of MQTT logs showing data publishing.

    Added after 10 [minutes]:

    >>21244440 i think the problem is in how the openbeken publishing individual values and in the use of the topic v1/devices/me/telemetry. For ThingsBoard, all telemetry data should be sent as a JSON object to the single topic v1/devices/me/telemetry rather than individual topics for each value.
    To fix this, i think :
    - Publish all the values together as one JSON payload to the correct telemetry topic (v1/devices/me/telemetry).
    - Avoid appending additional parts like /voltage or /battery to the telemetry topic. Everything should be sent as a single message.

    can u help me with that ?

    Added after 3 [hours] 57 [minutes]:

    >>21244440 Screenshot of MQTT logs showing errors when publishing telemetry data. there are some error i don't know how to fix it
ADVERTISEMENT