Skip to content

Added decoder for BPARASITEV2, open source moisture sensor by rbaron - #668

Merged
DigiH merged 5 commits into
theengs:developmentfrom
heisenbergers:add-bparasitev2
Sep 11, 2025
Merged

DigiH merged 5 commits into
theengs:developmentfrom
heisenbergers:add-bparasitev2

Conversation

@heisenbergers

Copy link
Copy Markdown
Contributor

Description:

This PR adds the decoder for b-parasite v2, an open source moisture sensor by rbaron. The updated version of this sensor utilizes the BTHOME v2 format, which does not work with the present BPARASITE decoder in this

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

@DigiH

DigiH commented Sep 10, 2025

Copy link
Copy Markdown
Contributor

Thanks @heisenbergers

Could you also add one or two test cases for future regression testing.

@heisenbergers

Copy link
Copy Markdown
Contributor Author

I'll try and find out which part went wrong with the test, and update it soon :)

Currently, example/ScanAndDecode.py is properly parsing it for me.

DD:45:C9:CC:81:A9:AdvertisementData(local_name='prst', service_data={'0000fcd2-0000-1000-8000-00805f9b34fb': b'@\x01d\x02_\n\x05\x00\x00\x00\x0c\xc8\x0b.3/\x00'}, service_uuids=['0000fcd2-0000-1000-8000-00805f9b34fb'], rssi=-63)

data sent to decoder:  {"servicedatauuid": "fcd2", "servicedata": "400164025f0a050000000cc80b2e332f00", "name": "prst", "id": "DD:45:C9:CC:81:A9", "rssi": -63}

TheengsDecoder found device: {"servicedatauuid":"fcd2","servicedata":"400164025f0a050000000cc80b2e332f00","name":"prst","id":"DD:45:C9:CC:81:A9","rssi":-63,"brand":"rbaron","model":"b-parasite","model_id":"BPv2.0","type":"PLANT","acts":true,"bat":100,"tempc":26.55,"tempf":79.79,"lux":0,"volt":3.016,"hum":51,"moi":0}

@DigiH

DigiH commented Sep 11, 2025

Copy link
Copy Markdown
Contributor

@heisenbergers - I took the liberty to rearrange the decoder properties a bit, for consistency with other decoders. I also added the three test cases you supplied with their respective expected results.

@DigiH
DigiH merged commit 6b553bc into theengs:development Sep 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants