Hey Magma1447,
did you get any further decoding the UDP packets ?
Ive started hacking on the UDP packets, and a little on the BTLE packets also, with the goal of building a BTLE > UDP relay so I can keep my phone on me while cooking
Anyways, if you have any progress please share it !
my code is currently at https://github.com/jaybinks/esp32_meater but its purely just me hacking right now, nothing thats real useful.
@JayBinks Sadly I didn’t really get anywhere. I didn’t manage to figure out the protocol. I am still very interested in it though.
I wonder if Meater would answer an email if one asks for some pointers to their protocol. If one proposes to release an open source plugin for Home Assistant and/or Meater to MQTT it would potentially make their product more interesting to a fairly big crowd. One probably have to sell the idea a bit though.
I would personally be interested in making a diagram in Node-red that posts the data to MQTT. A plugin for Home Assistant would work for me as well.
If you figure out the protocol, I will pick up where I left my stuff again. I will take a look at your repo to see where you are.
@JayBinks I notice that you remove your repository. Did you get anywhere?
It sounds reasonable that the udp packages would use protocol buffers, but I can’t manage to parse them. Maybe I don’t have knowledge enough of protocol buffers since I have never used it myself, but I had the idea that maybe it was prefixed with some other data. I therefore tried to parse it with different offsets.
There are a very few bytes that changes when I try to affect the temperature of the probe. It’s actually only 3-4 bytes that changes and I assume 1-2 of those are temperature. I don’t have imagination enough to turn it into a value though. Also I find them changing too much. My wild guess is that there is also some form of counter or timestamp being sent.
I have another idea of approach. If one enables Cloud for the Meater, it sends the data to an MQTT server on the Internet. Why not just subscribe to that one?
It uses TLS though, and if I understand it correctly I need an authorized client certificate. That sounds like something I should be able to extract from the APK? But I can’t find it. Maybe my knowledge about Android is too low.
I have my Meater+ working with Home Assistant and am currently building a Docker image for my current solution which I will also test with the Meater Block. Alongside this, I am writing an ESPHome integration.
The meater is looking more and more like my father’s day gift this year. How do you like it so far? I’d be interested in testing out your integration if and when I get it. Is it communicating locally with HA or hitting meater’s cloud?
It would be a fantastic fathers day gift. I’ve just got my Meater Block up and running too.
I’m using a Raspberry Pi and a modified version of nathanfaber/meaterble python script to connect to the Meater probe locally, due to this the app won’t work due to the connection limitation. I then pass this data over MQTT. The long term goal would be to work with Meater to make an official integration that allows you to still use their app but still be able to receive tip and ambient temperature in Home Assistant.
Sorry folks, it will be back, but I did hide it.
I just have to tidy up some bits before I put it public again, ill try and do that today.
Im happy to discuss / share what ive found.
But it is 100% protocol buffers, I’ve managed to reverse engineer the proto file sufficiently to send and receive discovery and update packets. in fact I almost have a fully functional esp32 solution, that connects to the probes over BT and sends the data over UDP to your phone (on WIFI).
MQTT to their cloud would be nice, but im trying to navigate away from any potential legal minefields, and I feel like extracting certificates from the APK, and connecting to their cloud is a little more next level. Im much more comfortable reverse engineering unencrypted UDP packets and emulating that protocol.
Regarding using their MQTT. In the end I realized they didn’t have self-signed certificates, I just failed to use my MQTT client correctly with SSL. I have only used it on LAN before and haven’t cared about SSL. This works just fine:
My issue is that I can’t figure out from the code which topics they use. They use some form of unique ID per device/account, and I can’t manage to follow the code to understand it. I have tried everything that looked unique on the stickers of my device without success.
Subscribing to wildcards seems to be disabled, because that surely doesn’t work. If just subscribing to topic test, and then making a publish to that topic, it sure works.
But. If I am not wrong, it’s publishing the same packages to MQTT as it sends via UDP/BT anyway. So the understanding of the protocol is needed regardless. I haven’t been able to confirm this yet though. But, it opens up for three variants to get the same data:
UDP
BT
WAN MQTT
To me Bluetooth is the least attractive option, due to the range issues. I also find it less interesting when using Meater Block.
I was able to reverse the probe temperature but I am having a time with the ambient/grill temperature. I used a BLE sniffer to capture the communication between my Meater and an iPhone. Bytes 0 and 1 appear to be a little-endian 16 bit Integer. Here is a Wireshark capture value from yesterday Value: 9e01240009000800. 9E01 decodes to 414.
From the Android decompile I pulled the code
public static int toFahrenheit(int i) {
return ((((i * 9) + 3) / 5) / 16) + 32;
}
Awesome, you beat me too it - Just received mine today and had already started looking at reverse engineering the BLE - want to integrate it into my home automation system. I have started listening to your github thread…