Closed ewaldc closed 1 year ago
The Python package can be built by running pip install .
from the repository's python
directory. We would be happy to accept a pull request adding support for the TP357S.
Thanks for this lighning fast response! I was able to rebuild the python package :-). It's getting late here, will test this weekend and report back.
Hi @ewaldc,
Thanks a lot for the update on the ThermoPro TP357S.
Is it just a hardware revision update, or a totally new model? I can't seem to find any info on the TP357S. Do you have any link?
I forked the repo and made the necessary changes to TPTH_json.h (basically just adding the TP357S in the logical OR condition)
The already existing model condition
"name", "index", 0, "TP357", …
should work fine with even the TP357S, as there is only the additional S trailing it, but the manufacturerdata you quoted above is one octet longer, so I changed the AND model condition to
… "&", "manufacturerdata", ">=", 12, "index", 0, "c2"
to also catch the 14 long TP357S manufacturerdata.
You can give this change a test with the branch
https://github.com/DigiH/decoder/tree/TP357S
Leaving the docs unchanged until it is clearer if this is a separate new model or a hardware revsion of the TP357.
Thanks
Super, will test today. Externally, the TP357 and TP357S look exactly the same, to the point that the TP357S mentions TP357 as product number. So I guess it's just a HW revision. I did my best to try to fix it myself, but it would have taken an extra day or so. I had already discovered the scananddecode
app and concluded that it's just a decoder issue.
I took the quick route and just modified the one file changed. ScanAndDecode results look outstanding:
F9:FA:46:4A:09:15:AdvertisementData(local_name='TP357S (0915)', manufacturer_data={52674: b'\x00>"\x0b\x01'}, rssi=0)
data sent to decoder: {"manufacturerdata": "c2cd003e220b01", "name": "TP357S (0915)", "id": "F9:FA:46:4A:09:15", "rssi": 0}
TheengsDecoder found device: {"manufacturerdata":"c2cd003e220b01","name":"TP357S (0915)","id":"F9:FA:46:4A:09:15","rssi":0,"brand":"ThermoPro","model":"TH Sensor","model_id":"TP35X/393","type":"THB","cidc":false,"acts":true,"tempc":20.5,"tempf":68.9,"hum":62}
{"properties":{"tempc":{"unit":"°C","name":"temperature"},"hum":{"unit":"%","name":"humidity"}}}
brand: ThermoPro , model: TH Sensor
Also in MQTTExplorer the messages are coming through perfectly, with RSSI being non zero most of the time also. Just need to figure out how to build it for ARM Linux, as I run it normally on a RPI 3 and Orange Pi 5+.
Problem solved in a record time :-)
Thanks for the verification @ewaldc
Merging into the Theengs Decoder development branch …
If any reaming build queries remain please open a discussion for Theengs Decoder or Theengs Gateway.
@ewaldc
BTW, if you have some time and feel like taking a picture of your TP357S ("the TP357 and TP357S look exactly the same") on a white background and would allow us to use it in our Decoder compatibility listing, that would be great.
You could just post the image here in the thread and we can include it in the docs.
Thanks
Is your feature request related to a problem? Please describe. ThermoPro has replaced the TP357 by the TP357S, which is recognized only as a generic device and as such no temperature/humidity is being reported. I forked the repo and made the necessary changes to TPTH_json.h (basically just adding the TP357S in the logical OR condition) and was able to recompile the decoder library, but not to regenerate the python package (there is not much info on how to do that). I managed to create a new EGG file once, but subsequent builds failed (MSVC compiler complains about missing stddef.h or some scikit-build integration issue) Manufacturing data produced by the TP357S:
Other than this the gateway solution is working flawlessly (created a Systemd service on RPI4 in combination with OpenHab) - congratulation on this great project !
Describe the solution you'd like I am happy to contribute with a pull request, but I would need to be able to build and test the python package first. Any hints appreciated. Alternatively, if the development team is willing to add TP357S support directly, this is even a better solution :-).
Describe alternatives you've considered
Thanks in advance, Ewald