Help needed with Loading the default fixture


I’d guess that the sensors aren’t being linked to the environments/environment_1/air_temperature/measured topic for whatever reason and that is what’s causing the UI to not display the temperature.

Or, if your api node is dead (test this by going to IP:5984/_openag/api/0.0.1/topic) that should also not work.
There are other things that come to mind but it’s awesome that you’re getting everything working!


Hi @juhnke! so glad you made some progress with your computer. I just came to pick up where we left off and I’m still having trouble.

I’ve been using the wiki you wrote and its very helpful.

I also followed this instruction:

openag db load_fixture ~/catkin_ws/src/openag_brain/fixtures/default.json

and got a similar output as you did, except the firmware_module had only 1 document instead of 2. I assumed that is where you added your firmware module:

    "id": "dht221",
    "type": "dht22",
    "environment": "environment_1",
    "arguments": [
    "outputs": {
        "air_temperature": {
            "variable": "air_temperature"
    "air_humidity": {
        "variable": "air_humidity"

I wanted to do the exact same thing just to see if I could get what you got for this. So below are some photos detailing what I have done:

I took off the signal board arduino shield to ensure that wasn’t causing any issues. I just plugged in a DHT22 into the 5V, Gnd, and PWM2 pin

I’m just putting these to make sure that I’m doing the same thing you did.

After that I followed all of the rest of the steps. I didn’t see the error that you got when using the analog pin, even though I did give it a try. Also the “KeyError” you got is interesting because that is the key that you use for your “_id” I’m assuming.

Ok so after i flashed and restarted and everything I went to the rostopic list, but didn’t see the new sensor which you can see in the photo attached

So this is pretty much where I’m stuck, I couldn’t rostopic echo the dht22 because I couldn’t find it and when I tried stuff it said that the topic hasn’t been published.

Would you have any idea where to go from here? I really want to get my PFC up and running :slight_smile:


Hi @Alex4EVR,

It’s a little tough to give advice since it’s a complex setup and the software is still changing day to day, but I can at least tell you what I did to get everything running – this worked as of about 2 weeks ago.

  • On the Pi, clone openag_brain_install_rpi. I felt like the Docker piece just added another layer of complexity which I’d rather skip at this point.
  • In that repo, run ./
  • Setup ros env with source catkin_ws/devel/
  • Flash the Arduino with openag firmware flash -p ros -t upload -f ~/catkin_ws/src/openag_brain/launch/personal_food_computer_v2.yaml
  • Run the brain with rosrun openag_brain main personal_food_computer_v2.launch
  • In another terminal, confirm that everything’s loaded with rostopic list, and check that the sensors are returning data with something like rostopic echo /sensors/am2315_1/air_temperature/raw

In your case, feels like you should focus first on just getting the sensor code for your DHT22 running and publishing data to a topic. I’d look at a few things:

  • Confirm that the launch file you’re editing is actually getting used. Comment out one of the sensors, re-flash, re-run, and make sure that sensor goes away.
  • Add your sensor to the launch file, and confirm that it’s actually getting picked up. When you Flash the arduino, do you see it actually cloning the DHT22 repo? Do you see the repo in ./lib?

Once you actually see a topic showing up, then you can worry about having valid data (are you using the right pin, do you have a pullup resistor) and passing it through to Couch and the UI – but I’d focus first on just getting the Arudino talking to the sensor and passing data back to ROS.


it looks like he’s using the personal_food_computer_v2.yaml/.launch file since there are other sensors like am2315 running on ROS.

If you want to run other sensors(e.g. DHT11),
you need to write a launchfile and param file(yaml) for your hardware config if you aren’t using the same things.

openag firmware flash -p ros -t upload -f ~/catkin_ws/src/openag_brain/${your param file}.yaml instead of personal_food_computer_v2

also, rosrun openag_brain main ${your lauchfile}.launch


Thank you so much @dlerman!!!

I got the AM2315 to output the air temperature and I breathed on it so it would change and it did so its totally working!!!

The DHT22 was because @juhnke got that to work so I was trying to copy him and also take the Arduino shield out of the equation, but now that’s working I’m going to try and get more functionality out of the machine and grow some freaking plants! :seedling::seedling::seedling::seedling:


Glad to hear it! Now onto the actuators! :slight_smile:


That is correct. I had already added it.

One of two things: 1) You hadn’t restarted the container after you flashed the arduino or 2) there is a bug in the arduino code and it’s preventing the publishing of topics. The best way to fix this is to remove all firmware_modules except that funky starter entry and the dht22. I see that you got it working a little later on so I’ll move on.

I have a working directory of all of the sensors / fixtures I’ve gotten working on or am working on here.

I have included rostopic actuator commands as well as the configuration files needed. The documentation is poor as I’m working on getting the gc0011 code to work right now but I have almost all actuators running now.

I’ve also included my launch and yaml files. I typically copy them into the launch folder and then rename them to the default_v2 names so the container boots to them.

@dlerman Great tips. I’ll incorporate them into the wiki!

Love this!!




Hi, please help!, I was following your steps up to the flash. When running rosrun openag_brain flash, it asks me for the username:

Parsing firmware module "dht22_1" from server
Downloading "openag_firmware_module"
Cloning into '/tmp/tmpA4sdCa/lib/openag_firmware_module'...
Username for '':


It sounds like you’re trying to follow instructions from before all the big changes for the PFC v2.1 software update that happened last summer and fall. You are going to have a very hard time with that.

You should probably read this thread: Update from OpenAg - Please Read
…and this thread: Getting the software up and running


Thanks, I’m using a docker install btw, is there a chance that this is the problem? I haven’t tried the source install so far but i’m planning to


@angelazt96 I don’t want to lead you on by giving you the false impression that what you’re trying to do has a reasonable chance of success. I don’t think it does.

Even if you get past your current obstacle, you will eventually discover that the PFC v2.0 software doesn’t work, and the PFC v2.1 software barely works (see Rob’s notes from his test grow). You would probably be better off if you forget about the sensors and the Raspberry Pi and just hook your grow lights up to a relay timer. If you want to do data logging, your life will be a lot simpler if you don’t try to use ROS.

If you haven’t read the “Update from OpenAg - Please Read” thread that I linked to above, you really should read it.