AgroHelium: Urban Agriculture AIoT solution

Sustainable platform of sensing and irrigation automation with predictive analysis via the Helium Network.

Things used in this project

Hardware components

1 Helium Developer Kit
1 DFRobot Gravity: Analog Capacitive Soil Moisture Sensor- Corrosion Resistant
1 Modulo Temperature Probe
1 Jumper wires (generic)
1 Darlington High Power Transistor
1 Resistor 10k ohm
1 Resistor 1k ohm
1 Resistor 2.21k ohm
1 Resistor 4.75k ohm
1 1N4007 – High Voltage, High Current Rated Diode
1 Li-Ion Battery 1000mAh
1 Seeed Lipo Rider Pro
1 Hose
1 Seeed Solar Panel

Hand tools and fabrication machines

Soldering iron (generic)

Solder Wire, Lead Free

3D Printer (generic)





Sustainable platform of sensing and irrigation automation with predictive analysis via the Helium Network.

This will be the third iteration of two past projects;

The first one was Agrofox:

My intention is to test several platforms and to check which work best. (Spoiler: The Helium kit is at the top for the moment).





In recent years Urban agriculture has made its mark in popular culture as an alternative to industrial farming. It offers several benefits and also helps to solve some of the most nefarious problems that we will have going forward regarding food supply, the growing population and the new trends favoring organic, naturally grown food. Despite all that it has been faced with a plethora of problems including its access to water, pollution concerns, and high maintenance costs. In addition to those most farming methods are very empirical in nature and it has been just a few years since the Internet of Things and other Industry 4.0 technologies have reached Agriculture. And among most of those, its degree of adoption is quite lackluster. Urban agriculture needs a cheap and readily available solution, for it to be sustainable.




IF we want to have the most impact with a project regarding sustainability, namely Water sustainability we have to focus on the industry that requires more of it, which is Agriculture.


And regarding that the main problem in agriculture is actually Water. Most countries have their periods of drought, but as years become even hotter because of climate change, drought greatly affects several regions. California is an example of this:


So we get into a $42 Billion USD problem adding all the parameters. Industry 4.0 tools and automation are greatly needed to attack this.


Here comes a new challenger!


After COVID-19 hit most industries were shown a loss in revenue of almost 30%. The pandemic is impacting global food systems, disrupting regional agricultural value chains, and posing risks to household food security.


Now we have to take much more seriously the fact that Urban Agriculture can provide us a "cushion" during all this problematic time.


Now, my personal problem:


This is a photo of one of the Tomato fruits I have in my backyard which I cannot continuously check. Sometimes I am away or very busy, and I tend to neglect its care. Another thing is regarding collecting fruit at the proper moments because they may become uneatable at some point. The problem regarding water can be taken care of if I automate irrigation and some more things.




Our solution to the problem will be to create a sustainable platform of sensing and irrigation automation with predictive analysis via the Helium devKit instead of relying entirely on cloud. With one objective in mind: SAVE WATER.1.- Using temperature with humidity, soil moisture and soil temperature sensors, we will obtain sensor data every 6 min. LoRa technology has been chosen because the characteristics of long range and low power are excellent for remote areas and cities alike. For that in turn we will use the Helium devkit. Each batch of sensing is done at this frequency to send 120 packets per day to keep the LoRa flow going. The Helium Devkit is excellent to obtain the data from the sensors (using the vast array of libraries from Arduino) and send them directly to a cloud service via MQTT.


Then using the Openweathermap API and Node-RED we will create a Dashboard and notification capabilities.


2.- We will connect to our nearest Lora Gateway via the Helium network and send sensor data to AWS.


3.- Once we have the data at AWS, we will then send it to a Node-RED flow hosted on a Virtual machine or locally. We made it possible to develop almost any application with the obtained data. (All the applications are based on Node Red to make the prototyping easier). Examples of these applications:


-Generate databases of our crops and their conditions.


-Do data analysis to obtain predictive models in the long term.


-Water automation systems with the data obtained (as we will do in this project).


-Crop yield analysis.


3.1- We then will make a Dashboard with the data obtained for the complete and simple visualization of the data. For the application, we will perform data crossing with the OpenWeatherMap API, to perform the control of an electrovalve connected to another microcontroller. The data crossing obtained is used to check if that day is going to rain, and thus not use irrigation water in crops. Also if the system detects that water is needed, in the field by the humidity sensors, the irrigation system is turned on. In turn once a day an email will be sent to the farmer with the general information of his field or he can check anytime on his dashboard. Also everytime the irrigation system is online, a notification will be sent.


Why Helium Network?


One huge emphasis of this project is for it to also be used in Urban Agriculture and LoRa is the best choice for that one as we live in one of the biggest cities in the world (Mexico). And Sigfox which is perhaps your biggest competitor was found to be unreliable. I am eager to test this network. The only issue is perhaps that I will have to make my own gateway as there is no service in my country, but you already solved that problem with a tutorial on how to do that. And regarding scalability, LoRa is one of the best and easier neetworks to work it demanding low power and also performing as good as the components in your dvices and gateway are, for this application we can envision a manufacturing run of devices similar to this in every Urban Agriculture setting.


Step by step build up process:


1. Assemble the kit, circuits and connect the sensors


Take out your kit, get the shield on top of the board and connect it to your PC just to check if it blinks.


Now grab the following sensors:


And connect them to the board via some jumpers! But Use A0 and D7 to connect them to the board. Humidity, Air Temperature and a lot more variables are provided by the Shield from the kit making it much simpler than my past iterations.


No need for the GNSS module this time!


2. Valve Module:


Once the main circuit is completed, make the automated irrigation valve.


Bill of Materials:


-Photon Particle (or any other Wifi board).




-12v Source.


-Solenoid Valve Nc 1/2.


-Diode 1N4007.


-1 Resistances of 2.2kohm.


-Cable, Solder, Jump wire or similar.



Real implementation:


Refrain from uploading both the Photon and Helium kit code at this moment, because we will need certain credentials.


2. Create your Node-Red Dashboard


Follow this guide here:


That is a guide for the absolute beginner, but taking a look at our flow we can see several instances of what we are doing.


By using the MQTT node, we will sync it to AWS which our message broker for the internet of things, our two "things" have to be setup to this broker, but that part has to be manually done.


Go ahead and create a user on that platform or any other, you can also use Google IoT, IBM or Azure according to taste. At this point you will have to input your credentials into the Argon code. Just replace the proper information on the code.


Now we will go ahead and explain the configuration of the nodes which is very easy.


By taking both the "start" and "end" MQTT nodes we will form a messaging "bridge" so the Dashboard can "hear" the messages on Cloudmqtt. Grab the end node, go to server and then click on the edit icon to configure this part of the node.


Now input your credentials from the MQTT broker of your choice, here is done with Cloudmqtt.

Then grab the "start" node and set it up like so:


Notice the Topic, it is set up according to the topic of the sensor you will be using in this case the soil temperature sensor and is in accordance to the code on the Argon.


You'll have to do this three times (or whichever you need) if you are mannually creating the dashboard or just grab the code at the end and ONLY input into it your credentials.

3. Irrigation system via Openweathermap Forecast and Particle Photon.


We have to explain first the why's before the know how's.


The use of tracking the forecast of the weather is the main purpose of the project itself, that is to optimize water usage.


What use there is of having a sensor that tracks that the soil is dry and activate an irrigation system with that info, but it is going to rain that same day?


We can save a lot of water simply by using the weather forecast systems available to notify our platform that it is going to rain and stop from using water that day.


And of course we want to automate everything.


Without further ado:


1.- Get to: and Sign up.


2.- After that then simply go to Sign In and click on API Keys, then copy the API KEY.


3.- Go then to your Node-RED flow. Remember the openweathermap node? Drag it to the Node-RED dashboard and configure it like so:


4.- 记得在前面粘贴一个“注入”节点,在后面粘贴一个“功能”节点,如果你想检查已经传输的内容,还要粘贴一个“调试”节点。


Double click the function node and paste the following code:

msg.payload= msg.payload[0].weather[0].main
msg.count = msg.payload
return msg;

What this does, is to seek the weather condition that we desire which is "Rain" and it puts it into the payload of the flow.


You can also grab a Text Dashboard node and connect it to this flow to get this info to the dashboard.


6.- Go to your particle IDE and paste the code for the Photon.


The main point of the code is understanding that it creates a function that can be accessed via the particle cloud. Whenever you input certain conditions to that functions externally you can do some previous programmed actions.

Flash it and go back to Node-RED. If you need aditional help with the Photon go directly to for a great place to begin.


7.- Now in Node-RED make a flow like so:


The Particle node is indeed the function node.

8.- Double click on the Particle node and click on the pencil on "Add new particle cloud". Then fill it like so:


Your access token is in your particle IDE, Devices section and clicking on the current device you are using. Update and in the next screen fill it with your device name that you can get on the Particle IDE and also on "CLoud Function" input "led".


9.- Now your Particle Photon node is configured to get an "on" or "off" payload and do the appropriate action with it.


10.- To configure properly the email node you have to log in to your gmail account and then go to: and turn it on, if you followed this guide accordingly, you set a password and username to your Node-RED so this procedure should be safe.


Then just fill the required fields.


11.- The most important step:


Finally, you have reached the end of this part of the tutorial so you have an idea of how to do the main parts of the project. Next is to do your own and use the concepts to get to a final product like the one presented here. There is also the main Flow that we did but we strongly suggest the reader to cultivate their own so you can have a great information harvest.


If you still want to have a complete solution in the "code section" there is the Node Red flow used in the project, which you should load into the Jetson Nano or any other computer (hint: that includes cloud services).


4. Going Green: Solar Power


This device has to have a solar panel to reduce the cost of infrastructure.


We recommend that you use at least a 2.5W Solar panel (I tried on a 2W panel and failed, it got very low power and lifetime) in tandem with a LiPo Battery like in the following circuit:


The power segment of the circuit is intended to power the circuit via a Solar Power during the day and then charge the LiPo battery so it can continue working at night.


For this purpose you can see the Regulator in the image that is a connection module that regulates the LiPo battery charge and the Solar Panel feeding energy to the system.


As previously stated I tried with my small 2W panel, but we are in the rainy season where I live so we need a bigger panel. I urge someone who already has the bigger panel to try it. For the Demo I will be using a Battery. BE very wary when trying this setup, I would go to battery just to be sure and by the way it will be an external one, because for it to work with the AA it may, you have to destroy a resistance.


Here are some reccomended links to these components:


Sunny Buddy:


Lipo Rider pro:


Solar panel:


LiPo Battery:


Now its time to upload the code into your dev board! (If you have already input your credentials properly beforehand, if not go to the next step). Get everything into their cases (3D CAD models provided).


At this point we have the two "Things" of our AIoT solution that sense and actuate.


5. Connect to Helium


First we need to create our account on the Helium console to get the previously needed credentials:


Go to the Devices tab to get the credentials. And create a Device to get them.


And save these values as they are your credentials!


Set up your Kit.


Follow the official guides to program it all with Arduino IDE!


Through Arduino's library manager Add the following libraries to Arduino IDE:


Now download the code for the kit provided at the bottom of this tutorial and input the credentials in the corresponding place:



Helium Console Check:


Once I had done the Setup on my board, I tried to send data to the Helium network, to my surprise I was able to correctly establish the connection to the network from a nearby Gateway in my city.


NOTE AND KUDOS!: Actually the Gateway was setup by one of my compadres developers. Victor (on Hackster: completed his own gateway and he will have his documentation on everything including how to set up the miner on his Helium project's submision. I was in his vicinity while doing the project and he told me he was going to try and do a Gateway.


Check him out:


The project would not have existed without that gateway.


The Gateway which gave me the connectivity to the Helium network had this name.


AWS IoT Setup Integration:


Thanks to the Helium Console and its AWS IoT integration guide, I was able to quickly setup as seen below.


In this case, the Topic that I chose to send the data to AWS IoT was /GatewayAWS in the us-east-1 region.


Within AWS IoT we can see that every time we send a piece of information we obtain the following.


To connect AWS with NodeRED we must create the credentials in AWS IoT Core, we will go to the OnBoard section.


Then to get started.


Again to Get started.


We configure the credential for Linux and the Python Language.


We put whatever name we want, in my case I named it NodeRED.


We download the credential pack and give it Next Step.


我们进入 NodeRED Thing,因为我们必须授予我们的凭证完全权限。


We enter the Security section and enter the Policy.


We edit the policy as shown on the screen to have full permissions.


In the settings section copy your Custom Endpoint since we will use it to configure NodeRED.


We will put our custom endpoint in the Server Name section and enter the TLS configuration.


We leave you in Github in the Cert folder the AWS CA Cert, the Certificate and the Private Key will be in the folder that we downloaded when creating the Thing.


In this case, since the payload that Helium is sending us is encoded in base64, we have to decode it in NodeRED with the atob() command. For more information on this process:

const encodedData = window.btoa('Hello, world'); // encode a string
const decodedData = window.atob(encodedData); // decode the string

6. Get some cases!


I took the time to make some cases for the project and the result is quite good as you can see:


Money Shots!


You can find the STLs at the bottom and in the project's Github!Now we have everything setup and running let's do some testing.


Testing the Prototype:

Last video, here is how I installed the prototype in my Grove:

Benefits and Sustainability


As long as we can push initiatives like this forward we can get:


1. Reduction in Carbon emmisions The average meal has traveled 4, 200 miles just to get to your table. Urban agriculture helps consumers reduce their “foodprint” by providing them the opportunity to purchase food that was grown within their community.


2. Creating Jobs These farms create opportunities to involve the community. Urban farms create jobs (and volunteer) opportunities in big cities, where poverty and hunger are often persistent issues.


3.- Stimulates your local economy which also builds the community around. An increase in small businesses stimulates local economy and supports the community by creating jobs right where people live.


4. Healthcare.- Bringing nutritious food to local communities has many direct health benefits, including reducing the risk of harmful conditions like heart disease, obesity, diabetes, and more.


5. Food quality.-These farms preserve biodiversity by cultivating heirloom varieties or those with lower shelf-stability. The proximity and connectedness to market allows for fresh, nutritious produce to become available to communities that have never had access to this in the past.


6. Green spaces: This contributes to the health of city ecosystems in a variety of ways. Greenery adds aesthetic appeal, reduces runoff from precipitation, provides restful spaces for the community, and counters the heat island effect by fixing carbon.


Commentary and Future Rollout


Sustainable disruption is needed because current methods are insufficient for the rising demand, infrastructure is costly and most fields are in remote areas. Also despite what it promises urban agriculture needs a cheap and readily available solution, for it to be sustainable. And COVID-19 just came to aggravate this situation even more.

The current project offers an initial solution to these problems by starting with one of my own, but it is not difficult to see how one of these can expand. This offers a cheap and affordable solution that can serve the local, home or urban farmer as it can automate several of their processes and most important of all provide valuable information about their crops that they can use to make good decisions.


Thinking about the future of the project, I think that Helium is a potent solution to this. We now have tried with WiFi boards, Cellular, Sigfox, but if we take into consideration the versatility of LoRa and the fact that the Helium Network also provides an incentive to feed the network, this is a much more robust solution. We have yet to try with a couple more technologies, but as a Blockchain aficionado, I think we have found our home with Helium.






Valve module

Schematic of the valve module


Helium kit

How to conect the sensors to the helium kit.


Helium Solar

This is the way to add Solar power.




Photon Code


This code is to activate the irrigation system whenever the conditions of the Node-RED flow are met. In fact whenever the platform detects that there will be no rain and the sensors indicate that the soil is dry, it will send a signal to the Valve portion and it will activate.

// -----------------------------------
// Controlling AgroHelium's irrigation over the Internet
// -----------------------------------

// First, let's create our "shorthand" for the pins
// Same as in the Blink an LED example:
// led1 is D0, led2 is D7

int led1 = D0;
int led2 = D7;

// Last time, we only needed to declare pins in the setup function.
// This time, we are also going to register our Particle function

void setup()

   // Here's the pin configuration, same as last time
   pinMode(led1, OUTPUT);
   pinMode(led2, OUTPUT);

   // We are also going to declare a Particle.function so that we can turn the LED on and off from the cloud.
   // This is saying that when we ask the cloud for the function "led", it will employ the function ledToggle() from this app.

   // For good measure, let's also make sure both LEDs are off when we start:
   digitalWrite(led1, LOW);
   digitalWrite(led2, LOW);


// Last time, we wanted to continously blink the LED on and off
// Since we're waiting for input through the cloud this time,
// we don't actually need to put anything in the loop

void loop()
   // Nothing to do here

// We're going to have a super cool function now that gets called when a matching API request is sent
// This is the ledToggle function we registered to the "led" Particle.function earlier.

int ledToggle(String command) {
    /* Particle.functions always take a string as an argument and return an integer.
    Since we can pass a string, it means that we can give the program commands on how the function should be used.
    In this case, telling the function "on" will turn the LED on and telling it "off" will turn the LED off.
    Then, the function returns a value to us to let us know what happened.
    In this case, it will return 1 for the LEDs turning on, 0 for the LEDs turning off,
    and -1 if we received a totally bogus command that didn't do anything to the LEDs.

    if (command=="on") {
        return 1;
    /*Well we are going to irrigate them plants for 30 seconds each time we need
    else if (command=="off") {
        return 0;
    else {
        return -1;

Helium Kit code


Code for the Helium Kit, use Arduino IDE with the previously shown libraries installed.

#include <ArduinoJson.h>
#include <avr/dtostrf.h>
#include <HTS221Sensor.h>
#include "LoRaWAN.h"
#include <OneWire.h>
#include <DallasTemperature.h>

#define DEV_I2C Wire
#define ONE_WIRE_BUS 7
#define Moisture A0

const char *devEui = "DEVEUI";
const char *appEui = "APPEUI";
const char *appKey = "APPKEY";

// Components
HTS221Sensor *HumTemp;
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);

unsigned long time1;

String LoraJSON="{";

void setup() {
  StaticJsonDocument<200> doc;
  HumTemp = new HTS221Sensor (&DEV_I2C);
  LoRaWAN.begin(US915);                   // Helium SubBand
  LoRaWAN.joinOTAA(appEui, appKey, devEui);

void loop() {
  if((millis() - time1) > 60000)
  float humidity = 0, temperature = 0;
  LoraJSON += "\"h\":";
  LoraJSON += String(humidity);
  LoraJSON += ",";
  LoraJSON += "\"t\":";
  LoraJSON += String(temperature);
  LoraJSON += ",";
  LoraJSON += "\"m\":";
  LoraJSON += String(map(analogRead(Moisture), 0, 2400, 0, 100));
  LoraJSON += ",";
  LoraJSON += "\"st\":";
  LoraJSON += String(sensors.getTempCByIndex(0));
  LoraJSON += "}";

  if (LoRaWAN.joined() && !LoRaWAN.busy())
        // Send Packet
        uint8_t payload[] ="";
        LoraJSON.getBytes(payload, sizeof(LoraJSON));
        LoRaWAN.sendPacket(1, payload, sizeof(payload));
        Serial.println("Data Sent");

Node-RED flow example


Note: You have to input your credentials! And set up AWS

[{"id":"d54f704.bf0ee9","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"b71e9be9.a530e8","type":"ui_gauge","z":"d54f704.bf0ee9","name":"Tempamb","group":"da917d62.21223","order":1,"width":0,"height":0,"gtype":"gage","title":"","label":"°C","format":"{{value}}","min":0,"max":"55","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":849,"y":51,"wires":[]},{"id":"c2ed1e76.6c3a3","type":"inject","z":"d54f704.bf0ee9","name":"","topic":"","payload":"","payloadType":"date","repeat":"180","crontab":"","once":false,"onceDelay":0.1,"x":256,"y":155.5,"wires":[["cc28bd73.e9db8","3fea0ab7.5fdbb6"]]},{"id":"cc28bd73.e9db8","type":"http request","z":"d54f704.bf0ee9","name":"letempambchannel","method":"GET","ret":"obj","paytoqs":false,"url":"","tls":"","proxy":"","authType":"","x":430,"y":183.8000030517578,"wires":[["bc683765.9ebe28","b55ba38a.80c78","33503075.93f02","dd55dab6.debea8","75a7f137.cf319"]]},{"id":"bc683765.9ebe28","type":"function","z":"d54f704.bf0ee9","name":"Field1","func":"if (msg.topic= '/TTemp'){\n    return msg\n}\nelse null","outputs":1,"noerr":0,"x":628,"y":164.8000030517578,"wires":[["b71e9be9.a530e8","bc639e29.675ff","5ea9f2f3.eacbcc"]]},{"id":"b55ba38a.80c78","type":"function","z":"d54f704.bf0ee9","name":"Field 2","func":"if (msg.topic= 'THumd'){\n    return msg\n}\nelse null","outputs":1,"noerr":0,"x":637.0000076293945,"y":228.8000032901764,"wires":[["2bbd01c5.c6571e","68ab5dff.826884","d82d8369.04b55"]]},{"id":"33503075.93f02","type":"function","z":"d54f704.bf0ee9","name":"Field 3","func":"if (msg.topic= '/Hi'){\n    return msg\n}\nelse null","outputs":1,"noerr":0,"x":631,"y":295.79998779296875,"wires":[["d8453f36.ce3ff","9a9d3455.4b8078","2db10adf.a490d6"]]},{"id":"dd55dab6.debea8","type":"function","z":"d54f704.bf0ee9","name":"Field 4","func":"if (msg.topic= '/Temp'){\n    return msg\n}\nelse null","outputs":1,"noerr":0,"x":770,"y":488.7999572753906,"wires":[["69e52fbe.28b02","5f3a9c37.7dfc24"]]},{"id":"75a7f137.cf319","type":"function","z":"d54f704.bf0ee9","name":"Field 5","func":"if (msg.topic= '/Humd'){\n    return msg\n}\nelse null","outputs":1,"noerr":0,"x":724,"y":586.7999267578125,"wires":[["138d670.cdc4599","659d0c77.d93544"]]},{"id":"bc639e29.675ff","type":"ui_chart","z":"d54f704.bf0ee9","name":"","group":"da917d62.21223","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":868,"y":179,"wires":[[]]},{"id":"2bbd01c5.c6571e","type":"ui_gauge","z":"d54f704.bf0ee9","name":"","group":"943d39a6.673eb8","order":1,"width":0,"height":0,"gtype":"gage","title":"","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":883,"y":246,"wires":[]},{"id":"68ab5dff.826884","type":"ui_chart","z":"d54f704.bf0ee9","name":"","group":"943d39a6.673eb8","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0f","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":879,"y":286,"wires":[[]]},{"id":"d8453f36.ce3ff","type":"ui_text","z":"d54f704.bf0ee9","group":"fa354d69.38286","order":1,"width":0,"height":0,"name":"","label":"32.2 °C es un indice óptimo","format":"{{msg.payload}}","layout":"row-spread","x":949,"y":339,"wires":[]},{"id":"9a9d3455.4b8078","type":"ui_chart","z":"d54f704.bf0ee9","name":"","group":"fa354d69.38286","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9367bc","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":870,"y":382,"wires":[[]]},{"id":"2db10adf.a490d6","type":"ui_gauge","z":"d54f704.bf0ee9","name":"","group":"fa354d69.38286","order":3,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"°C","format":"{{value}}","min":"15","max":"44.4","colors":["#fff647","#0fe600","#ca3838"],"seg1":"","seg2":"","x":878,"y":426,"wires":[]},{"id":"69e52fbe.28b02","type":"ui_gauge","z":"d54f704.bf0ee9","name":"","group":"1eea84e2.a6a39b","order":1,"width":0,"height":0,"gtype":"gage","title":"","label":"°C","format":"{{value}}","min":0,"max":"55","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":953,"y":476.99993896484375,"wires":[]},{"id":"5f3a9c37.7dfc24","type":"ui_chart","z":"d54f704.bf0ee9","name":"","group":"1eea84e2.a6a39b","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#99df8b","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":2,"x":950,"y":516.9999389648438,"wires":[[],[]]},{"id":"138d670.cdc4599","type":"ui_gauge","z":"d54f704.bf0ee9","name":"","group":"ac4dfa91.7834e8","order":1,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":926,"y":565.9999389648438,"wires":[]},{"id":"659d0c77.d93544","type":"ui_chart","z":"d54f704.bf0ee9","name":"","group":"ac4dfa91.7834e8","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9367bc","#c5b0d5"],"useOldStyle":false,"outputs":2,"x":930,"y":603.9999389648438,"wires":[[],[]]},{"id":"3fea0ab7.5fdbb6","type":"openweathermap","z":"d54f704.bf0ee9","name":"le weather","wtype":"forecast","lon":"-111.6252","lat":"28.6208","city":"","country":"","language":"en","x":294,"y":328.54998779296875,"wires":[["57629c1a.d40d34","f5161b3b.485d68"]]},{"id":"57629c1a.d40d34","type":"debug","z":"d54f704.bf0ee9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":426,"y":247.64999389648438,"wires":[]},{"id":"f5161b3b.485d68","type":"function","z":"d54f704.bf0ee9","name":"","func":"msg.payload= msg.payload[0].weather[0].main\nmsg.count = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":432,"y":386.79998779296875,"wires":[["d138d2e6.c6d0b","7c117a1c.e964c4","d7c75f54.44c41"]]},{"id":"d138d2e6.c6d0b","type":"ui_text","z":"d54f704.bf0ee9","group":"a0b15c24.8c44f","order":1,"width":0,"height":0,"name":"","label":"Weather forecast next 5hr:","format":"{{msg.payload}}","layout":"row-spread","x":417,"y":568.9999694824219,"wires":[]},{"id":"a6824305.b2afb","type":"inject","z":"d54f704.bf0ee9","name":"","topic":"","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":277,"y":636.4999694824219,"wires":[["7b14c92c.984058"]]},{"id":"b75ebb82.10c468","type":"debug","z":"d54f704.bf0ee9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1061,"y":727.6499938964844,"wires":[]},{"id":"db1d7f95.a8022","type":"inject","z":"d54f704.bf0ee9","name":"","topic":"","payload":"off","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":246,"y":682.4999694824219,"wires":[["7b14c92c.984058"]]},{"id":"d82d8369.04b55","type":"link out","z":"d54f704.bf0ee9","name":"","links":["a5e4a74e.02cf88"],"x":866,"y":114.65000915527344,"wires":[]},{"id":"a5e4a74e.02cf88","type":"link in","z":"d54f704.bf0ee9","name":"","links":["d82d8369.04b55"],"x":164,"y":751.4999694824219,"wires":[["d7c75f54.44c41"]]},{"id":"d7c75f54.44c41","type":"function","z":"d54f704.bf0ee9","name":"","func":"if (msg.topic<=10 && msg.count != 'Rain' && msg.count !=null){\n    msg.payload= 'on'\n}\nelse{\n    msg.payload= 'off'\n}\nreturn msg;","outputs":1,"noerr":0,"x":507,"y":712.8000183105469,"wires":[["7b14c92c.984058"]]},{"id":"7c117a1c.e964c4","type":"debug","z":"d54f704.bf0ee9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"count","x":534,"y":795.6499938964844,"wires":[]},{"id":"92230e74.58da8","type":"inject","z":"d54f704.bf0ee9","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":198,"y":416.5,"wires":[["17e473f4.94fccc"]]},{"id":"17e473f4.94fccc","type":"function","z":"d54f704.bf0ee9","name":"","func":"msg.count = 'Arid'\nreturn msg;","outputs":1,"noerr":0,"x":227,"y":470.79998779296875,"wires":[["d7c75f54.44c41"]]},{"id":"faf966fe.81b9c8","type":"inject","z":"d54f704.bf0ee9","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":317,"y":839.4999694824219,"wires":[["d7c75f54.44c41"]]},{"id":"7b14c92c.984058","type":"particle-func","z":"d54f704.bf0ee9","pcloud":"","devid":"","fname":"led","param":"","productIdOrSlug":"","repeat":0,"once":false,"x":690.6000366210938,"y":684,"wires":[["b75ebb82.10c468"]]},{"id":"41630b81.dc6664","type":"mqtt out","z":"d54f704.bf0ee9","name":"","topic":"trololo","qos":"","retain":"","broker":"3d531172.90ad8e","x":609.2000350952148,"y":95,"wires":[]},{"id":"834f5172.edce9","type":"inject","z":"d54f704.bf0ee9","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":408.2000045776367,"y":101,"wires":[["41630b81.dc6664"]]},{"id":"a4420acd.382008","type":"mqtt in","z":"d54f704.bf0ee9","name":"","topic":"/TTemp","qos":"2","datatype":"auto","broker":"3d531172.90ad8e","x":412.2000045776367,"y":40,"wires":[["bc683765.9ebe28","310e6798.9ab728"]]},{"id":"5ea9f2f3.eacbcc","type":"debug","z":"d54f704.bf0ee9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":767.2000122070312,"y":92.60000610351562,"wires":[]},{"id":"310e6798.9ab728","type":"debug","z":"d54f704.bf0ee9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":574.2000350952148,"y":31.599998474121094,"wires":[]},{"id":"3d6ed8a6.558558","type":"mqtt in","z":"d54f704.bf0ee9","name":"","topic":"/THumd","qos":"2","datatype":"auto","broker":"3d531172.90ad8e","x":448.6000518798828,"y":142.00000190734863,"wires":[["b55ba38a.80c78"]]},{"id":"c10cf99b.177428","type":"ui_template","z":"d54f704.bf0ee9","group":"2940f35.d8d240c","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"1069\" height=\"446.5\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":719.0001106262207,"y":862.0000123977661,"wires":[[]]},{"id":"7a84350e.52502c","type":"mqtt in","z":"d54f704.bf0ee9","name":"","topic":"/Temp","qos":"2","datatype":"auto","broker":"3d531172.90ad8e","x":460.60003662109375,"y":340,"wires":[["dd55dab6.debea8"]]},{"id":"a0232e37.b75bc","type":"mqtt in","z":"d54f704.bf0ee9","name":"","topic":"/Humd","qos":"2","datatype":"auto","broker":"3d531172.90ad8e","x":415.60003662109375,"y":516,"wires":[["75a7f137.cf319"]]},{"id":"98ee5684.f95328","type":"mqtt in","z":"d54f704.bf0ee9","name":"","topic":"/Hi","qos":"2","datatype":"auto","broker":"3d531172.90ad8e","x":450.60003662109375,"y":291,"wires":[["33503075.93f02"]]},{"id":"9f300d50.5ba36","type":"ui_template","z":"d54f704.bf0ee9","group":"3bbc941d.0f26ac","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n   <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":815.6000595092773,"y":899.8000135421753,"wires":[[]]},{"id":"1f719032.401ed","type":"ui_template","z":"d54f704.bf0ee9","group":"de9fe46d.6ef1e8","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":888.6000137329102,"y":863.0000123977661,"wires":[[]]},{"id":"da5e18b4.652db8","type":"comment","z":"d54f704.bf0ee9","name":"Corn Historics","info":"\n","x":809.6000366210938,"y":824,"wires":[]},{"id":"55b53593.1c2f0c","type":"comment","z":"d54f704.bf0ee9","name":"Wheat Historics","info":"","x":820.6000366210938,"y":957,"wires":[]},{"id":"98137703.4780b8","type":"comment","z":"d54f704.bf0ee9","name":"Tomato Historics","info":"","x":425.60005950927734,"y":912.0000171661377,"wires":[]},{"id":"24ad6bd2.f1f1f4","type":"ui_template","z":"d54f704.bf0ee9","group":"e8d3af85.b2848","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":685.6000366210938,"y":1009,"wires":[[]]},{"id":"4ffa8be7.399834","type":"ui_template","z":"d54f704.bf0ee9","group":"838c1d4a.34ff5","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":823.6000366210938,"y":1009,"wires":[[]]},{"id":"e9e5a105.7b037","type":"ui_template","z":"d54f704.bf0ee9","group":"12e7ee6f.cd9d62","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":736.6000366210938,"y":1060,"wires":[[]]},{"id":"6c90c595.b2e7bc","type":"ui_template","z":"d54f704.bf0ee9","group":"6650034d.326bdc","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":337.6000061035156,"y":954,"wires":[[]]},{"id":"9839ba3b.00fe58","type":"ui_template","z":"d54f704.bf0ee9","group":"cf91e364.e8a0f","name":"","order":1,"width":0,"height":0,"format":"<html>\n<header><title>This is title</title></header>\n<body>\n    <iframe width=\"600\" height=\"371\" seamless frameborder=\"0\" scrolling=\"no\" src=\";format=interactive\"></iframe>\n</body>\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":472.6000061035156,"y":954,"wires":[[]]},{"id":"3cece591.4ed3aa","type":"ui_text","z":"d54f704.bf0ee9","group":"b71602f7.89cbc","order":0,"width":0,"height":0,"name":"","label":"Tendency: Strong Sell","format":"{{msg.payload}}","layout":"row-spread","x":995.6000137329102,"y":897.0000095367432,"wires":[]},{"id":"cc849ed0.d6a19","type":"ui_text","z":"d54f704.bf0ee9","group":"ab3d5fbb.a8cff","order":0,"width":0,"height":0,"name":"","label":"Tendency: Strong Sell","format":"{{msg.payload}}","layout":"row-spread","x":925.6000366210938,"y":1056,"wires":[]},{"id":"f6acf20d.9335a","type":"ui_text","z":"d54f704.bf0ee9","group":"475df64c.fb8418","order":1,"width":0,"height":0,"name":"","label":"253 m2/ha per month","format":"{{msg.payload}}","layout":"row-spread","x":1082.5999755859375,"y":836,"wires":[]},{"id":"5d4af0cf.67b78","type":"mqtt in","z":"d54f704.bf0ee9","name":"","topic":"/AgroJetson","qos":"2","datatype":"auto","broker":"3d531172.90ad8e","x":416.5,"y":431,"wires":[["ea57f083.78f75","59b7bb1a.5780a4"]]},{"id":"ea57f083.78f75","type":"function","z":"d54f704.bf0ee9","name":"Jetson feed","func":"if (msg.topic= '/AgroJetson'){\n    return msg\n}\nelse null\n","outputs":1,"noerr":0,"x":672.5,"y":380,"wires":[["3f38bd11.0c9512"]]},{"id":"3f38bd11.0c9512","type":"ui_text","z":"d54f704.bf0ee9","group":"1bff5372.0ef22d","order":4,"width":0,"height":0,"name":"","label":"Ripeness detector:","format":"{{msg.payload}}","layout":"row-spread","x":1122.5,"y":408,"wires":[]},{"id":"59b7bb1a.5780a4","type":"debug","z":"d54f704.bf0ee9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":582.5,"y":474,"wires":[]},{"id":"da917d62.21223","type":"ui_group","z":"","name":"Soil Temperature","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"943d39a6.673eb8","type":"ui_group","z":"","name":"Soil Humidity","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"fa354d69.38286","type":"ui_group","z":"","name":"Heat index","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"1eea84e2.a6a39b","type":"ui_group","z":"","name":"Ambient Temperature","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"ac4dfa91.7834e8","type":"ui_group","z":"","name":"Humidity","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"a0b15c24.8c44f","type":"ui_group","z":"","name":"Weather Forecast","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"3d531172.90ad8e","type":"mqtt-broker","z":"","name":"cloudmqtt","broker":"","port":"13853","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"2940f35.d8d240c","type":"ui_group","z":"","name":"Sembrado, cosechado, obtenido","tab":"145dad5c.d9e343","disp":true,"width":21,"collapse":false},{"id":"3bbc941d.0f26ac","type":"ui_group","z":"","name":"Productividad","tab":"145dad5c.d9e343","disp":true,"width":"12","collapse":false},{"id":"de9fe46d.6ef1e8","type":"ui_group","z":"","name":"Precio","tab":"145dad5c.d9e343","disp":true,"width":12,"collapse":false},{"id":"e8d3af85.b2848","type":"ui_group","z":"","name":"Tendencia general","tab":"8e80e1c.5bcb22","disp":true,"width":12,"collapse":false},{"id":"838c1d4a.34ff5","type":"ui_group","z":"","name":"Productividad trigo","tab":"8e80e1c.5bcb22","disp":true,"width":12,"collapse":false},{"id":"12e7ee6f.cd9d62","type":"ui_group","z":"","name":"Precio","tab":"8e80e1c.5bcb22","disp":true,"width":12,"collapse":false},{"id":"6650034d.326bdc","type":"ui_group","z":"","name":"Tendencia Jitomate","tab":"c76e23e3.dfa49","disp":true,"width":12,"collapse":false},{"id":"cf91e364.e8a0f","type":"ui_group","z":"","name":"Productividad ","tab":"c76e23e3.dfa49","disp":true,"width":12,"collapse":false},{"id":"b71602f7.89cbc","type":"ui_group","z":"","name":"Pronóstico","tab":"145dad5c.d9e343","disp":true,"width":"6","collapse":false},{"id":"ab3d5fbb.a8cff","type":"ui_group","z":"","name":"Pronóstico trigo","tab":"8e80e1c.5bcb22","disp":true,"width":"6","collapse":false},{"id":"475df64c.fb8418","type":"ui_group","z":"","name":"Water Consumption","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"1bff5372.0ef22d","type":"ui_group","z":"","name":"Ripeness","tab":"ff7289e7.1cdf78","disp":true,"width":"6","collapse":false},{"id":"ff7289e7.1cdf78","type":"ui_tab","z":"","name":"AgroFox","icon":"dashboard","disabled":false,"hidden":false},{"id":"145dad5c.d9e343","type":"ui_tab","z":"","name":"Historicos Maiz","icon":"dashboard","order":2,"disabled":false,"hidden":false},{"id":"8e80e1c.5bcb22","type":"ui_tab","z":"","name":"Históricos Trigo","icon":"dashboard","disabled":false,"hidden":false},{"id":"c76e23e3.dfa49","type":"ui_tab","z":"","name":"Históricos Jitomate","icon":"dashboard","disabled":false,"hidden":false}]

AgroHelium Repository

The repo!

The article was first published in hackster, October 20, 2021


author: EdOliver


All Rights