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

Static Gas Readings #5

Open
vernak2539 opened this issue Jul 3, 2023 · 3 comments
Open

Static Gas Readings #5

vernak2539 opened this issue Jul 3, 2023 · 3 comments

Comments

@vernak2539
Copy link

Hello! Hope this finds you well. I've just had a try using the enviro+ to get the gas measures using the MICS6814. I've copied the example out of the files into a test script.

Unfortunately, I'm seeing something weird, which is a a constant value for oxidising, reducing, and NH3.

Oxidising: 25193.96
Reducing:  25193.96
NH3:       25193.96

I've not had a chance to look into it properly, but wanted to post here just in case anyone would happen to know what's going on. The python version reading the sensor seems to deliver the correct results (again, I've yet to investigate).

My sample code is here. I've been running this on a Pi Zero W with Enviro+ (Air quality as well).

Any help would be much appreciated!! If I have time to look into this more, I'll be sure to update this issue

@vernak2539
Copy link
Author

vernak2539 commented Jul 3, 2023

I've looked a bit more into this and still no dice unfortunately.

As I purchased the envrio+ recently, I saw this on their site:

Notes
Due to exciting global electronic parts shortages, some Enviro +s manufactured in 2021 have an ADS1115 ADC instead of the usual ADS1015. Our Python libraries have been updated to automatically detect and adjust for this chip change.

Maybe that could've been the issues?! So I copy/pasted the source and switched it to use ads1x15.NewADS1115 instead of ads1x15.NewADS1015. I tried it and it didn't work unfortunately.

I tried to add some logging as well. The for loop via StartReading is working, refreshing data every second. It's just getting the incorrect value.

I have to dig a bit deeper as this is getting out of my depth. It looks to be something to do with potentially reading pins and their values incorrectly... I'm not sure...

It even could be in the end something on my end as I do run the python script alongside it. I've tested multiple different times with the python prometheus exporter stopped.

Here's the code with my copy/pasted/modified mics sensor (test, custom sensor)

@vernak2539
Copy link
Author

@rubiojr would you happen to have any ideas on this by chance?

@rubiojr
Copy link
Owner

rubiojr commented Oct 17, 2023

@vernak2539 I lost access to my enviro+ a while ago, I'm afraid I can't help you debug this currently.

Sorry to leave you hanging there, missed the other notifications.

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