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

[Bug]: HA BLE DIY format - not work two counters #987

Closed
slacky1965 opened this issue Aug 9, 2022 · 7 comments
Closed

[Bug]: HA BLE DIY format - not work two counters #987

slacky1965 opened this issue Aug 9, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@slacky1965
Copy link

What happened?

Hello.

My advertsing payload

0x02010615161C180200010201640509BE0000000509C8000100

0x020106 - LE only
0x15 - size
0x16 - 16-bit UUID
0x1C18 - GAT service User Data
0x020001 - incrementable Packet ID
0x020164 - battery level
0x0509BE000000 - first 32-bit counter
0x0509C8000100 - second 32-bit counter

BLE Monitor finds 1 device and 3 entities.
1 entity - battery level
2 entity - last counter
3 entity - RSSI

How can I get two counters?

Thanks.

Sensor type

HA BLE DIY format

Relevant log output

No response

@slacky1965 slacky1965 added the bug Something isn't working label Aug 9, 2022
@Ernst79
Copy link
Collaborator

Ernst79 commented Aug 9, 2022

Currently it is not possible to have two measurements of the same type. Its on the todo list, but might be that we add it when we move to a core HA integration.

@slacky1965
Copy link
Author

It seems obvious to me. Hot water, cold water.

@Ernst79
Copy link
Collaborator

Ernst79 commented Aug 9, 2022

Yes, it is, but the code on the HA sensor side isnt easy adjustable to create multiple sensors of the same type. It requires some significant changes in the code.

But multiple sensor support of the same type is on the planning, when we move HA BLE to a new official integration. In the meantime, I would use another measurement type as a dummy for the second counter

@slacky1965
Copy link
Author

Which for example, if the counter has 32 bits?

@Ernst79
Copy link
Collaborator

Ernst79 commented Aug 10, 2022

Doesnt matter which one, the number of bits is flexibel. Just pick one with a factor of 1 (not a binary sensor of course) and create a template sensor in HA to remove the unit of measurement

@slacky1965
Copy link
Author

Thanks.

@Ernst79
Copy link
Collaborator

Ernst79 commented Aug 10, 2022

For now, Im closing this issue, as it is a duplicate of #854

@Ernst79 Ernst79 closed this as completed Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants