NOTICE: This forum has been archived (i.e. registration and posting is disabled).

Please go to the new forum at https://forum.kylegabriel.com

Atlas Scientific EZ...
 
Notifications
Clear all

Atlas Scientific EZO sensors / CO2 sensor


eap904
(@eap904)
Active Member
Joined: 2 years ago
Posts: 18
Topic starter  

Another day, another sensor request... 

I'm going to go ahead and get this sensor, because I trust Atlas Scientific to make good things:
https://atlas-scientific.com/probes/co2-sensor/

I thought Mycodo / Kyle might be interested in supporting it :)
Appears there is a new suite of EZO sensors

Also, generally speaking, anything without official Mycodo support can be used via a script of some sort that returns the value correct? Most random components I run across already have some sort of RPi implementation, just not so easy as selecting from a drop down menu

Thanks


Quote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 612
 
Posted by: @eap904

I thought Mycodo / Kyle might be interested in supporting it :)

Always interested in expanding Atlas Scientific support. I've attached an Input Module you can save, rename the extension from txt to py, import on the Configure -> Custom Input page. After adding the Input, set Log Level: Debug and watch the Daemon Log after Activating for any errors or output that occurs.

Posted by: @eap904

anything without official Mycodo support can be used via a script of some sort that returns the value correct?

Yes, you can use the Linux Bash Command Input or Python Code Input to execute a script or arbitrary Python code to acquire measurements, if you don't want to build an entire Input Module, which sometimes helps with rapid prototyping or if there's already a bash script available that returns measurements.

Let me know if there are any issues while testing the module.

Mycodo Developer


ReplyQuote
eap904
(@eap904)
Active Member
Joined: 2 years ago
Posts: 18
Topic starter  

Success! 

Although by the time I acutally got this setup, it appears your input module was already added to the Mycodo code :)

I went ahead and bought their EZO humidity sensor as well, and from your attached input module, it seems like I could.. almost just add another atlas co2 input, and change the I2C address to the one of the humidity sensor, but it seems like the returned strings will not match that of the CO2 sensor.

It seems like the commands for the humidity sensor are the same, but there's an option to enable temp and dew point, and their format I'm guessing will return an error

This is the command from an atlas sample code
>> Enter command: R
Success HUM 111: 55.45,24.01,Dew,14.57

# Read sensor via I2C
        elif self.interface == 'I2C':
            co2_status, co2_str = self.atlas_device.query('R')
            self.logger.debug("Returned: {}".format(co2_str))
            if co2_status == 'error':
                self.logger.error("Sensor read unsuccessful: {err}".format(err=co2_str))
            elif co2_status == 'success':
                if str_is_float(co2_str):
                    co2 = float(co2_str)
                else:
                    self.logger.error("Could not determine co2 from returned string: '{}'".format(co2_str))

        self.value_set(0, co2)
This post was modified 2 months ago by eap904

ReplyQuote
Kyle Gabriel
(@kylegabriel)
Member Admin
Joined: 6 years ago
Posts: 612
 

I actually have their humidity sensor, which uses the HTU21DF, but I haven't made an Input module for it yet.

Mycodo Developer


ReplyQuote
eap904
(@eap904)
Active Member
Joined: 2 years ago
Posts: 18
Topic starter  

@kylegabriel disabling the extra outputs at least enables me to read the humidity, which is all I really need at the moment. I’ve enjoyed learning by looking through the code though


ReplyQuote