OMG not Decoding BlueCharm BC04P KSensor

Hi, I just installed OMG via the web installer using the esp32-lolin32lite-ble image. I believe to have it configured appropriately and see beacon data through mqtt explorer. I am trying to view the voltage of my Blue Charm BC04P beacons that I configured with KSensor per your instructions. Next steps would be for me to add this configuration to Home Assistant.

here is what is showing up

“id”: “DD:34:02:0B:17:E4”,
“mac_type”: 1,
“adv_type”: 0,
“name”: “BCPro_203246”,
“rssi”: -42,
“servicedata”: “21000b0bea15400004fff4fffc”,
“servicedatauuid”: “0xfeaa”
“servicedata”: “690100000000”,
“servicedatauuid”: “0x2080”

I was expecting additional fields that would contain temperature, acceleration x/y/z-axis, voltage.

I see that information broadcast if I open the KBeacon app on my phone so I am assuming the beacon is acting appropriately.

Did I miss something that needs to be configured? I am open to test any ideas.

I appreciate any feedback.

Hi @joeyfastbike

Yes, there seem to be a slight difference in your servicedata which makes Theengs Decoder not recognise it as a BlueCharm beacon. Likely due to some newer firmware or possible some setting of the beacon through its app.

I will submit a fix for this amended servicedata, which should be available in the development version of OpenMQTTGAteway in the next days. You should then see the following for your above sample data

{
  "brand": "BlueCharm",
  "model": "Beacon 08/04P/021",
  "model_id": "KSensor",
  "type": "ACEL",
  "track": true,
  "tempc": 21.25,
  "tempf": 70.25,
  "accx": 4,
  "accy": -12,
  "accz": -4,
  "volt": 3.05
}

@joeyfastbike

Can you create your own build with PlatformIO? Then you could immediately test out the fix.

Thanks for the quick reply, Interesting, I will try to follow the instructions for installing via PlatformIO and report back.

When you do install via PlatformIO make sure you to change the line

decoder = https://github.com/theengs/decoder.git#development

to

decoder = https://github.com/DigiH/decoder.git#ksensor

in platformio.ini so that you get the amended BC04P decoder to test.

I appreciate your help and am happy to report its working.

{
“id”: “DD:34:02:0B:17:E4”,
“name”: “BCPro_203246”,
“rssi”: -59,
“brand”: “BlueCharm”,
“model”: “Beacon 08/04P/021”,
“model_id”: “KSensor”,
“type”: “ACEL”,
“tempc”: 19.25,
“tempf”: 66.65,
“accx”: 8,
“accy”: -12,
“accz”: -40,
“volt”: 3.05
“rssi”: -59
}

1 Like

Hello @DigiH,

First off, huge cudos for maintaining this. I have so many use cases for it. I also am having problems decoding the ksensor data using the lastest development build similar to what @joeyfastbike was experiencing. I am inspecting the json in MQTT Explorer and all I am seeing is undecoded service data.

I have built the code using the latest development branch but the the #ksensor branch has does not seem to exist anymore for the decoder. Has the decoder for ksensor and the BC04 been released to the main development branch? Thanks in a advance and again for you contributions to this great project.

Todd

Welcome @theadlee,

Yes, the changes have been submitted to the Decoder development branch the day @joeyfastbike confirmed its functionality.

So you are building with the development branch of OMG which has the link to the Decoder development branch, correct?

If this doesn’t your BlueCharm, could you post the undecoded message you are receiving? To see if some other differences are preventing yours from being decoded correctly.

@DigiH,

Thanks so much for the quick reply. What is confusing me is the reference to an older decoder version (1.8.0) when looking at the platform.ini from the latest release 1.8.1 of OMG. Below is what I am seeing.

decoder = https://github.com/theengs/decoder.git#v1.8.0

I tried doing a build by using the v1.8.5 version of the decoder and it still does not do the decoding properly. The date on this release is January 23rd, with is before your discussions about a fix for joeyfastbike. Apologies, I am not a professional developer.

Hi @theadlee

You seem to be building from the 1.8.1 source and not the development source, but don’t worry, just change

decoder = https://github.com/theengs/decoder.git#v1.8.0

to

decoder = https://github.com/theengs/decoder.git#development

and all should be fine.

If your BlueCharm is then still not decoded it means it requires a different fix

@DigiH,

You are correct, I was building off the wrong source. Once that was corrected I am getting values for all the ksensors now. Thanks so much.

Todd