You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question
Can I can break a a single characteristic into multiple values?
Additional context
There are a few other projects that handle reading Airthings devices over BLE on ESP32's or rPis's (ESPHome, AirthingsMQTT, WavePlus Bridge to name a few) but I'm hoping to use esp32-blemqtt as Im already using it for other BLE devices in my house.
The problem Im having is that airthings seems to spit all the information out in one Bluetooth characteristic, and I have no idea how, if I can, split that up so they each show up in MQTT as a different value.
Can this be done, or do I just need to have something else like HA/Node Red convert the string into useful values. I believe the string is is structured like so:
uint8_t version;
uint8_t humidity; # X/2 for humidity in %
uint8_t ambientLight;
uint8_t unused01;
uint16_t radon; # Bq/m³
uint16_t radon_lt; # Bq/m³
uint16_t temperature; # X/100 for C
uint16_t pressure; #X/50 for hPa
uint16_t co2; # ppm
uint16_t voc; # ppm
The configuration you're using is, pretty much, what can be done right now.
I'm using Home Assistant to extract the comma-separated values with something like what's described here.
I can thing of two options to make things easier. The first is to add a characteristic value type of ignore or something that will just skip that byte. An alternative is to add a split field to the characteristic definition that will tell the application to split all values to separate MQTT topic which will probable be something like <MAC Address>/<service>/<characteristic>/X where X will be 1, 2, etc. for each value that's read. Not sure how to tackle get or set requests with this method. I can get the entire characteristic and then all values will be published but I can't do a partial set...
Question
Can I can break a a single characteristic into multiple values?
Additional context
There are a few other projects that handle reading Airthings devices over BLE on ESP32's or rPis's (ESPHome, AirthingsMQTT, WavePlus Bridge to name a few) but I'm hoping to use esp32-blemqtt as Im already using it for other BLE devices in my house.
The problem Im having is that airthings seems to spit all the information out in one Bluetooth characteristic, and I have no idea how, if I can, split that up so they each show up in MQTT as a different value.
Can this be done, or do I just need to have something else like HA/Node Red convert the string into useful values. I believe the string is is structured like so:
Here the relevant parts of my current config.json
And heres a sample value currently being sent over MQTT:
1,139,14,0,8,0,50,0,146,6,215,189,226,1,122,0,0,0,222,3
The text was updated successfully, but these errors were encountered: