Last Update: 4/1/2022
Find this project on my GitHb Mushroom Sense
I thought it would be cool to set up a fully automated mushroom farm. Much like animals, mushrooms expel CO2 as a byproduct of respiration. As such CO2 levels can be an interesting variable to track and manipulate when growing mushrooms. However CO2 sensors are pricey and I wanted one that I could integrate into Home Assistant which I planned to use as the brains of my automated mushroom farm. MushroomSense is my solution to this problem and as icing on the cake it'll measure temperature and humiditiy and having good control over these two varibles is vital to growing mushrooms (although if that's all your looking for there are dirt cheep solutions available I've got one of these for example and its pretty easy to get integrated with home assistant with a bit of google-ing).
The hardware is all available from Adafruit:
One of the following true CO2 Sensors
Do some research see what suits your needs. The SCD-40 is probably sufficient for most people's needs.
These prices could change but the total comes out to about $95. Not too shabby for a wifi enabled CO2 sensor. I know the sensor is a bit pricey but that's because its the real deal. The cheaper CO2 sensors measure effective CO2. essentially they measure some other gasses and use some math to make an educated guess on how much CO2 there is. A future goal is to support one of these cheaper sensors so people can save some money and upgrade later if they wish. If your looking to write some code this project can be modified to support any sensor you want.
The Wizard can be downloaded for Linux and Windows from the Releases Page of this project. Download the package for your OS and Follow the instructions for your OS Bellow.
First you'll also need to install the CP2104 USB Driver to connect to the Feather HUZZAH over USB.
Next Unzip the folder and double click wizard.exe
Currently the only option is to run the wizard from source. The Windows and Linux executables are built using pyinstaller which seems to have some problems with Big Sur. Unfortunately I don't have the time to figure out a solution so if someone could build a MacOS executable and submit a pull request your contribution would be much appreciated.
There are several dependencies you may need to install.
pip install pysimplegui
pip install esptool
You'll also need to install the CP2104 USB Driver to connect to the Feather HUZZAH over USB.
Once you have the wizard open via the direction above, you can use it to install mushroom sense on your hardware.
Select the correct port for your Feather HUZZAH board. If you're not sure:
The web interface allows you to interact with Mushroom sense via you web browser. It also provides a REST API that can be used for integration with Home Assistant or other automation software.
This will put the device into configuration mode. The device will turn into a WIFI hot spot that you can connect to.
On your computer, This will not work on most phones, connect to the WIFI network called Mushroom Sense
Once Mushroom Sense is connected to your network you can open the web interface in a browser on any device that is also connected to your network.
This page will display the current sensor value of the device. It is live and will update as the sensor values change
This page shows all the available REST API endpoints offered by the device. It also serves as a REST API playground Allowing you to send REST calls to the device and view the device's response.
This page generates a bit Home Assistant configuration YAML. This YAML can be copy and pasted into home assistant to quickly add Mushroom Sense to Home Assistant where it can be used for automation.
The device has 4 buttons:
When the device boots you will be on the home screen. This screen will continuously update/display the current temperature, humidity, and CO2 consecration measured by the sensor.
From the home screen the pressing button B opens the device menu. The menu has the following options:
Returns to the home screen
Puts the device in WIFI configuration mode. Read more here.
Connects or reconnects to the configured WIFI network. this can be useful if the connection fails on boot or the WIFI is disconnected for some reason.
The interval at which the sensor will take a new reading. The avalible range will depend on what sensor you are using:
Sets the length of inactivity that will cause the screen to turn off. options:
Allows you to set the temperature unit on the device to celsius(C) or fahrenheit(F). Metric or Freedom units whatever you prefer. (Default is F)
Sets the current calibration to 400ppm. this is intended to be used outside as an easy way of recalibrating the SCD-30.
Gives the current WIFI connection status and the current IP address if connected.