Closed HolgerAusB closed 3 months ago
the car is back and it happend again, after 136 pkts of ordinary weather data, rt_watch stopped working with receiving this block. The UI didn't show TPMS data.
2024-08-13T09:22:25+0200 rtl/event {"time":"1723533745","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060030","id":"4CF757","pressure_kPa":180.0,"temperature_C":31.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.92544,"rssi":-7.56236,"snr":9.75311,"noise":-17.3155}
2024-08-13T09:22:26+0200 rtl/event {"time":"1723533745","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060030","id":"4CF757","pressure_kPa":180.0,"temperature_C":31.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.92614,"rssi":-7.94629,"snr":9.14641,"noise":-17.0927}
2024-08-13T09:22:26+0200 rtl/event {"time":"1723533745","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060030","id":"4CF757","pressure_kPa":180.0,"temperature_C":31.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.92474,"rssi":-7.64479,"snr":8.27727,"noise":-15.9221}
2024-08-13T09:22:26+0200 rtl/event {"time":"1723533745","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060030","id":"4CF757","pressure_kPa":180.0,"temperature_C":31.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.9225,"rssi":-7.73668,"snr":8.89302,"noise":-16.6297}
2024-08-13T09:22:26+0200 rtl/event {"time":"1723533746","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060030","id":"4CF757","pressure_kPa":180.0,"temperature_C":31.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.92675,"rssi":-7.96616,"snr":8.9536,"noise":-16.9198}
2024-08-13T09:22:26+0200 rtl/event {"time":"1723533746","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060030","id":"4CF757","pressure_kPa":180.0,"temperature_C":31.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.92694,"rssi":-7.61867,"snr":9.54243,"noise":-17.1611}
...and it is happening without the -t
for TPMS as well
I don’t think it’s the TPMS entry causing the problem, but I’ll run your examples through my code to see if it chokes on one of the JSON fields. I’ve seen Schrader TPMS entries in my analyses in the past and without the program freezing, but it’s possible that my program is choking on one of the JSON fields being something I hadn’t anticipated.If you have access to the rtl_433 log file, can you check to see a few of the entries before and after the time mark “1723533746”? If you can, please copy and email them to me. Thanks for checking!Sent from my iPadOn Aug 13, 2024, at 6:35 AM, Holger @.***> wrote: ...and it is happening without the -t for TPMS as well
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
Maybe it is because of 6 packets within ~1 second?
Logs were not previously activated. So here is a new example. Last entry on rtl_watch was at 2024-08-13 15:19:26 in UTC+2 = epoch 1723555166
rtl-433 JSON log:
{"time" : "1723555142", "protocol" : 20, "model" : "Ambientweather-F007TH", "id" : 55, "channel" : 2, "battery_ok" : 1, "temperature_C" : 35.444, "humidity" : 43, "mic" : "CRC", "mod" : "ASK", "freq" : 433.902, "rssi" : -0.129, "snr" : 15.855, "noise" : -15.985}
{"time" : "1723555159", "protocol" : 55, "model" : "Acurite-606TX", "id" : 245, "battery_ok" : 1, "temperature_C" : 25.800, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.888, "rssi" : -0.129, "snr" : 16.416, "noise" : -16.545}
{"time" : "1723555166", "protocol" : 112, "model" : "AmbientWeather-TX8300", "id" : 122, "channel" : 1, "battery" : 2, "temperature_C" : 35.300, "humidity" : 47, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.916, "rssi" : -0.242, "snr" : 15.795, "noise" : -16.038}
{"time" : "1723555179", "protocol" : 95, "model" : "Schrader-EG53MA4", "type" : "TPMS", "flags" : "4c060040", "id" : "0C0686", "pressure_kPa" : 190.000, "temperature_C" : 36.667, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.912, "rssi" : -5.373, "snr" : 10.529, "noise" : -15.901}
{"time" : "1723555180", "protocol" : 95, "model" : "Schrader-EG53MA4", "type" : "TPMS", "flags" : "4c060040", "id" : "0C0686", "pressure_kPa" : 190.000, "temperature_C" : 36.667, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.914, "rssi" : -5.640, "snr" : 10.538, "noise" : -16.178}
{"time" : "1723555180", "protocol" : 95, "model" : "Schrader-EG53MA4", "type" : "TPMS", "flags" : "4c060040", "id" : "0C0686", "pressure_kPa" : 190.000, "temperature_C" : 36.667, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.909, "rssi" : -5.401, "snr" : 10.968, "noise" : -16.369}
{"time" : "1723555180", "protocol" : 95, "model" : "Schrader-EG53MA4", "type" : "TPMS", "flags" : "4c060040", "id" : "0C0686", "pressure_kPa" : 190.000, "temperature_C" : 36.667, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.911, "rssi" : -5.203, "snr" : 11.132, "noise" : -16.335}
{"time" : "1723555180", "protocol" : 95, "model" : "Schrader-EG53MA4", "type" : "TPMS", "flags" : "4c060040", "id" : "0C0686", "pressure_kPa" : 190.000, "temperature_C" : 36.667, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.910, "rssi" : -5.685, "snr" : 11.408, "noise" : -17.093}
{"time" : "1723555180", "protocol" : 95, "model" : "Schrader-EG53MA4", "type" : "TPMS", "flags" : "4c060040", "id" : "0C0686", "pressure_kPa" : 190.000, "temperature_C" : 36.667, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.913, "rssi" : -5.568, "snr" : 11.123, "noise" : -16.691}
{"time" : "1723555190", "protocol" : 55, "model" : "Acurite-606TX", "id" : 245, "battery_ok" : 1, "temperature_C" : 25.800, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.887, "rssi" : -0.117, "snr" : 16.909, "noise" : -17.025}
{"time" : "1723555199", "protocol" : 20, "model" : "Ambientweather-F007TH", "id" : 55, "channel" : 2, "battery_ok" : 1, "temperature_C" : 35.444, "humidity" : 43, "mic" : "CRC", "mod" : "ASK", "freq" : 433.904, "rssi" : -0.136, "snr" : 15.923, "noise" : -16.059}
{"time" : "1723555221", "protocol" : 55, "model" : "Acurite-606TX", "id" : 245, "battery_ok" : 1, "temperature_C" : 25.800, "mic" : "CHECKSUM", "mod" : "ASK", "freq" : 433.890, "rssi" : -0.139, "snr" : 16.150, "noise" : -16.290}
and here is the corresponding output of mosquitto_sub:
2024-08-13T15:19:02+0200 rtl/event/Pi5 {"time":"1723555142","protocol":20,"model":"Ambientweather-F007TH","id":55,"channel":2,"battery_ok":1,"temperature_C":35.44445,"humidity":43,"mic":"CRC","mod":"ASK","freq":433.90208,"rssi":-0.12941,"snr":15.85529,"noise":-15.9847}
2024-08-13T15:19:20+0200 rtl/event/Pi5 {"time":"1723555159","protocol":55,"model":"Acurite-606TX","id":245,"battery_ok":1,"temperature_C":25.8,"mic":"CHECKSUM","mod":"ASK","freq":433.88797,"rssi":-0.12941,"snr":16.41573,"noise":-16.5451}
2024-08-13T15:19:27+0200 rtl/event/Pi5 {"time":"1723555166","protocol":112,"model":"AmbientWeather-TX8300","id":122,"channel":1,"battery":2,"temperature_C":35.3,"humidity":47,"mic":"CHECKSUM","mod":"ASK","freq":433.91571,"rssi":-0.242283,"snr":15.79531,"noise":-16.0376}
2024-08-13T15:19:40+0200 rtl/event/Pi5 {"time":"1723555179","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C0686","pressure_kPa":190.0,"temperature_C":36.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.91206,"rssi":-5.3727,"snr":10.52868,"noise":-15.9014}
2024-08-13T15:19:40+0200 rtl/event/Pi5 {"time":"1723555180","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C0686","pressure_kPa":190.0,"temperature_C":36.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.91421,"rssi":-5.64015,"snr":10.53807,"noise":-16.1782}
2024-08-13T15:19:40+0200 rtl/event/Pi5 {"time":"1723555180","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C0686","pressure_kPa":190.0,"temperature_C":36.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.90925,"rssi":-5.4011,"snr":10.96818,"noise":-16.3693}
2024-08-13T15:19:40+0200 rtl/event/Pi5 {"time":"1723555180","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C0686","pressure_kPa":190.0,"temperature_C":36.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.9111,"rssi":-5.20254,"snr":11.13241,"noise":-16.3349}
2024-08-13T15:19:40+0200 rtl/event/Pi5 {"time":"1723555180","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C0686","pressure_kPa":190.0,"temperature_C":36.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.9095,"rssi":-5.68507,"snr":11.40763,"noise":-17.0927}
2024-08-13T15:19:40+0200 rtl/event/Pi5 {"time":"1723555180","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C0686","pressure_kPa":190.0,"temperature_C":36.66667,"mic":"CHECKSUM","mod":"ASK","freq":433.91347,"rssi":-5.56791,"snr":11.12322,"noise":-16.6911}
2024-08-13T15:19:51+0200 rtl/event/Pi5 {"time":"1723555190","protocol":55,"model":"Acurite-606TX","id":245,"battery_ok":1,"temperature_C":25.8,"mic":"CHECKSUM","mod":"ASK","freq":433.88688,"rssi":-0.116863,"snr":16.9085,"noise":-17.0254}
2024-08-13T15:19:59+0200 rtl/event/Pi5 {"time":"1723555199","protocol":20,"model":"Ambientweather-F007TH","id":55,"channel":2,"battery_ok":1,"temperature_C":35.44445,"humidity":43,"mic":"CRC","mod":"ASK","freq":433.90416,"rssi":-0.135967,"snr":15.92297,"noise":-16.0589}
2024-08-13T15:20:22+0200 rtl/event/Pi5 {"time":"1723555221","protocol":55,"model":"Acurite-606TX","id":245,"battery_ok":1,"temperature_C":25.8,"mic":"CHECKSUM","mod":"ASK","freq":433.88976,"rssi":-0.139252,"snr":16.15034,"noise":-16.2896}
I hope you meant the logs from rtl-433 and not from rtl_watch? Does rtl_watch create a log? Where can I find it?
Here a screenshot part after the freeze. The first three weather sensors are mine and read well. The Kedsum is not my sensor, but obviously that does not make problems too.
I did another test. I manually injected the json event with mosquitto_pub.
"type":"TPMS"
the Schrader line does not causing a freeze anymore. I tried to remove other keys with no success."type":"TPMS"
to one of my other temperature sensors, rtl_watch freezes.And just a different car with freeze:
{"time" : "1723562707", "protocol" : 90, "model" : "Renault", "type" : "TPMS", "id" : "ec6ef9", "flags" : "36", "pressure_kPa" : 220.500, "temperature_C" : 29.000, "mic" : "CRC", "mod" : "FSK", "freq1" : 433.954, "freq2" : 433.883, "rssi" : -7.233, "snr" : 10.183, "noise" : -17.417}
I am not really a dev, but found two problems in the code:
-t
or --include_TPMS
, so the condition in line 697 will always match if y["type"]=="TPMS"
return
seems to be stopping the mqtt listener threat permanently, which looks like a freeze. That also happens with the previous condition, if "model" key is missing in the payload,Maybe that is because of python 3.10 or MS Windows 11?
When #deactivating lines 697+698 everything works
Good Morning,
I've looked at the code again, and I can see no reason why those two lines, which simply exclude or include TPMS records in the analysis, would cause a freezing of the display. And the '-t' switch really did turn off/on the recording of TPMS packets on my systems. I don't get many TPMS readings in our new home, but I'll turn them on again tomorrow morning to see if I get anything. But I'm increasingly suspicious of a Python 3.10 -- 3.12 issue.
In the meantime, I've continued work on v4.0, which incorporates HTTP streaming as an option for the connection to the rtl_433 server. But I also installed a little more checking on the incoming packets to try to make sure that the data received can be processed correctly. In all my testing so far, I hadn't seen any issues, but I have only a few devices in my neighborhood, and I'm sure that in the "real world" there are many more opportunities to be receiving malformed data. I've tried to manage around that.
So you should be able to run v4.0 in the same way you have been using it with MQTT (no changes needed on your end), and if it's having trouble with some of the data packets, it should be able to tell you more about the problems.
The new version is still in development, but it provides exactly the same functionality as the prior version, just with an HTTP option for connecting and a little more data checking. You can get it by "git clone -b v4.0.0 http://github.com/hdtodd/rtl_watch" (best to start in a clean directory so you don't overwrite the prior version). I've only tested this on Mac OSX so far, but I'll try it out tomorrow on the Pi.
Please let me know if you see any improvement in reliability.
David
On 8/13/24 3:17 PM, Holger wrote:
I am not really a dev, but found two problems in the code:
- variable 'noTPMS' is allways True and is not beeing changed by |-t| or |--include_TPMS|, so the condition in line 697 https://github.com/hdtodd/rtl_watch/blob/d075d749b0dab0e3a3d48278d9320b8039f893e3/rtl_watch#L697C1-L698C23 will always match if |y["type"]=="TPMS"|
- the resulting |return| seems to be stopping the mqtt listener threat permanently, which looks like a freeze.
Maybe that is because of python 3.10 or MS Windows 11?
When #deactivating lines 697+698 everything works
— Reply to this email directly, view it on GitHub https://github.com/hdtodd/rtl_watch/issues/9#issuecomment-2286962612, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJWBXCSPFORICWO5UTUDNLZRJLVTAVCNFSM6AAAAABMNTDNI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBWHE3DENRRGI. You are receiving this because you commented.Message ID: @.***>
You were absolutely right!
I missed setting TPMS as a global in the parser, so it was always "True" in the processing module.
Now fixed in v4.
Thanks for your persistence and insights.
David
On 8/13/24 3:17 PM, Holger wrote:
I am not really a dev, but found two problems in the code:
- variable 'noTPMS' is allways True and is not beeing changed by |-t| or |--include_TPMS|, so the condition in line 697 https://github.com/hdtodd/rtl_watch/blob/d075d749b0dab0e3a3d48278d9320b8039f893e3/rtl_watch#L697C1-L698C23 will always match if |y["type"]=="TPMS"|
- the resulting |return| seems to be stopping the mqtt listener threat permanently, which looks like a freeze.
Maybe that is because of python 3.10 or MS Windows 11?
When #deactivating lines 697+698 everything works
— Reply to this email directly, view it on GitHub https://github.com/hdtodd/rtl_watch/issues/9#issuecomment-2286962612, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJWBXCSPFORICWO5UTUDNLZRJLVTAVCNFSM6AAAAABMNTDNI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBWHE3DENRRGI. You are receiving this because you commented.Message ID: @.***>
seems to be O.K. now in 4.0.0 branch. Tried it with and without option -t
and injected a TPMS line via mosquitto_pub and rtl_watch now is continuing to read and count the following live data from other servers.
Thank you.
Hi,
it is very rare in my neighborhood, that I receive TPMS wheel data. But today when starting my tests, I got freezes two times, just after my third receive of weather sensors. In both cases the fourth rtl event was an TPMS event. The car was gone after the second test.
I started rtl_watch 3.0.1 (python 3.10 on windows 11) with parameters
-t -d
The console debug ends with the third temperature sensor. So no hint in there.
this is the mqtt message, which might cause the problem:
raw:
{"time":"1723531213","protocol":95,"model":"Schrader-EG53MA4","type":"TPMS","flags":"4c060040","id":"0C05DE","pressure_kPa":205.0,"temperature_C":32.22223,"mic":"CHECKSUM","mod":"ASK","freq":433.91232,"rssi":-0.129955,"snr":16.34398,"noise":-16.4739}
I do not really need the -t parameter right now, but I might try to use this for some presence things with my next car in the future, which could have 433MHz tires sensors