Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Sensor]: Linptech Pressure Sensor linp.senpres.ps1bb #1367

Closed
yangqian opened this issue Jun 13, 2024 · 10 comments
Closed

[New Sensor]: Linptech Pressure Sensor linp.senpres.ps1bb #1367

yangqian opened this issue Jun 13, 2024 · 10 comments
Assignees
Labels
new sensor Request for a new sensor

Comments

@yangqian
Copy link
Contributor

Sensor Description

Linptech Pressure Sensor

Additional information

BLE KEY: 9b4441bc2505db3c3484bae6b7631b34
MODEL: linp.senpres.ps1bb

Links:
https://home.miot-spec.com/spec/linp.senpres.ps1bb

https://www.aliexpress.com/item/1005006174475704.html

BLE advertisements

MAC: A4:C1:38:0F:D6:9B, ADV: 0e1695fe10594c3f1c9bd60f38c1a4
 MAC: A4:C1:38:0F:D6:9B, ADV: 161695fe48594c3f1dc3f1031c213a340400007e37ccbb
 MAC: A4:C1:38:0F:D6:9B, ADV: 161695fe48594c3f1f2473e91da249ac04000061003083
 MAC: A4:C1:38:0F:D6:9B, ADV: 161695fe48594c3f21f4957fb405c9cf040000d8252537
 MAC: A4:C1:38:0F:D6:9B, ADV: 191695fe58594c3f1e9bd60f38c1a46928e35104000036f77f5c
 MAC: A4:C1:38:0F:D6:9B, ADV: 191695fe58594c3f209bd60f38c1a469308be20400000d1fb1bf
@yangqian yangqian added the new sensor Request for a new sensor label Jun 13, 2024
@yangqian
Copy link
Contributor Author

Will get more data, the last two lines seems to give battery, others seems empty.
"0x34c015e"
"0x34c015f"
0x5f is 95.

@yangqian
Copy link
Contributor Author

Despite it advertise as a BLE device, I did not get any useful packet as quite a long time.
Maybe it is BLE Mesh or requires active connection?

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 14, 2024

No, there is data in there

0e1695fe10594c3f1c9bd60f38c1a4= no data
161695fe48594c3f1dc3f1031c213a340400007e37ccbb gives us a packet of type 483F (Pressure Present Time Set) with value 30 (seconds)
161695fe48594c3f21f4957fb405c9cf040000d8252537 gives us a packet of type 483D ( Pressure Present Duration) with value 7800 (seconds)
191695fe58594c3f1e9bd60f38c1a46928e35104000036f77f5c gives us battery 94%
191695fe58594c3f209bd60f38c1a469308be20400000d1fb1bf gives us battery 95%

I have to check if I can find the script that tells me exactly what 483F en 483D is, but it should be one of the sensors that is in the miot specs

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 14, 2024

Found the script

prop.2.1061 (Pressure Present Duration) uint32 = eid 18493 (0x483d)
prop.2.1060 (Pressure Present State) bool = eid 18492 (0x483c)
prop.2.1062 (Pressure Not Present Duration) uint32 = eid 18494 (0x483e)
prop.2.1064 (Pressure Not Present Time Set) uint32 = eid 18496 (0x4840)
prop.2.1063 (Pressure Present Time Set) uint32 = eid 18495 (0x483f)
evnt.2.1028 (Device Be Reset) = eid 18972 (0x4a1c)
prop.3.1003 (Battery Level) uint8 = eid 19459 (0x4c03)

@yangqian
Copy link
Contributor Author

Thanks. I was not able to decrypt the middle three lines, I used the cipher.decrypt_and_verify(cipherpayload, token) mentioned in the script https://home-is-where-you-hang-your-hack.github.io/ble_monitor/MiBeacon_protocol was only able to decrypt the last two lines.

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 14, 2024

Yes, probably because the data types are not yet in BLE monitor for 483d, 483c etc. will add these, but I also will need to add some new sensors for this, as I don't think we have a Pressure Not Present Duration sensor :-) etc

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 14, 2024

Will add support in #1368

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 14, 2024

You can try 12.12.0-beta for a first test

@yangqian
Copy link
Contributor Author

Thanks for the prompt patch. The beta looks good.

Though I am not sure if the following sensors are useful to home assistant. They seems to be used to trigger automation in mijia but Home assistant do not quite need them. (I can disable them at home assistant any way).
prop.2.1061 (Pressure Present Duration) uint32 = eid 18493 (0x483d) increases one in a while
prop.2.1062 (Pressure Not Present Duration) uint32 = eid 18494 (0x483e) increases one in a while
prop.2.1064 (Pressure Not Present Time Set) uint32 = eid 18496 (0x4840) is always 30
prop.2.1063 (Pressure Present Time Set) uint32 = eid 18495 (0x483f) is always 30

evnt.2.1028 (Device Be Reset) = eid 18972 (0x4a1c) never triggered.
This is not trigger by pressing the button (for pairing purposes).

@Ernst79
Copy link
Collaborator

Ernst79 commented Jun 20, 2024

I can let them be disabled by default. the user can than decide for him/herself to enable these sensors.

@Ernst79 Ernst79 closed this as completed Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new sensor Request for a new sensor
Projects
None yet
Development

No branches or pull requests

2 participants