Hi Floyduww;
Since I posted I spent last night tinkering your program to test. Turns out I had all sorts of environment issues with Python (i’m hopeless with it). I have “more results” with Python3, is that the correct environment for it?
Is there a way to test if I have all the modules loaded?
I can confirm it is receiving the UDP Hex dump, but only when I launch the app. I haven’t seen any other packets coming in but that I suspect is the program crashing.
It appears I get all sorts of python errors, which i’m putting down to either modules not on my machine or the hex data been in the wrong order from the Meater+ hex packet and causing issues.
Hex dump below is;
Meater+ probe
Target Temp 57
Internal 18 (maybe 17)
Ambient: (too low, no reading)
“Sirloin Steak, beef”
(ignore all the extra prints, I was slowly trying to work out the data packet break down, let me know if you need me to remove).
python3 meater_reader_v2.py
-----------------
len(m)=2
len(m[0])=68
len(m[1])=2
('192.168.1.74', 7878)
b'\n\x13\x08\xca\xa8\x01\x10\x0c\x18\x01 \x01)\x9ami\xfa\xf1`\xf8)\x12-\n\x10,\xef\xe77\x91x \xee\x7f}\xdc\xcb\xa1\x16\x11^\x10\x02"\x0eGoogle Pixel 5*\x032.52\x0211'
0a 13 08 ca a8 01 10 0c 18 01 20 01 29 9a 6d 69 fa f1 60 f8 29 12 2d 0a 10 2c ef e7 37 91 78 20 ee 7f 7d dc cb a1 16 11 5e 10 02 22 0e 47 6f 6f 67 6c 65 20 50 69 78 65 6c 20 35 2a 03 32 2e 35 32 02 31 31
power:2
bc is:
50
offset is:
61
probe[offset] is:
61
probe[end] is:
112
probeData is:
b'.52\x0211'
probe[bc] is:
50
probe[data] is:
b'.52\x0211'
probe[batt] is:
0
probe[sig] is:
cook_data_bc is:
50
cook_data is:
b'2\x0211'
probe[cooking] is:
temp_data_start is:
54
temp_data_bc is:
0
temp data[1:3] is:
b''
temp data[4:6] is:
b''
Traceback (most recent call last):
File "meater_reader_v2.py", line 245, in <module>
processPacket(data)
File "meater_reader_v2.py", line 177, in processPacket
probes[1] = probe_data(probe_1_start, theData)
File "meater_reader_v2.py", line 77, in probe_data
probe["m_temp"] = math.floor(toCelsius(convertHex(temp_data[1:3].hex())))
File "meater_reader_v2.py", line 113, in convertHex
incrementor = int(hex[0:2], 16) - 128
ValueError: invalid literal for int() with base 16: ''
Next Hex dump;
Meater+ probe
Target Temp 70degC
Internal 18 degC
Ambient: (too low, no reading)
“Pork Chop”
-----------------
len(m)=2
len(m[0])=68
len(m[1])=2
('192.168.1.74', 7878)
b'\n\x13\x08\xca\xa8\x01\x10\x0c\x18\x01 \x01)\x9ami\xfa\xf1`\xf8)\x12-\n\x10,\xef\xe77\x91x \xee\x7f}\xdc\xcb\xa1\x16\x11^\x10\x02"\x0eGoogle Pixel 5*\x032.52\x0211'
0a 13 08 ca a8 01 10 0c 18 01 20 01 29 9a 6d 69 fa f1 60 f8 29 12 2d 0a 10 2c ef e7 37 91 78 20 ee 7f 7d dc cb a1 16 11 5e 10 02 22 0e 47 6f 6f 67 6c 65 20 50 69 78 65 6c 20 35 2a 03 32 2e 35 32 02 31 31
power:2
bc is:
50
offset is:
61
probe[offset] is:
61
probe[end] is:
112
probeData is:
b'.52\x0211'
probe[bc] is:
50
probe[data] is:
b'.52\x0211'
probe[batt] is:
0
probe[sig] is:
cook_data_bc is:
50
cook_data is:
b'2\x0211'
probe[cooking] is:
temp_data_start is:
54
temp_data_bc is:
0
temp data[1:3] is:
b''
temp data[4:6] is:
b''
Traceback (most recent call last):
File "meater_reader_v2.py", line 245, in <module>
processPacket(data)
File "meater_reader_v2.py", line 177, in processPacket
probes[1] = probe_data(probe_1_start, theData)
File "meater_reader_v2.py", line 77, in probe_data
probe["m_temp"] = math.floor(toCelsius(convertHex(temp_data[1:3].hex())))
File "meater_reader_v2.py", line 113, in convertHex
incrementor = int(hex[0:2], 16) - 128
ValueError: invalid literal for int() with base 16: ''
Thanks for your efforts, this is great!!
Let me know if you need more Hex dumps under different conditions etc!
ta!
Edit; the MQTT is working, I have receiving “off” when the “blockOff” sends/prints