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

Accuracy of entities #14

Open
dsoiM opened this issue Oct 9, 2024 · 12 comments
Open

Accuracy of entities #14

dsoiM opened this issue Oct 9, 2024 · 12 comments

Comments

@dsoiM
Copy link

dsoiM commented Oct 9, 2024

The armotube provides one decimal accuracy in the app, but this HACS entities round to integer, no matter if I set the display values contain decimals. Is this a bug?

@dsoiM
Copy link
Author

dsoiM commented Oct 9, 2024

Screenshot_20241009-201204
Screenshot_20241009-201242

@natekspencer
Copy link
Owner

There is a configuration option to poll the device for improved accuracy. Otherwise it just listens for advertisements from the device which has the lower granularity.

@dsoiM
Copy link
Author

dsoiM commented Oct 10, 2024

Ok I found the setting in config and enabled it, but it had no effect on any of the stats. I can see that in the charts that PM readings are accurate, but temperature is not. I reloaded the integration and deleted + re-added the device, did not change anything. I have a feeling that the advertisements overwrite the polled results, as i saw the reading to be accurate for a glimpse, and also the charts would indicate that
image

image

@dsoiM
Copy link
Author

dsoiM commented Oct 10, 2024

Seeing debug logs:
2024-10-10 09:09:24.210 DEBUG (MainThread) [custom_components.atmo.pyatmo] CA:FB:D9:65:B1:37: BME280 data: 3813b08501008a07, humidity: 56, temperature: 19, pressure: 99760, temperature_extended: 19.3
2024-10-10 09:09:24.841 DEBUG (MainThread) [custom_components.atmo.pyatmo] CA:FB:D9:65:B1:37: PM data: 8700003c0100170200060100, pm1: 1.35, pm25: 3.16, pm10: 5.35, pm4: 2.62

Yepps they are gathered as expected, but also the advertised ones are coming in:

2024-10-10 09:09:27.531 DEBUG (MainThread) [custom_components.atmo.pyatmo] CA:FB:D9:65:B1:37: pm1: 1.0, pm25: 3.0, pm10: 5.0, firmware: 74051E
2024-10-10 09:09:30.872 DEBUG (MainThread) [custom_components.atmo.pyatmo] CA:FB:D9:65:B1:37: Parsing Atmo BLE advertisement data
2024-10-10 09:09:30.873 DEBUG (MainThread) [custom_components.atmo.pyatmo] CA:FB:D9:65:B1:37: Parsing Atmo sensor: 65535 001d1a6c3813000185b54164
2024-10-10 09:09:30.873 DEBUG (MainThread) [custom_components.atmo.pyatmo] CA:FB:D9:65:B1:37: voc: 29, device_id: 1a6c, humidity: 56, temperature: 19, pressure: 99765, info_byte: 1000001, battery: 100, pm_on: True, error: False, bonded: False, charging: False, timer: False, voc_ready: True

Should the polling disable the advertisement gathering altogether?

@natekspencer
Copy link
Owner

It probably should, or at least ignore some portion of it. I admittedly don't use the polling because I had limited active bluetooth slots available. I'll have to see what I can do for it.

@natekspencer
Copy link
Owner

@dsoiM can you try version 0.1.5?

@dsoiM
Copy link
Author

dsoiM commented Oct 11, 2024

I think that's fixed it! Great. Thank you

@dsoiM dsoiM closed this as completed Oct 11, 2024
@dsoiM dsoiM reopened this Oct 11, 2024
@dsoiM
Copy link
Author

dsoiM commented Oct 11, 2024

Actually I there might be some issue still.. seems that the temp caps at nearest int when going up, but allows decimals when going down.. let me troubleshoot a bit

@dsoiM
Copy link
Author

dsoiM commented Oct 12, 2024

Look at this chart after upgrading:
image

Surely, it is possible that my atmotube is damaged or coincidentally the temperature was EXACT 19 degress throughout the night, but I dont think so..

@natekspencer
Copy link
Owner

It's probably more likely that your Atmo lost communication with your Home Assistant bluetooth. When the active polling is enabled, it takes up a connection slot as well and depending on if you have other bluetooth devices connected, they may be competing for resources.

@dsoiM
Copy link
Author

dsoiM commented Oct 13, 2024

I have only one device, the Atmo. Also the stats show that there is a measurement every 5 minutes correctly.

@dsoiM
Copy link
Author

dsoiM commented Oct 13, 2024

I'd like polling to disable the advertisement gathering completely since in my case its better to have no data than to have inaccurate data

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

No branches or pull requests

2 participants