Software Development Friday! - Loads of New Features for MV1 in Spring 2024!

Software Development Friday - 2/9/2024

Hello everyone, Drew here!
I’ve been spending a lot of my time the last 8 months on software development. As the pace of our progress picks up, I want to start pulling back the curtain and showing what we’re working on. I’ll be making an effort to give weekly updates on Fridays, and show off new features.
On that note, I have two exciting pieces of news for all of our MV1 users!

Firmware Release - Strawberry

Up until the last month or so, much of this focus has been on upgrading the firmware on the MV1 to be more reliable and feature rich. We’ve now completed enough field testing to officially release our “Strawberry” software version! For anyone with a previous version (don’t worry, I know who you are!), I’ll be reaching out soon to send you a new SD card you can install in order to take advantage of this upgrade.

Here are some of the things we’ve changed/added:

  • Network friendliness: Our new communication protocol is much friendlier with school networks
  • Over-The-Air Updates: From now on, I will be able to push updates to your devices and add features/fix bugs behind the scenes
  • Data Caching: With this upgrade, data will no longer be lost when a device gets disconnected from the network! It will save any data it cannot send until its reconnected.
  • Feedback: While you won’t see any of this yet, the firmware infrastructure has been upgraded to allow live control of the device. More about this in future updates!

Web Application Updates

Our web application is getting a much needed facelift and upgrade! Up until now, there hasn’t been much information available to a user about trials, recipes, and experiments. Users were also locked into the default recipes unless they asked us for a custom version. The first upgrade to the web application will be a “Trial Manager” and “Recipe Manager” page.
You can check out the new features on our “development” branch of the web application here:
Some features will not work until you get the latest firmware update

Trial Manager

As you can see, much more information about all of your trials in a given experiment is now available!

Of specific note:

  • We changed how trials are created on our database. Previously, a new trial could be created without the device actually being able to receive it. This is now triggered by the device, so you can now be certain that it actually received the new/updated trial if it appears on the list.
  • There is also now a way to update the recipe your trial is using without starting an entirely new trial! This is useful for when you want to change the settings in the box mid-way through a trial, and still keep the data and pictures in one place.
  • Following on the last point, the “Last Updated” column will change to show the last time that particular trial was updated, indicating that an update was successful. The “Current Recipe” will also change to show what is running on the device.

Known Issues/Future Features:

  • As noted above, this will not work on your devices until you receive the latest firmware update. I’ll be reaching out to all of you about this, but you can skip the line by contacting me directly if you’re chomping at the bit to try it out! Until then, the old method of trial creation on the Home page will still work until everyone has been upgraded.
  • Trials previously created via the Home page method will not be updatable until we update those records in the database. We will handle this behind the scenes, but I wanted to mention it for anyone that tries this before this is fully released on the main “production” version of the web application.
  • We can do a lot with this in the future! I want to add more detailed information about each trial, as well as other quality of life features, such as the ability to archive a trial, or switch the experiment the trial is associated with.

Recipe Manager

“Oh, so THAT’S what the MV1-Tomatosphere recipe does!”

Of specific note:

  • You can now see a summary of each recipe!
  • We added the ability to download and upload recipes! You can download a recipe you want to modify, modify it using any text editor (“VS Code” makes it look great though, and supports JSON formatting), and then re-upload it to use it immediately on a device!
  • If you’re a ChatGPT user, you can try out our custom Recipe Builder GPT! This will be able to explain the recipes you can download, as well as help you create new iterations.

Known Issues/Future Features:

  • If you’re not familiar with JSON, it kind of looks like gobbledygook. We will be creating a guide/cheatsheet to show you exactly how it works, and what to modify to make it do what you want. Until then, the GPT linked above is quite good at it.
  • We currently DO NOT have any “validation” functionality for uploading recipes. If your recipes are formatted incorrectly, they might not successfully upload. They also might upload, but be unusable by the device. If this happens, feel free to post here about it here and one of us can help! In the meantime, sending a pre-made recipe will get the device running again.
  • I want to add more information about each recipe to this page. @Peter made a really cool post explaining the recipes, and a lot of this information would be a great addition to this page.
  • In the past, we’ve made a local python application to “remix” recipes with a user interface. We are considering dusting it off and adding it in as a “cleaner” way to create recipes. Let us know if you want to see this!
  • For anyone that made it to our booth at the National ACTE/NAAE Conference in Phoenix this year, you heard us talk about the ability to "drop a pin on a map, and recreate that climate in your box’! While this feature is a ways off, this is the first step in that direction, and something we are very excited to build!

Experiment Selection/Home Page Updates:

Not a ton to talk about here, but I did want to mention a few things about how the “structure” of our website works now.

  • The ability for organizations to use different “Experiments” in different classes, buildings, years, etc has finally been implimented. An “Experiment” in a MARSfarm is a collection of trials that have a common theme, or a reason to be viewed together.
  • Just like how the MV1 Devices that your school owns are only available to your organization, custom recipes are now only available to a specific experiment. If you are having trouble finding the recipe you just uploaded to send to a device as a new trial, check to make sure that you have the correct experiment selected. This is done here on the home page as shown above.
  • Also of note is that trials created within a certain experiment are now only viewable with that experiment selected.
  • We haven’t yet built the features needed to manage experiments, so if you want a new one created for your organization, please ask here, or email me directly.

This is the thread to make requests about features you want to see! The best way to get a feature prioritized is to ask about it!

Cheers everyone, and Happy Friday!

1 Like

I was on a call with @jamira earlier this week and wanted to share these two other methods of viewing JSON files - for anyone without Visual Studio Code installed. Once you’ve downloaded the recipe, format it for you: JSON Viewer Online Best and Free.

Hello everyone, I’m happy to announce a couple of new software feature updates! It’s not Friday, but let’s pretend that it is.

Today I’ll cover the new functionality available on the web application. Within each section, I’ll give a bit more info about how you can use the section to troubleshoot the device if you see something strange.

Web Application Update - Device Manager

Until recently, the only way users would know their device is connected and available for a new trial was to blindly attempt to send one, and hope they saw the lights flashing. Obviously, more information about the connectivity status was needed, and so my latest development effort was dedicated to a Device Manager page!

There is a lot going on here, so I’ll start with breaking down the sections of information and how they are useful at first glance. I will then dig into how the application gathers each bit of information, and how I use knowledge of that process to diagnose issues with the device or the network.

Device Card Basics

Each device that your organization owns will have a Device Card within the Device Manager. Each Device Card has four sections: connection info, experiment info, image info, and sensor info.

Connection Info

This section shows the device’s serial number, it’s connection status, the last time the device sent a “ping” to the cloud, and a button to flash the LED.

The connection status is updated every 5 minutes, which is about the same amount of time each device waits to send a “ping”. If this indicates that the device is “online”, then your device is actively connected to the network and able to send data and receive instructions.

The “FLASH LED” button is useful for verifying which device is which on a rack, as well as ensuring that the device is truly ready to accept a new trial. Clicking this button will send a signal to the device to instruct it to blink twice.

Connection Info Troubleshooting

If the latest ping shows something strange like “Latest Ping: over 54 years ago”, this means that your device has never sent a ping, and needs a firmware update. Please contact me, and I’ll get you fixed up!
This will also mean that the “FLASH LED” button will not work, as the device doesn’t have the required code to understand the request from the button. The firmware update will fix this too!

Fun fact: The reason it reads as 54 years late is that the application is subtracting the current time from the last reported ping using “epoch time”. Epoch time is the time measured in seconds since midnight on January 1st, 1970! Many computer systems use this in order to have a common system to tell time.

Experiment Info

This section shows the current experiment the device is participating in, the trial the device is currently running, and how long ago that device was started.

This information is useful for knowing at a glance which experiment and trial to select from the dropdowns at the top of the application when you want to look at the data or image set that your device is collecting.

Experiment Info Troubleshooting

If the experiment and trial listed here are not what you expected, make sure that you created the trial via the “Trial Manager” page, and not via the “Home” page. The home page will be removed or changed soon, and now only allows trial creation for older devices that have not received the firmware upgrade yet. Any trials sent from the Trial Manager get routed through the device itself before getting created in our database, ensuring that if you can see the trial, then you know it was successfully sent. This does not happen if sent from the Home page.

Image Info

This section will show you the last image collected by the device, as well as the timestamp of when it was taken.

This image can be used to ensure that images are, in fact, getting collected, as well as if the device is correctly sending the images to the cloud on time. You can also use this to check the health of your plants at a glance. We use it to make sure the recipe for each trial is dispensing enough water as well!

Image Info Troubleshooting

If you notice that your image has stopped updating (as in, the plants don’t appear to be growing, or something you moved in the box is in its previous configuration), and also that red lights flash in the box at about 5 minutes after the hour, this means that your camera will need troubleshooting or replacement. Contact me!
Please note that due to the way the images are sent, the date will keep updating to look current in this failure mode! The flashing red lights are the giveaway here, especially if the sensors are all logging correctly.

Sensor Info

This section will show the latest sensor reading sent by each sensor on the device, as well as the timestamp of when it was collected.

This is useful for knowing if a sensor is unplugged or malfunctioning. Similarly to the Image Info section, the timestamps help determine if the device is correctly connected and configured.

Sensor Info Troubleshooting

Buckle up, this will be text heavy! A lot of things can go weird with the sensor section.

The most common error seen here is when all three sensors say “No data found for this trial”. This is almost always because of two possibilities: either that the trial has just started and no data has been collected yet, or that the device is running a different trial than the device card is actually showing.

The first error is easy, simply wait up to an hour!
Unlike images, the web application looks at the most recent update date over all of the trials assigned to the specific device, and uses that trial to cross reference the sensor readings. Thus, if the device has not logged a sensor reading for that trial yet, nothing will be displayed. This is also why nothing will be displayed if the device doesn’t receive the most recent Trial sent. Unlike above, this can happen not only when sending a trial via the “Home” page instead of using the “Trial Manager” page, but also when there is severe network congestion.

To avoid network congestion errors like this, ensure that you don’t send multiple trials to the same device back to back. If you send a trial and the device doesn’t flash white 5 times, and ALSO if you don’t see the trial get created or updated in Trial Manager after refreshing, the first step would be to unplug the power to the device, wait a few seconds, and then plug it back in. This will ensure it will try to get the last trial sent, if that trial was sent within the last 4 hours. This is a weird one, and has to do with how the MQTT protocol and networks in general work. If you’re noticing this issue, a good test here is to use the “FLASH LED” button. If it works immediately, you can send a trial! If it doesn’t, there is a connection issue, and it’s backed up in the queue. Wait until you see all of the backed up flashes complete before sending a new trial.

Another error you could see here is either CO2 or both Temp and Humidity (they use the same sensor) stop updating. This will likely be accompanied by flashing red lights on the device at about 8-10 minutes after the hour. This indicate that the sensor in question is disconnected or needs replacement. I can help with this too!

I hope you find the new Device Manager page useful! In the future, I hope to add more live controls similar to the “FLASH LED” button, such as running the pump, taking an immediate sensor reading, or taking an immediate picture. I also want to add the firmware status, and an ability to let you update your own device! Let me know what other information you would like to see, or other controls you would find useful.

In the next update, I’ll go over the current state of the device firmware, and where it will be going in the near term!

1 Like