Beehivemonitoring(.com) devices / howto add support

Hi all

I reverse engineered the BLE devices from beehivemonitoring.com (beehive scales, sensors (hive heart, …) here / (GitHub - JoeRu/beehivemonitoring_devices: This is a documentation-project for the very good products of beehivemonitoring.com. It will make you able to get the data from the products wether by reading the BLE with an own BLE device or via API from the data-website.) and would like to add the support of that devices to this project.

I checked the open mqtt repository but find it rather hard to find an example on #howto add code for a device.

Maybe you can give me a hand/ example on that behalf?

1 Like

Hello,

That’s great, I have family that has hives and I would love to help them with this.

The ble decoding of OMG has been externalized into a library so that it can be used by different projects and platform:

To add a decoder:

Here is an example of PR that add a device:

Note that by adding to decoder, the device will be available for OMG(esp) and Theengs Gateway (windows, unix)

And finaly @h2zero just added MQTT2MQTT decoding to Theengs gateway:

So that the python gateway can be leveraged with OMG even if the ESP doesn’t have the device decoder (close to what you have done)

1 Like

Thanks. That’s a lot of read. I’ll give it a try the next weeks.

@JoeRu Very interesting project! Never realised that bee keeping was so technologised already, especially impressed with the Bee Counter :wink:

Will be great to see these devices/sensors included in Theengs Decoder.

Might be an idea to create a topic in the Decoder Discussions for this to bounce some ideas/issues back and forth

1 Like

Hi @JoeRu thanks for this work! I am trying solve the same, but I am not programer. In generall I would like to have some ble gateway idealy on ESP32 and forward info from hive heart to mqtt home assistant.

I was trying to use esphome.io and ble client to collect data, but I am not able to get the data.

I was having trouble with my ESP32 decoding my Amazfit smart watch. It would pull the BLE data ok but it was not being decoded by the ESP32. The HA Add-on worked fine but as I run my main HA off a Pi4 with an SSD Bluetooth can be a bit flaky and the Add-on would need a restart every few hours to keep working.

Now with the MQTT2MQTT decoding to Theengs gateway all I have to do is send the ESP32 undecoded data to topic home/TheengsGateway/commands and the Add-on then decodes it properly.

I do this in NodeRed so its very easily done

image

image

image

1 Like

Hi @BertrumUK,

thanks a lot for the detailed explanation of your solution :slight_smile:

Just out of curiosity, which Amazfit smart watch do you have and which HA Add-on do you use to decode its data?

It might be interesting to include this smart watch directly into Theengs Decoder and therefore allow Theengs Gateway and OpenMQTTGateway decode the data directly for inclusion into HA or any other controller.

Still the same for the original posted Beehivemonitoring, if anyone wants to help providing data for including it into Decoder.

Hello @DigiH,

The HA Add-on is here and I have an Amazfit T-Rex Pro smart(ish) watch. Here is the raw data and the decoded data after I send it over to the Add-on to decode it -

{
    "id": "XXXXXXXXXXX",
    "mac_type": 1,
    "name": "Amazfit T-Rex Pro",
    "manufacturerdata": "570102ffffffffffffffffffffffffffffffff03e94ef28872a2",
    "rssi": -84,
    "servicedata": "fd150000",
    "servicedatauuid": "0xfee0"
}
{
    "id": "XXXXXXXXXXX",
    "mac_type": 1,
    "name": "Amazfit T-Rex Pro",
    "rssi": -84,
    "brand": "Xiaomi",
    "model": "Miband",
    "model_id": "MiBand",
    "steps": 5629
}

As this watch is not fully supported. I only get the steps and not my heart rate, but the steps is the data I actually want

image

LOL, ok, so you’re already using the Theengs Decoder, which is the BLE decoding basis for OpenMQTTGateway, Theengs Gateway, Theengs Explorer and the brand new Theengs App.

Good to know that the Mi Band decoder also is compatible with other Amazfit smart watches. Might be time to update the compatible devices list with that info, thanks.

You might also get the activity heart rate if you turn on its sharing option in the settings of the Zepp Life (previously Mi Fit) app, if it’s the same settings for the Amazfit T-Rex Pro, but the heart rate only shows up when you start a workout.

I still cannot work out why OpenMQTTGateway running “esp32dev-ble-mqtt-decode” on an ESP32 Dev board is not decoding the data for this watch or any of the Govee GVH5102 Thermometers that I have -

Message 85 received on home/OpenMQTTGateway_ESP32_BLE/BTtoMQTT/undecoded at 21:11:
{
    "id": "A4:C1:38:4F:2D:55",
    "mac_type": 0,
    "name": "GVH5102_2D55",
    "manufacturerdata": "010001010384ee57",
    "rssi": -88
}

and decoded by the Add-on -

Message 87 received on home/TheengsGateway/BTtoMQTT/A4C1384F2D55 at 21:11:
{
    "id": "A4:C1:38:4F:2D:55",
    "mac_type": 0,
    "name": "GVH5102_2D55",
    "rssi": -88,
    "brand": "Govee",
    "model": "Smart Thermo Hygrometer",
    "model_id": "H5102",
    "tempc": 23,
    "tempf": 73.4,
    "hum": 63.8,
    "batt": 87
}

Any ideas ?

p.s. Thanks for the heart rate setting - now turned on :grinning:

This particular binary esp32dev-ble-mqtt-decode is actually exactly for this purpose, to send undecoded MQTT messages from, possibly several, ESP32s to a central Theengs Gatway for decoding.

If you want direct decoding on your ESP32 use the esp32dev-ble binary/environment, and you will get the same decoding right on your ESP32, inclusive HA auto discovery, as it uses the same Theengs Decoder.

This then does not require the Theengs Gateway add-on.

1 Like

Thanks for that - I was not 100% sure which binary to use. Will try it next week after I finish my shifts - unable to upload to the ESP32 on a work PC :wink:

A good overview of all the various binaries/environments with some descriptions is given on the web upload page of OpenMQTTGateway

All the best

1 Like