Skip to content

Comment on A Bluetooth Low Energy soil moisture sensor

Comments

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].

[0]: https://www.ecowitt.com/shop/goodsDetail/19

[1]: https://github.com/garbled1/homeassistant_ecowitt

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.

thanks for this, but just a warning that ecowitt use different frequencies in different regions.

"The frequency of products sold in US/CA is 915 MHz ; The European 868 MHz;The Australia 433 MHz."

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

EDIT: It seems you don't need the bridge if you use rtl_433: https://news.ycombinator.com/item?id=33286401

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.

Oh hey that’s perfect! I really didn’t want to set up a whole server. This looks nice thank you!

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.

If the script is local to the web server then it can be run via cron to produce html/js/css files.

If the script is external then it must be capable of making a http request to the server where a script does something similar to the scenario above.

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

http://my-server/data0815/up+2 http://my-server/data0815/down-3

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.

1. https://flows.nodered.org/node/node-red-dashboard

Sounds like a few lines of code in whichever framework is trendy among webdevs these days.

Thanks for sharing. Do you have experience with them and the Ha integration?

Not OP, but I use these to monitor my plants. I use a HackRF and the following software to collect the data.

https://github.com/merbanan/rtl_433

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.