Ecowitt make a range of low-cost sensors which all transmit to a central hub over 433/915MHz.
They have around 400 feet of range, and it is easy to get the base station to constantly ping a URL with current sensor values.
The soil moisture sensor is available on Amazon or directly from Ecowitt[0].
There is also a HomeAssistant integration[1].
I will second Ecowitt. I switched to them from an Aroya system by Meter Group that costed thousands of dollars and had a yearly subscription in the thousands for my commercial weed operation. Ecowitt is excellent and amazing. No annual subscription at all! Customer service is great as well.
Can one actually get data out of that thing, without uploading it to some random company?
> Live Data on APP: requires a GW1000 WIFI gateway(sold separately) to connect to WiFi, after the WIFI configuration,the live soil moisture data can be viewed on the WS View mobile application
> Graph & History Records on Ecowitt Weather Server: supported to upload to our free Ecowitt Weather server(ecowitt.net) to view the soil moisture data graph and download the history records on the website; it's recommended to add a shortcut of the website on the home screen of your phone for quick access
Question:
Any suggestions on some easy ways to make a web page which displays a status value, where the status is updated by a simple shell command? You mention pinging a URL with sensor values, which seems similar to what I want to do (which is to see if a remote location has power and internet connectivity or not, so I don't bother driving to work if the power is out).
Not in the same vein as the discussion, but something as simple as a Pi pinging https://healthchecks.io/ or a similar tool could work well for your needs.
You mention pinging a URL with sensor values, which seems similar to what I want to do (which is to see if a remote location has power and internet connectivity or not, so I don't bother driving to work if the power is out).
You don't need a fancy wireless weather station for that. Just put a tiny server at the remote location. If you can't ping it then the power or internet is out, and you can stay at home.
I’m not using a wireless weather station. I’m just asking about the web design part. But I want to be able to check a web page with my phone, not use ping. Also the site uses starlink so there’s no static IP, so I’d have to log in to tailscale and that’s even more fiddling.
Yeah. I have a couple servers I could maybe run something on. I guess I don’t really know how to serve a link where I could make an HTTP request. I run servers with discourse and other applications but I never manually serve something.
I suppose this is simple enough and I should look that up. What is it called on the server side when you make a URL available for receiving HTTP requests? I realize I’m not sure what to research exactly.
EDIT: wait a minute, actually I’ve used flask before with python. I guess I just need to figure out how to run flask on my web server, maybe on a sub domain, without interfering with the discourse instance that’s already there. Hmmm.
> What is it called on the server side when you make a URL available for receiving HTTP requests?
This fits the definition of API (application programming interface).
For a single API endpoint to post data, I would personally write a little Node.js script using built-in HTTP module or Express. For Python, maybe something like this: https://pythonbasics.org/flask-rest-api/
Knowledge of plain old CGI on a web server seems lost due to fancy frameworks? And even without the CGI-Interface, you can make it work if you have a script monitoring your web server's logs:
I sometimes transfer data with curl via a url which does not exist, but where a script running on the server watches the server's error log and extracts data from those entries. For example: access (via curl or perl' GET, or whatever) these urls
The script watches for these entries and acts upon the stuff following the data0815 part. It's a fast hack, which can be augmented and expanded in various ways, all without frameworks.
> Knowledge of plain old CGI on a web server seems lost due to fancy frameworks?
eh I just never learned it. I'm a robotics engineer and I tend to write programs in Python (or less commonly now, C++) to run in a loop and deal with local hardware. The way that web servers operate in a stateless multithreaded way involves some peculiarities that I always find a little tricky.
> I sometimes transfer data with curl via a url which does not exist, but where a script running on the server watches the server's error log and extracts data from those entries.
Hey that's a nice trick! I already have a server running discourse. Maybe I can sneak something in there. Though it looks like someone's suggestion of https://healthchecks.io/ might do what I need.
Yep, a simple flask app is an option. Easy to deploy and have a simple endpoint hook that reads the input parameters and then does your magic of writing out some static files and/or if you feel adventurous write out json files that can be read via javascript!
node-red, along with the dashboard extension[1] would serve a HTTP server that could have many inputs, such as a shell command. You'd run that on a server, not the client.
It works okay: it drops around 10% of the data due to reception issues, but I think it might be related the parameters I have set for the gain on the software defined radio.
Thanks and how is your experience with distance to your BT receiver? Any wall in between? BT does not have any mesh capability so I am wondering if I can realistically cover my whole terasse of 100sqm.
There are stone walls between, and they block reception pretty dramatically.
I need to position the receiver to have line of sight.
I use Bluetooth for lights which actually does work through the stone about 10 meters away, which doesn't make sense to be, but that's been my experience.
Nice! Capacitance moisture sensor is totally the way to go. I've never ordered up a custom board with all the little SMD stuff. If anyone is making a big batch of these I'd love to find a way to piggyback on that order.
I am ordering 10000 capacitive moisture and temperature sensor boards with an microcontroller wired to 100 wifi and bluetooth gateways including labour and programming for around $5 or €5 per sensor. Most of the cost per sensor is labour so could be omitted.
If you want to piggyback onto this order or collaborate please send an email to morphle at ziggo dot nl.
We can lower the price per moisture sensor down to $1.42 when we order 100000 or more or by dropping labour intensive features.
At a shared/combined batch order of 1 million sensors we will drop to $0.30 per sensor. At this point it is economical to have a sensor per plant (or mecanically planted seed).
With optional starlink and solar panels and batteries for full offgrid operation. Custom software features in an app for smartphone or laptop with a https://microblocks.fun type programmability and spreadsheet graphs and website output would be optional.
We could add microphones and motion sensors to sense rodents or snails or monitor (rain)forest for illegal cutting with chainsaws or poachers.
Chiming in to day I would also participate in this order. I have a farm and would love to automate aspects of my irrigation and have been looking for something like this. This in combination with soil temperature would be very beneficial.
Often these moisture sensors (and other sensors here) can have high rates of error. Just something to keep in mind if you use it in a professional setting. But if they are cheap enough you can probably normalize out the variance and get a better reading.
Would you be interested in letting me ask you a few questions about what you would be looking for when automating your farm? I am working on an early stage startup on the topic please contact me at https://uverd.co/contact.html or leave a comment here. Thanks
Would it be sufficient to just have a cheap BLE pressure sensor that you could place underneath a potted plant and look for cyclical variations of pressure to determine when to water? I would think that any sensor in contact with the soil is going to have a much shorter lifespan than one which is kept dry and in a less reactive environment.
Yeah, this is my thinking, though I haven't built a proof of concept yet.
Load Cell Weight Pressure Sensors are AUD$5 or so, and I reason a shallow receptacle of sand sitting outdoors, where rain can fall in, and direct sunlight can slowly evaporate the water, should provide a sufficiently accurate analogue for soil moisture.
Certainly I would expect it would be easy enough to calibrate, using different depths of the medium, different types of medium (coir, perhaps), etc. An upside-down plastic pot saucer sitting under the tray would provide sufficient water-proofing for the pressure sensor, I'd expect.
Excess water drains out the bottom of potted plants. You'd need a coffee-scale style (e.g. Acaia Pearl) sensor, where the electronics are shielded from water from above. Those aren't cheap.
You can probably fairly easily average out the low-frequency pressure changes. Trivially, you can consider the minimum weight per week the weight of the plant, and calculate the difference based on that.
I was recently thinking about a similar hardware (although I have no hardware background). I have a lot of plants, some shared with my roommates, and many frequently die. Taking care of plants together is hard and sometimes we are all away for a few weeks so somebody else is taking care. I would love to have an app that alerts me if something basic is wrong, for which 90% of the time would be too much or not enough water. But what I would need is a cheap plant sensor, I would need like 10 or 15, I don't want to spend more than a few bucks per plant. I didn't find an available solution! I've found a few sensors but they were way to expensive. I know quite a few struggling with plants, having great plans but then killing most so I think quite a few would be interested.
I don't know whether the sensors are too expensive or what's the problem. This looks like the right idea, a dumb sensor that could be paired with a inexpensive hub plugged in somewhere talking to some server that distributed notifications and statistics to an app.
A few decades ago, I have made an automatic watering system for the plants from the balcony of my apartment, which has worked many years without problems.
The cost for the electronic parts was negligible, but assembling the device required some work (mostly for the water pipes, which had to be cut and bent at the right sizes, and then they had to be fixed on some walls).
Water was brought through a pipe from the bathroom (from the water reservoir of the toilet, which was mounted at a greater height than the plants, so the water flowed naturally towards them; as an alternative one can add a manifold on an input pipe with cold water, to provide an extra branch for the water, in which case there should be enough pressure to reach greater heights), it passed through an electrovalve recovered from a washing machine, and it was distributed through some thin pipes to the plants.
The humidity sensor was printed on a PCB and the electronic part consisted of an operational amplifier, a transistor and a relay that actuated the electrovalve, to turn on and off the water going to the plants.
The operational amplifier (a model with high impedance inputs) was connected as a Schmitt trigger with the inputs to a resistor bridge that included the humidity sensor and there were 2 adjustable resistors used to modify the thresholds of the Schmitt trigger, for controlling the humidity levels at which the water was turned on and off.
The schematics was adapted from one published in some hobby electronics magazine, so I assume that a search through old collections of such magazines would find many examples.
I have used a single humidity sensor and a single electrovalve, common for all, because there was never a significant difference between the humidity levels at different plants.
When this is not true, a separate electrovalve can be inserted on each branch of the pipes, with a separate humidity sensor.
For the humidity sensor, it may be a good idea to reuse some old PCBs with edge connectors whose contacts are gold-plated, e.g. the PCBs of some old memory modules (after cutting the PCB part with the memory chips and soldering a wire across all contacts). Using the gold-plated contacts for soil contact avoids the oxidation problems that would appear in unprotected copper.
That does not help much when everybody is gone in some trip, which is the main reason why I have made that automated watering system.
Except for the plumbing work, which may need some experience or using the services of a professional, such a completely automated watering system is actually much simpler and cheaper than a humidity sensor that sends notifications.
I guess no from following the wiki, but is there a way to just buy these modules without any hardware assembly required? I'm interested in hackishly monitoring the soil moisture and this seems great, but not so much into PCB fabrication etc.
Very cool, I bookmarked this to come back to later. As a gardener who recently built a home server, I hope to eventually set up a soil moisture monitoring system, which I could then in turn eventually hook up to an automatic watering system.
My rough idea of how this would work would be a bunch of sensors that I then hook up to something like influxDB/grafana. If anyone has built such a system themselves I'd love to know how you did it.
Something makes me feel uneasy about using batteries to keep plants alive (probably unjust compared to solar production cost over only a few years of use.)
Does anyone know what kind of range you get with BTLE sensors like this? I'd think a decent distance would be required in most cases, and BTLE is meant to be short range.
A while back I built a LoRa device and we got really good range, 10km at least without having to try too hard, the plan was to deploy 100's of these so it was complicated ensuring communications without collisions, and also this was for a controller not a sensor, which is much harder on the battery as the device needs to listen periodically for updates.
That was my first question also - mention in replies are 100-240 m rages which is useful to know.
FWiW here in W.Australia 4,000 acres is a mean size for farms (with a skew distribution) .. roughly 4 km a side for a square boundary.
I can see these being useful for occassional monitoring around a central solar powered collector - with stakes and flags on the sensors tags so they can be picked up again and recovered as wheat grows.
These are the practical issues of modern grain farming (and many farms are much much larger - the mean is skewed by many small plot farms while the bulk of the industry revolves around a few hundred much much larger concerns).
So Lora is probably more practical. We had to trigger a solenoid so needed a bit more power anyway, but could reliably run off a LiIon battery with a solar panel for recharging. Makes the whole package more complicated, but it worked well.
The extra range or Lora means I didn't have to implement a mesh protocol. I wasn't looking forward to having to test a mesh network, point to point is much easier.
Cool to see this on the front page. I stumbled across this a few months ago when looking to make something similar (I have done relatively little embedded programming and was interested in a hobby experiment). I would really like to understand how to design circuits and send them off to be manufactured (especially for something like a soil moisture sensor, which presumably needs the circuit bit to be water proofed).
This is really cool! I'm already running Home Assistant and have bluetooth temp/humidity sensors around the house, so it would be great to add some of these. I've never ordered a PCB like this before with SMT assembly. I have some other PCBs that I would like to design and manufacture, so it will be helpful to start with this and learn how to do it.
I would love a POE variation of this. I'm getting ready to start trenching for pop-up sprinklers and I am going to use the opportunity to run some ethernet lines out for cameras & sensors. It would be awesome to burry maintenance free moisture sensors in the process.
I'm wondering about the longevity of the soil contacting elements. The usual generic soil moisture probes typically have a high failure rate, IIRC due to galvanic corrosion.
That's correct in my experience. Galvanic corrosion was never a problem for the capacitive sensors I developed a few years back (unlike the resistive sensors linked by the parent). However you typically want them more rugged than a bare PCB for industrial settings and since the capacitive field can pass through plastic I had them in a plastic housing filled with resin. Perfectly isolated from the outside environment and hard as a rock.
I can see how your prototype defends against corrosion, not so much this b-parasite toy.
What I don't see anyone talking about is the impact of dielectric moisture absorption[1], which is typically around 0.3-0.5% over 24 hours exposure for cheaper FR-4 on the market, let alone how this product intends to maintain sensor calibration over time.
I'd expect to see external corrosion impact at the solder joints first, especially around the battery terminals, but corrosion creep may happen alot sooner than that: vias in the b-parasite prototype are clearly tented[2], but that masking is superficial and won't protect against hygroscopic exposure from the inside; being open source certainly doesn't preclude hobbyists from making even worse material decisions either.
Wow, I must have been way too slow thinking about how to word this remark[1] that I completely missed your post. Thanks for the design intuition confirmation.
The zigbee spec is freely available, I fail to see how BLE would be any more "open source".
I think it's just that every smartphone, tablet, laptop, etc now has BLE integrated, so it's easy to make a widget like a soil moisture sensor and connect it to your phone. Also, the newer LE version of bluetooth is quite power efficient so it can run for a while on a CR2032 if you take care to put the MCU in sleep mode between measurements, and whatnot.
Obviously almost everyone has a device to receive BLE whereas zigbee is a bit more specialist.
I've been playing with some arduino hardware that supports zigbee as well as BLE, and BLE is trivially easy to get working where the zigbee stack is much more complicated and much less documentation. So I would guess that plays a part too.
All soil moisture sensors will eventually become uncalibrated, wear out, or fail.
The only automation you need to keep a plant alive is a timer attached to a water source. Also, don't forget to feed it with nutrients every month or so... they don't eat soil and letting a plant starve isn't proof you needed a moisture sensor.
[0]: https://www.ecowitt.com/shop/goodsDetail/19
[1]: https://github.com/garbled1/homeassistant_ecowitt