Register ICMag Forum Menu Features
You are viewing our:
in:
Forums > Marijuana Growing > Growroom Designs & Equipment > IOT - Irrigation Controller - Xiaomi Plant Monitor/Sensor

Thread Title Search
Click to Visit Venus Vaporizers
Post Reply
IOT - Irrigation Controller - Xiaomi Plant Monitor/Sensor Thread Tools Search this Thread
Old 12-05-2017, 06:06 PM #1
dutty
Guest

Posts: n/a
Exclamation IOT - Irrigation Controller - Xiaomi Plant Monitor/Sensor

Just wondered nobody is going nuts with the new possibilities out there, even my cats blanked got an IP address now..

Im talking about mini computers like raspberry pi, wireless sockets like the sonoffs (eps8266) and in detail xiaomi flower/plant sensors/monitors

Im a geek from birth so it was just a matter of time to automate and log my grows. It took me far to long but im finaly there and im asking myself why i didnt start years ago. Guess the biggest problem was the lack of hardware and the naked code that had to be written.
Alternatives are f.e. the smartbee controller. But prices are heavy. Just the irrigation system costs 3000..

so i started my own.. and ended up with under 100 bucks. How?!

My central unit is a raspberry pi ZeroW running Linux.



Released this year, it is smaller than a credit card, with wlan and bluetooth. Sd card slot, miniusb, mini hdmi. Basicaly a little computer with the power (and power consumption) of a 4 year old smartphone. Thats enough for my purpose.
Costs 11eu (without a case, micro usb power cable or sd card).

I couldve wired some relays to the pins of the raspberry and turn pumps on and of this way, but since i have more than one room and more than one tank/pump i was looking for a more flexible solution.
Ir switches are not reliable enough since there is no confirmation about the switch state...

I came up with sonoff wlan sockets.



They cost 5eu (china) and with some soldering skills that i havent had before i flashed them with custom firmware (tasmota). They can now be controlled by webapp + raspberry pi and can carry additional sensors. I wired a high class bme280 temperature/humidity/pressure sensor to it (6eu).

But the actual star in my team is this little guy here: The xiaomi plant sensor



I saw some other sensors, but they were not reliable or to expansive.

Pros:
Wireless (Bluetooth 4.1 BLE)
4 Sensors in one - Moisture, conductivity (EC/ppm), light and air (not soil) temperature.
Cheap: Ordered from china i payed 11eu a piece (International Version)
Lasts a year with one little battery
capacitive (they dont disolve in soil like cheaper sensors)

Cons:
A bit short
Just Bluetooth (with all its disadvantages, more later)
Initially just to use with the android/ios app

the sensors are meant to be used by the app only. Biggest disadvantage of them are the lack of notifications. They dont call when the soil is to dry. The information can just be retrieved (by smartphone), not sent by sensor on its own.

Thats why you need a "computer" thing that scans the sensors in a regular bases and process them to send the data to the database or a notification service or...
There is a fan base already. A guy wrote a python script that can easily be installed. After that (and some configuration) it collects the data.

I said something about coding... well, even thats different these days. Yes, coding skills are necessary, but the skill can be at script kiddy level, like mine is.

There is a tool called node-red



Its a graphical programming tool. A web app that let you easily wire components together without coding them. There are a lot of "nodes" that take care of functions you would have to code, like filter data, implement switches, write data to a database and so on.
For special functions theres also a function node where you can write your own javascript code (i used it to f.e. calculate my tank level).

Additional software i used:
InfluxDB, database for time series data.

Grafana, a beautiful visualization tool for time series data



Node red Dashboard
an easy to customize dashboard for node-red.

(Mosquitto, a service that controls the communication between sockets and pi)

What my system does:

It logs the sensor data based on room and plant(name)
it calculates average, min max, pitches and so on
It shows predictions (when to water, when to fill tank next time)
it starts the pumps based on calculations by a water content calculator (inspired by cannas recommendations about watering a container plant).

Im still to lazy to write my own android app to get notifications, and so far it was to risky for me to make the node red dashboard public to the internet, so i took the easy route and used the telegram chat bot node. With this its easy to get notifications and control the system.
F.e. i get a message when my pots are at 60%moisture. In this message i include 3 buttons like "water now" and "later" that react instant after pressed. Its lovely.

With this i didnt drown my roots even once - no claws
I havent forgot to fill my tank because i was to lazy to raise the cover.
My mothers didnt freeze after lights off because i found problems in my climate.
i dont have to open rooms to check climate/lights/water.. I look at my smartphone.. on the train
My fogger wasnt empty for days.. hours, if any
I differentiated my strains by thirst

the real power of the sensors is in soil. I use them in coco and had to make some adjustments so the moisture content can be used (automatic max min calibration). The conductivity/ppm sensor cant be used properly in coco, shows really low values, the coco seem to store the nutrients in the fibres...


My system still isnt ready for public. I would like to release it or a manual and some code after the second run without any bigger problems. But i can help with tutorials and documentation if somebody is interested..

I just want to show whats possible and give some ideas. I worked 3 loose months on it with little to no clue about linux or related stuff. I had changed code (script kiddy level) here and there but never did a whole project.

Next i will implement a smart climate controller to the pi. My step transformer has 8 steps and i use 2 with a stone age thermostat... future here we come.


love.. beep buuup
Quote


Old 12-06-2017, 04:06 AM #2
queequeg152
Senior Member

Join Date: Aug 2009
Posts: 1,452
queequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nice
there is no point imo.

all you really need is a gateway(even this is debatable) to log data and or push data- realtime or otherwise, to your email or phone or SMS or what ever, and you dont need a zigbee network to do this.

also IOT is- in general and abomination of, "because you can, doesn't mean you should".

there is no value added in programming a climate controller verses a simple 2 stage thermostat w/ either a heating contact, or an additional heating thermostat.

there is also no value added in programming plug loads to be controlled via a wireless relay board or a wired board or Ethernet board or usb board... there is also no value added in a microcontroller based irrigation controller verses a 100 dollar drip irrigation controller.

i think folks are looking at programmable micro controllers and seeing them as a panacea because they dont understand standard hvac control schemes, or relay logic in general they assume this is the only way or the best way to build very very simple control schemes.

also the sensors sold with these microcontrollers are generally shit, or not suitable for anything beyond hobby use. the RH sensors you see on on these arduino websites sometimes dont even have shields over the film sensors... meanign they are easily contaminated with moisture or dust.

the sensors they do sell with stainless screens and or fritted glass protectors are coupled to shitty Chinese humidity sensors... you are better off just buying a honeywell RH transmitter and feeding it into a standard analog input controller or just an RH controller.
queequeg152 is offline Quote


Old 12-06-2017, 06:07 PM #3
dutty
Guest

Posts: n/a
I worked with simple logic about 10 years now. And while i agree that a climate controller has not much use except smoothing the transitions between stages, insert day AND night temp/hum threshold, and reduce noise (since largest stage wont be used much anymore) there is much use for a soil moisture sensitive irrigation system. In my eyes this is one of the most problematic tasks for a grower. When to water and when not.
Yes, experienced growers know their job. But while you can control EC, ph and stuff, there is just the "finger in soil" or "weight the container method" and a lot of ppl get claws from oxygen deficit without even knowing what they did wrong.

F.e. you are watering 2 times a day by timer. You stress them i dont know why, lets say the EC is to high.. the girls stop drinking and after 2 days you threw to much water at them so they drown.
Most growers would assume the high EC is the reason for the claws...

the sensors you are talking about are not different from the sensors built in all in one ready to use sensor stations you know.
These stations use cheap dht11 or dht22 sensors for the most part with open grid housing and stuff. There are manufacturers producing sensors and manufactures using them. I dont believe they invent their product from scratch, from battery to lcd to sensor. They are just parts put together and sold as new product. To assume there are special sensors just used by Hobbyists and IOT folks is wrong.
This post was not for "buy some plug and play be happy" folks or beginners, maybe i shouldve mentioned this more. But for ppl that are interested in tinkering. Sometimes including building a proper housing/shield for a sensor.
Also i said that i spent some more for my temp/humidity sensor which passed a lot of tests against expensive industry sensors.

To say generally shit is generally shit if you dont know shit about that shit
Quote


Old 12-06-2017, 08:26 PM #4
5lrootsexcel
Newbie

Join Date: Nov 2017
Posts: 11
5lrootsexcel will become famous soon enough
Props to you for spending the time to figure it out. I said screw it and bought the Smart Bee.
5lrootsexcel is offline Quote


Old 12-06-2017, 11:54 PM #5
getpulse.co
Newbie

getpulse.co's Avatar

Join Date: Oct 2017
Location: Venice, CA
Posts: 20
getpulse.co is on a distinguished road
I fully support your DIY project, I'm a tinkerer for life, but that's just my experience with IoT in the grow room.

I've tried many IoT products, both in my home and grows. Bottom line is that even the major networking equipment companies are not able to execute on reliable remote automation. This in mind, I would have hard time changing my entire setup to implement an all-in-one controller as this would introduce a single point of failure.... and we aren't talking about Belkin, D-Link, or Linksys that are manufacturing these products. So why would they be able to get it right when the megacorps can not.

I was patiently waiting for a simple, reliable WiFi outlet to control my irrigation pump. I wanted to be able to turn the pump on for a few seconds while I was away. Problem is that they don't always work, so you think you've watered but you didn't. Ok fine, still was still a little bit convenient to not have to plug/unplug the pump when watering. Until I came home to a flooded room -- the WiFi outlet had activated itself and emptied 200gals. That was the end of that. These were TP-Link and Belkin WeMo "smart" outlets.

Most people have "dumb" controllers already and they incredibly reliable, why mess with that? The controllers work fine, you can dial them in by understanding your environment better through data.
getpulse.co is offline Quote


Old 12-07-2017, 06:01 PM #6
queequeg152
Senior Member

Join Date: Aug 2009
Posts: 1,452
queequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nice
Quote:
Originally Posted by dutty View Post
I worked with simple logic about 10 years now. And while i agree that a climate controller has not much use except smoothing the transitions between stages, insert day AND night temp/hum threshold, and reduce noise (since largest stage wont be used much anymore) there is much use for a soil moisture sensitive irrigation system. In my eyes this is one of the most problematic tasks for a grower. When to water and when not.
Yes, experienced growers know their job. But while you can control EC, ph and stuff, there is just the "finger in soil" or "weight the container method" and a lot of ppl get claws from oxygen deficit without even knowing what they did wrong.

F.e. you are watering 2 times a day by timer. You stress them i dont know why, lets say the EC is to high.. the girls stop drinking and after 2 days you threw to much water at them so they drown.
Most growers would assume the high EC is the reason for the claws...

the sensors you are talking about are not different from the sensors built in all in one ready to use sensor stations you know.
These stations use cheap dht11 or dht22 sensors for the most part with open grid housing and stuff. There are manufacturers producing sensors and manufactures using them. I dont believe they invent their product from scratch, from battery to lcd to sensor. They are just parts put together and sold as new product. To assume there are special sensors just used by Hobbyists and IOT folks is wrong.
This post was not for "buy some plug and play be happy" folks or beginners, maybe i shouldve mentioned this more. But for ppl that are interested in tinkering. Sometimes including building a proper housing/shield for a sensor.
Also i said that i spent some more for my temp/humidity sensor which passed a lot of tests against expensive industry sensors.

To say generally shit is generally shit if you dont know shit about that shit
yea random thermostat/humidistat, or humidity transmitter manufacturers DEFINATLY do not build their own finicky SMD humidity sensors or LCDs... thats was never my point obiviously.

Im saying all of these random projects you see popping up on these boards using arduino boards and 5 dollar adafruit humidity sensors are misguided as serious solutions because there is much more that goes into sensing humidity than just a bare chip.

i have an array of Omega humidity sensors/transmitters that use honeywell analog RH cans w/ an RTD to compensate... they all have stainless mesh and glass fiber filters to protect the PCB... the PCB itself has a pair of trim pots for temp and humidity calibration... the PCB is conformally coated, and the connections are all booted with heyco glands etc.

these Omega sensors dont even cost that much... which is more to my point, why fuck around with these I2P chips and and a micro controller when all you are doing is LITERALLY controlling relay operations... what is the point? on is on and off is off whether you do it with a micro controller or a humidistat or some cheap 4-20ma controller.

you just dont need a microcontroller for this shit.

i get that you would want to tinker with shit, but you honestly just dont need or even want to do it with a microcontroller, if you want to build something you are going to be way better off starting with quality parts and sensors like the johnson controls thermostats, and process controllers( EC, Ph ORP etc) from HACH, emerson/rosemount etc.

you do have a point so far as data aquisition or data logging though. But again daq shit is literally a multi billion dollar industry already, and because there is nothing particularly unique to greenhouses or grow rooms ... you are going to have to do an insanely good job with your software to make any inroads there, though i would not discourage you from trying.

microcontrollers are cools as shit dont get me wrong, i mean you can do shit like build a pinball machine with a 15 dollar micro controller and a set of relay boards. back in the day it would have required an ungodly expensive PCB. but its just not worth while for something so simple, there is just no value added... EVEN with respect to EC and PH and moisure control.

now so far as soil/media moisture?

again this is just not necessary... its much much much easier to simply monitor runoff quanties with a tipping bucket for total volums. this is a much better solution and is what is( and has been) used at greenhouses for years and years...

i suppose you could monitor soil moisture for growers outside where runoff is not possible to measure? but even if thats what you were tying to do... this xiaomi sensor is complete shit.

its a conductivity based moisture sensor. these have never been particularly usefull.
capactive sensors are better, but what you really want are tensiometers geared towards what ever soil type you are using... this is because tensiometers actually measure the so called "available water" which is actually able to be drawn into the root sytem.

resistivity is too sensitive to changes in soil conductivity from fertilizer solutions, and without noble metal anode/cathode they are prone to slowly changing resistance at the electrodes.

capacitive sensors are much much better, but they still cannot distinquish between water that is held tightly in capillary boundaries via small grains or clay content etc- from water that is available to be drawn in via osmotic pressure.

irrometer makes EXCELLENT low bulk density tensiometers for peat lite/ coco lite and rockwool, but they are expensive, much more so than these xiaomi, and require periodic maintenance. there is another tensiometer company... but i forget their name.

moreover these xiaomi sensors are limited in depth to what looks like 6 inches maby? ... where as with a tensiomter you can purchase just about any depth you need up to 36" from what i recall.

far as PH and EC control via micro controllers?

im sorry but you are deluding yourself if you think you can engineer your own EC and PH control schemes and meet or exceed what you can get from a HACH GLI 53/63 or any number of process controllers coming with NEMA enclosures, truely excellent sensors, and cell constant programming, cell faulting and relay outputs and analogue or rs232 outputs already baked in.
EC controllers are also VERY important industrially speaking, so there is a PLETHORA of controllers available on the second hand market. i bought a series of GLI 53's and 63 for literally 25-50 dollars. i have some yokogawa units too, but they have a shitty non backlit display.

EC sensors are fairly trivial, but this xiaomi thing is honestly a joke, im sorry but it just is. its literally 2 chrome or nickle plated buttons or rivets mounted on some through hole PCB thats been coated.

contrast that with a rosemount EC sensor ( comes with an actual factory cell constant btw) which you can get for a few hundred bucks and literally thread into a PVC tee or a mount on an immersion mast...

and PH? Ph is not a trivial phenomena to measure.
i have no clue how you plan on incorporating PH, but online ph sensors are either cheap and disposable(see pool automation sensors) with high maintiance, or VERY expensive and servicable(hach combinations sensors or accuglass sensors) with generally low maintenance. you simply cannot get both.

ph controllers are also very very mature and( id guess) are going to be difficult to replicate. again stuff like sensor faulting, milivolt tracking( for long term sensor health), automatic buffer solution detection, all of the outputs etc.

again PH controllers are also VERY important industrially speaking so again- they are available for next to nothing second hand.

the sensors are another matter, but the controllers themselves are very very cheap and are going to be very hard to beat with a micro controller.
queequeg152 is offline Quote


2 members found this post helpful.
Old 01-13-2018, 05:12 PM #7
sethimus
Newbie

Join Date: Jan 2013
Posts: 24
sethimus is on a distinguished road
Quote:
Originally Posted by queequeg152 View Post

the sensors are another matter, but the controllers themselves are very very cheap and are going to be very hard to beat with a micro controller.
yo gramps, ever heard of open source software?

https://github.com/kizniche/Mycodo
sethimus is offline Quote


Old 01-13-2018, 05:13 PM #8
sethimus
Newbie

Join Date: Jan 2013
Posts: 24
sethimus is on a distinguished road
and sensors come with their own software on a chip these days:

https://atlas-scientific.com/
sethimus is offline Quote


Old 01-14-2018, 12:04 AM #9
queequeg152
Senior Member

Join Date: Aug 2009
Posts: 1,452
queequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nicequeequeg152 is just really nice
Quote:
Originally Posted by sethimus View Post
and sensors come with their own software on a chip these days:

https://atlas-scientific.com/
you dont know what you are talking about im afraid.

even if you could get a decent sensor with its own control hardware... it would be a terrible idea.
queequeg152 is offline Quote


Old 01-14-2018, 04:38 PM #10
Bobby Boucher
Member

Bobby Boucher's Avatar

Join Date: Nov 2016
Posts: 274
Bobby Boucher is a jewel in the roughBobby Boucher is a jewel in the roughBobby Boucher is a jewel in the roughBobby Boucher is a jewel in the roughBobby Boucher is a jewel in the roughBobby Boucher is a jewel in the roughBobby Boucher is a jewel in the rough
Ay yo, Grandpa! Lmao!

Sorry queequeg, but from this point forth, in the playground of my mind, you will always be the sage and patient grampgramp I never had.

Killer beard, btw.
Bobby Boucher is offline Quote


Post Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT +2. The time now is 10:20 AM.


Click to buy cannabis seeds at Ace Seeds


This site is for educational and entertainment purposes only.
You must be of legal age to view ICmag and participate here.
All postings are the responsibility of their authors.
Powered by: vBulletin Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.