Automation IOT/Smart Tech/Remote Control-Monitor Questions & Discussion

Overgrowtho

Well-Known Member
Hi all, I've been setting up a grow that is ALMOST fully automated and remote-controlled/monitored: lights, co2, humidity, temperatures, fans etc.

For this, I am using the "Tuya" system of Smart Home technology. Which I think many of you never heard of before?

I was asked by a master grower to help him with a pilot project at a university, to do an automated grow like this which can, eventually be used by the masses when home medical grows are legalized. Or that we can use to manage/monitor many grows across the country, from a central location.

1. Therefore I am looking for any additional ideas and resources that I should know about, as a new expert on smart grow tech. In general please point to any great broad resources I should know about?

2.
Also for the future, I would like to ask recommendations for systems to control irrigation and nutrients (dosimeter). Ideally, ones can can easily integrate with the whole smart-home-tech (IOT) "internet of things" platform as I have not yet found great solutions for those within the system I am on.

3. In case we would eventually hire a hardware/software company or freelancer to make some system for us, is any recommended resource or marketplace for that?

Really appreciate your help everyone!
 

vostok

Well-Known Member
Hi all, I've been setting up a grow that is ALMOST fully automated and remote-controlled/monitored: lights, co2, humidity, temperatures, fans etc.

For this, I am using the "Tuya" system of Smart Home technology. Which I think many of you never heard of before?

I was asked by a master grower to help him with a pilot project at a university, to do an automated grow like this which can, eventually be used by the masses when home medical grows are legalized. Or that we can use to manage/monitor many grows across the country, from a central location.

1. Therefore I am looking for any additional ideas and resources that I should know about, as a new expert on smart grow tech. In general please point to any great broad resources I should know about?

2.
Also for the future, I would like to ask recommendations for systems to control irrigation and nutrients (dosimeter). Ideally, ones can can easily integrate with the whole smart-home-tech (IOT) "internet of things" platform as I have not yet found great solutions for those within the system I am on.

3. In case we would eventually hire a hardware/software company or freelancer to make some system for us, is any recommended resource or marketplace for that?

Really appreciate your help everyone!
Ardino are the simplist, open tooled for easy access and modular up too
I doubt tuya have the simplicity or the cost

but I'm all ears

good luck

ps.....'be used by the masses when home medical grows are legalized' ..lol
 
I figure any building automation system (BAS) could be put to use for a grow op - that's what they do: monitor and control HVAC systems which include things like fans, burners, valves, pumps... PLC means you can program them to come one whenever and monitor for x or y environmental variable like temp or humidity or conductivity or whatever... endless possibilities really.
 

Kervork

Well-Known Member
Hi Kervork.

Thanks for your reply. Do you use it for agriculture or other? Can you go into a bit more details please?
I use it for everything :) RFID for door locks, operating irrigation valves, monitoring water pressure, maintaining temperature, pasteurizer PID controllers, provisioning IP phones, timers, temp sensors, evaporative coolers.

NodeRed is many things, but I would describe it as a graphical rapid design and prototyping finite state directed graph tool which has a large library of community contributed nodes allowing easy interfacing to both real world devices and software systems. It is not limited to just automation stuff, however in the automation world it often is used to act as a compatibility layer between multiple automation technologies since it speaks many protocols.
 

Kervork

Well-Known Member
I view Arduino as the PF Tek of automation. People search on "Green House Automation" they see Arduino as the first thing. I'm not saying it won't work, just that it's not the easy or the lazy way.
 

Overgrowtho

Well-Known Member
So you are saying that Node Red type of setups are easier and more lazy? Also more powerful and comprehensive?
 

Kervork

Well-Known Member
So you are saying that Node Red type of setups are easier and more lazy? Also more powerful and comprehensive?
A huge amount of the logic is presented to you graphically. It can be organized into flows, sub flows etc. so you can compartmentalize and find things. You have a simplified dash board on the front end which you can completely customize. You can wire in debug nodes anywhere and see exactly what is going on with all data at any given point in time. And it is integrated with Github.

I would say that it is several orders of magnitude faster than hand coding. All languages are inherently equivalent if they are Turing complete so it's technically not more powerful. However since you can create something of value without even knowing programming I would call it very empowering.

Using function nodes you can embed javascript code directly into your flow if you need something where there isn't an existing node. So you are not limited in what you can do if you have skills and if you are a beginning programmer I think there is a tendency to push you towards coding in an environment that is gentle and forgiving. You don't have to know javascript or node.js but NodeRed greatly rewards you for whatever you do choose to learn.

The add on nodes are a big benefit. You want to use Sqlite or Mysql, no problem. There is a node specifically for the RPi which gives you access to all the GPIO pins. https://flows.nodered.org/ Has not only sample flows but add in nodes. It takes about a minute to install one through the GUI. Or you can do it with NPM.

All that said, setting up node red does take some minor skills. I think it might be built into the full version of Raspian. I've been working with Linux for 30 years so underestimate difficulty of some of the infrastructure things. There are a lot of howto's and installation scripts however so I don't think it is something that is horribly technical or difficult. My opinion is that it's a hell of a lot easier to set up than getting arduino working and compiling and uploading a sketch. Do it once and you can just copy the SD card.
 

Kervork

Well-Known Member
nr.png

For those of you who haven't seen NodeRed

This is a node red flow to control an evaporative cooler, run it on a schedule with ramp thermostat, manual override and lots of extra features.
It generates a web interface with buttons, graphs and stuff like that. It talks to remote temperature sensors. The code is a bit sloppy and could be much more compact.
Eventually the server will talk to the evap cooler, inline fans, lights, temp sensors etc. and be able to control the whole setup. Everything is scattered through the facility so physically connecting devices is not an option. Wifi makes it easy.

In this case I'm controlling the devices via HTTP. MQTT works well too. If you are using an RPi you can control the gpio pins directly. I also have some wireless and wired ethernet relays with 8 ports.

There is a lot of extra crap in here and it could be cleaned up a lot. There is still left over stuff from the heating system and I've learned a lot more since I built this.

The nice thing is that the server will have access to everything. It will be able to control inline fans, pumps, temperature probes, lights etc. All these devices are scattered though the facility and no way to physically connect them so they run over WiFi.
 

Overgrowtho

Well-Known Member
@Kervork Thanks for sharing your experience on the software/platform.

So what do you use for the hardware/sensors etc? How did you put that all together in your case?

Do you think Node Red and some hardware can even be used to control EC and PH for example? Dosing machines?
 

Kervork

Well-Known Member
The sensor MUST NOT be dipped in the detecting liquid for a long time. Comment about EC Sensor by manufacturer.

I found many examples of PH meters, EC meters being interfaced to a Pi. You don't have to get it to work with NodeRed you just have to get it to work with a Pi or an ESP. In the case of RFID readers I run python code and have NR just run the script and grab data. With the Pi you have a full Linux computer so there aren't a lot of limitations. If you can get it to work at the command line, you can get it into NR one way or another.

I have issues with EC and PH automation to begin with. First off, if you are doing it with a small grow I would have to ask what the benefit to effort really is. I used to recirculate nutrients and screw with it and it worked but when I went to just mixing up a 55 gallon drum and doing drain to waste my life got a lot easier. I think the biggest problem lies in the limitations of the probes themselves. They need to be kept calibrated, leaving them in a solution may cause scaling or other problems. If you can get around that and you make very small adjustments continually I don't see a problem. This is where a PID controller comes in handy. You can put a lot of limits on it and force it to make changes as slowly as you want. I would PH adjust a 55 gallon drum, agitate for 10 minutes with a paint stirrer, get a reading I liked and the next day, totally different without touching it. PH changes can take a long time to settle. There are growing techniques which require recirculating nutrients, some of them are very effective so I would agree that in cases like NFT it is necessary. But damn it can be a pain if you are lazy.

The sensors I use for temp are usually one wire ds18b20 or the AM combo temp/humidity. They are cheap you can run as many as you want on one connection. They do have to be calibrated. Photo Infrared, pressure, flowmeter, magnetic switches, I2C Rfid readers. I have had little issue getting various sensors to work. Some are done directly through NR, some are done via command line, Python and the NR exec function. There is a lot of documentation, sample code etc. available for the Raspberry.

Most of the controls are just simple wifi relays via some sort of ESP8266. In the case of RFID readers they are connected directly to a Pi running NR. I have an installation which uses ESP's to run RFID readers and it works but I'm moving away from that because of reliability issues. I have a bunch of Sonoff 4CH's in waterproof boxes with one power cord in and 4 power cords out along with a port for sensors to be connected. They are water tight, cable glands etc. So far no problem overheating. These I use as generic controllers wherever I may need them. Since they are wifi they can be anywhere in the facility.

I also have some Pi Sticks which are used for prototyping. They have breakouts, relays, electrical sockets etc. If I have an idea or a need I will quickly rewire one of these to test it out before making a smaller prototype.

pi-stick.png

Most of the time I have found it easier to just have NR running on a virtual server and control the world via relays and wifi sensors. I will run NR on a pi in those situations where there are a lot of connections to the gpio pins or I need reliability and standalone. I have about a dozen Pi's running as security cameras in various locations. The reliability is phenomenal. They take a hell of a pounding 24/7 and just keep working. I had one Pi running HVAC in a commercial building and I had no issues with it locking up or doing stupid stuff.

I would not trust a single sensor to adjust PH. I would have a second one connected to a relay which would pull the plug on the whole thing and send out a notification if it thought things had gone out of range. I can just imagine a faulty sensor causing PH down to be dumped into the system or something like that. First and foremost, one must assume that something will go horribly wrong and failsafes must be built in for every possibility.

My experience is that people rely on technology too much and common sense and bullet proof solutions not enough. One should always give preference to an analogue solution unless it can be proved that the digital is in fact far superior. Tech companies sell crap people neither need nor understand for a living, that is their nature. Technology has an important placed but we often put it on a pedestal it does not deserve. It is also important that people control the technology they do use. If you are going to have technology, make sure you own it 100% and no ass hat company is going to decide to deprecate it and turn it into a fucking brick so they can sell you a new piece of shit. More than anything, that's why I like dealing with NR, RPi etc. It does what I want, not what fucking Google wants.
 

Overgrowtho

Well-Known Member
Thank you so much for sharing. What a cool little IOT world where anything can be automated, monitored and adjusted remotely. But I love your warnings too. It is not a panacea and still does require considerable effort to get it working safely and with sufficient benefits.
 
Top