-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Mycodo CCS811 Install Does Not Record Data #641
Comments
I think I found the issue. Thank you for the detailed report- it definitely helped. I just pushed a potential fix. Can you manually edit your ~/Mycodo/mycodo/inputs/ccs811.py to match the edits I made (see commit, above), save, restart the daemon with |
Made those changes to ccs811.py Nothing changes in the original problem scenario, with the exception of this single log line, which occurs three different times during the start of the daemon: 2019-03-18 12:55:44,567 - mycodo.utils.inputs - ERROR - Error: Cannot add input modules because it does not have a unique name: CCS811 |
Thank you for responding so quickly.
I made those changes to ccs811.py
Nothing changes in the original problem scenario, with the exception of this single log line, which occurs three different times during the start of the daemon:
2019-03-18 12:55:44,567 - mycodo.utils.inputs - ERROR - Error: Cannot add input modules because it does not have a unique name: CCS811
Sounds like you’re almost there…
J.
… On Mar 18, 2019, at 10:33 AM, Kyle Gabriel ***@***.***> wrote:
sudo service mycodo restart
|
It appears you may have created a custom input module with the same name as the built-in one. That, or you saved a new file in the inputs directory instead of overwriting the file you edited. I did just find another issue that may or may not affect the function of the module. You'll have to test to determine that. The commit, above, has the changes you should apply, restart the daemon, and test. The input module should now be the exact same as the Adafruit example code, so if it doesn't work after this, I'm not sure why it's not obtaining measurements, if the example code you executed does return measurements. |
Just pushed another commit that fixes the numbering... I had them incorrect. Try that and see if ti works. |
I accidentally pushed a bunch of other files I didn't mean to with that last commit. Here's a direct link to the latest file: https://github.com/kizniche/Mycodo/blob/d961aab484fb805a01e394533510346e8b2dc26e/mycodo/inputs/ccs811.py |
Very sorry about that.
I did rename the original script ccs811BAK.py, and made a new script using the name ccs811.py.
I guess I didn't rename the original script well enough?
I edited the original ccs811.py and the error went away.
The CCS811 sensor collects CO2 data now. One up.
The other two functions of the sensor, Temp and Voc are still not populating in Live. Two down.
0 ppb (VOC) CH2 | No Data Last 16 sec
0 °C (Temperature) CH3 | No Data Last 16 sec
Data also not displaying on the Dashboard.
I have only an interest is the CO2 data collection, so this issue is closed, from my narrow perspective?
You may want to patch over the rest when you are ready.
BTW: Your software rocks. Thank you very much for creating and maintaining it.
J.
… On Mar 18, 2019, at 10:33 AM, Kyle Gabriel ***@***.***> wrote:
sudo service mycodo restart
|
Could you please test the latest version of the input file (commit, above)? I think I finally fixed it. |
Yes, those final changes worked. Thank you. 439 ppm (CO2) CH1 | 2019/3/18 19:09:49 |
Great! Thanks for testing. There are a few sensors Mycodo supports that I don't own (I added them at a user's request), which means I can't test the code. This sensor module has had issuses in the past, so I'm glad we got it straightened out. |
Mycodo Issue Report:
Problem Description
Fresh Pi Zero W, 9000C1
Fresh and updated Raspbian
Raspbian GNU/Linux 9 (stretch)
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
Fresh mycodo 7.3.1
New Adafruit CCS811 Air Quality Sensor
Physically connect CCS811 sensor to Pi Zero W as per:
https://learn.adafruit.com/adafruit-ccs811-air-quality-sensor/raspberry-pi-wiring-test
Edit /boot/config.txt and add line to slow down baud rate for Pi clock:
dtparam=i2c_baudrate=10000
Once I set the baud rate I can run:
sudo i2cdetect -y 1
Sensor lists properly as 5a
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- 5a -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- — --
When adding CCS811 in fresh install of Mycodo 7.3.1, I am asked to install dependencies, and this process completes without error. Log lists successful install of all dependencies.
CCS811 input adds in mycodo, then activates without error, but sensor does not collect or display data in Live or Dashboard.
Live page displays only this, only the CO2 value even lists an update time. VOC and Temp always list no data.
0 ppm (CO2) CH1 | 2019/3/17 15:19:53
0 ppb (VOC) CH2 | No Data Last 16 sec
0 °C (Temperature) CH3 | No Data Last 16 sec
A Dashboard graph or gauge displays no data.
When I test same sensor on Pi using the default Adafruit libraries and scripts, sensor DOES properly display data.
CO2: 611 ppm, TVOC: 32 temp: 25.0
CO2: 0 ppm, TVOC: 0 temp: 25.0
CO2: 0 ppm, TVOC: 0 temp: 24.5426214168
CO2: 733 ppm, TVOC: 50 temp: 24.5426214168
CO2: 400 ppm, TVOC: 0 temp: 24.5426214168
CO2: 400 ppm, TVOC: 0 temp: 25.0
CO2: 400 ppm, TVOC: 0 temp: 25.0
CO2: 1544 ppm, TVOC: 174 temp: 25.0
CO2: 575 ppm, TVOC: 26 temp: 24.5426214168
CO2: 423 ppm, TVOC: 3 temp: 25.0
(***variations in CO2 ppm caused by my breathing on the sensor.)
Errors
There are no errors in the mycodo log, or the dependency log.
Sensor manually activates and deactivates without error.
I have tried this same test with two different CCS811, both new. Both test results are the same.
No result in Live or Dashboard graph or gauge.
Proper results using default adafruit libraries and scripts.
Steps to Reproduce the issue:
How can this issue be reproduced?
Additional Notes
Until dtparam=i2c_baudrate=10000 is added to the config.txt, both methods to access this sensor fail.
The text was updated successfully, but these errors were encountered: