我不小心做了这个在我的一个项目在一个复杂的,间接的方式。我在院子里安装16个土壤水分传感器的企图跟踪分布的水花园的土壤中。电池供电的传感器。他们传输数据通过蓝牙低能量的无线控制节点在院子里启用。从控制节点,收集到的数据在数据库上树莓π。除了标准的数据从传感器(土壤水分、温度、光照、土壤电导率,和电池状态的传感器,)控制节点也报告他们不得不做出多少努力当阅读来自各个传感器的数据。我使用了“阅读尝试”数据分配传感器控制节点,以减少尝试阅读。这使得数据收集更可靠,也减少了电力来自CR2032硬币细胞传感器。我发现在复习几个月的数据是,阅读尝试将上升前土壤水分数据就下起雨来。雨变弱的蓝牙信号足以腐败包的数据。 It can take several attempts to read a sensor while it is raining, even though the same sensor will be read flawlessly on the first try every time when it is not raining. I could add more sensors placed further from the control nodes, then shorten the poll time from once an hour to every few minutes. With a little data processing, I could have an online "rainfall" page telling me how hard it is raining - or I could look out the window before I go outside. --------- This is what a typical "rainy day" looks like: Not raining: [![enter image description here][1]][1] The soil moisture distribution is shown in the upper section. The lower section shows the read try count. Black is the normal "read on the first try" color. Rain has just started: [![enter image description here][2]][2] The read count has gone up on nearly all the sensors, but there hasn't been enough rain to make a difference in the soil moisture. Raining harder: [![enter image description here][3]][3] The soil moisture has gone up, and the read tries have gone up even more, indicating hard(er) rain. Rain has stopped: [![enter image description here][4]][4] The soil moisture has gone up quite a bit compared to before the rain started. The read tries count has dropped back down to one for all sensors. This kind of setup would be massive over kill just to tell if it is raining, but it is a nifty side effect of the setup if you already have it in place for other reasons. I could use the received signal strength indication (RSSI) value, but I didn't write that function into the control node software. The Bluetooth library can probably supply the data, I just don't have the control nodes programmed to do it. Maybe I ought to change it... ----- As an alternative, you could use a WiFi sniffer to collect data about WiFi base stations around your house or appartment. I know from experience with my own phone that I can detect fewer of my neighbors' WiFi base stations on rainy days. The data normally includes a received signal strength indication (RSSI.) Lower (more negative) numbers means a weaker signal. Track the data for all the WiFi base stations your sniffer can receive then apply some data processing and maybe some machine learning, and you could get a "how hard is it raining" indicator without installing any hardware outside your house. [1]: https://i.stack.imgur.com/IanfX.png [2]: https://i.stack.imgur.com/3pcUx.png [3]: https://i.stack.imgur.com/hIc9y.png [4]: https://i.stack.imgur.com/gPviK.png