Closed gngenius02 closed 1 year ago
I actually just verified the library is expecting an int
as can be seen here:
https://github.com/adafruit/Adafruit_CircuitPython_SCD4X/blob/a9ae07d8c30c45e7a36d5308bdaaa2887c3c7e31/adafruit_scd4x.py#L161
The code is passing a float. Should be an easy fix.
Making that change locally did not fix the issue. Not sure if I have to restart or maybe I have the install located somewhere else or not. Will investigate further at a future time.
EDIT:
The change did allow the calibration to work. However, the device needs to be reset after calibration and the only way for me to do that is to Deactivate then Activate it under inputs.
Feature Request:
Would be a nice feature to add an auto reboot of the device after Calibrating.
Nice work. Thanks for figuring out the issue and making a PR.
This pull request has been mentioned on Radical DIY Forum. There might be relevant details there:
https://forum.radicaldiy.com/t/mycodo-v8-15-0-release/1362/1
Describe the problem/bug
When trying to force CO2 calibration on Sensiron SCD40. It shows as command sent, but it kills the sensor and I have to Deactivate and Activate it again to get it to start working. I find the following errors repeating in the logs about every 20 seconds.
Versions:
Reproducibility
Please list specific setup details that are involved and the steps to reproduce the behavior:
Recovery From Issue.
In order to get readings from the sensor again:
Expected behavior
I believe it should calibrate the sensor to the value in the input box. Then after calibration complete it should start displaying that value as the current value.
Screenshots
Here is the Input location I have circled the location of the calibration area.![image](https://user-images.githubusercontent.com/44735603/196027055-6e6f6382-6ef0-4250-8a91-cfb52c97a397.png)
This is the errors that show up in the logs.![image](https://user-images.githubusercontent.com/44735603/196027199-63301374-700f-438f-ae87-bff0ea5ed073.png)
Additional context
I am guessing the issue is between different brand of sensors, maybe coming from the adafruit library? I couldn't find anything I could fix in the MyCodo code. I know the manufacturers shouldn't make a difference but maybe one of them is handling types differently. If you need more information or data or to check anything specific please let me know. I will dive into the adafruit lib now to see if I can figure out where the issue is.