• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

MTry/homebridge-smart-irrigation: Turn any electrical irrigation valve into a sm ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

MTry/homebridge-smart-irrigation

开源软件地址:

https://github.com/MTry/homebridge-smart-irrigation

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Homebridge Smart Irrigation

verified-by-homebridge
npm github github
JavaScript Style Guide github
Discord Subreddit subscribers

Description

Turn any electrical irrigation valve into a smart-valve.. or run your pumps on a smart schedule based on your climate!

This Homebridge plugin exposes a multi-zone irrigation sprinkler dummy control system to Apple's HomeKit.

Although a dummy, it brings smarts of an evapotranspiration[ETo] based climate/plant adaptive irrigation controller with the use of OpenWeatherMap API. All parameters can be configured from the Homebridge UI and the plugin offers granular control specific to every zone's individual requirements.

The plugin can optionally email you, and/or send you push notifications through Pushover and Pushcut, with the watering schedule it has calculated, or when a watering run is completed, along with the next 7-day weather forecast.

Added option to expose system controls to Homekit allowing a user to enable/disable irrigation, rechecks, push and email notifications from within the Home App. Associated WaterLevel Characteristic shows the % of watering cycle remaining.

Why?

Searching for an irrigation or sprinkler control plugin never showed any suitable option for my needs. The one that came closest, and is the inspiration and basis for this plugin is Tom Rodrigues's homebridge-web-sprinklers. But like many others, I didn't have the http hardware for it to control, or the inclination to rig it! What I did have access to, were some solenoid valves which I could power from a smart socket that was exposed to Homekit. So I stripped the code to just expose the dummy sprinkler accessories, reworked the irrigation logic - and then, one thing led to another.. in my quest to achieve a more granular control and incorporate more irrigation science to create a climate adaptive irrigation controller.

Basic use case..

  1. Configure the plugin to expose the required number sprinkler accessories(zones)
  2. Use the Eve app or another Homekit controller app to configure ANY other smart plug or outlet in your Homekit ecosystem to follow the state of the above exposed sprinklers
  3. The smartplug/outlet/valve in their simplest configuration could be just driving the power of any solenoid valve that controls watering to a zone

Installation

  1. Install Homebridge
  2. Install this plugin:
    • Homebridge Config UI X: Search for homebridge-smart-irrigation plugin and install
    • Manually: Run sudo npm install -g homebridge-smart-irrigation from the terminal
  3. Sign up at the OpenWeatherMap website and retrieve your API key (if you want adaptive control). The free tier allows 1000 API calls a day and this plugin will make no more than a couple on any day!
  4. Gather the mean daily Solar Radiation figures for your location in kWh/day. Please read the settings section for more details
  5. Configure the settings
  6. Use the Eve app or any other Homekit controller app to setup automations for your smartplug or outlet to follow the state of the zones exposed by the plugin

Operating Principle

One of the primary factors affecting the water demand of plants is evapotranspiration, also denoted as ETo and expressed in mm. While the subject of irrigation is one of extensive global research and there is no end to the extent of complication one can end up with, this plugin chooses to focus on three - ETo, local rain and the crop characteristics of each of the zones configured.

ETo is calculated using the Penman-Monteith Evapotranspiration (FAO-56) Method. Those interested in a deeper understanding of the principles may head to this excellent resource of FAO. The factors used include the following (daily):

  1. Min/Max Temperatures
  2. Mean RH
  3. Wind speed
  4. Shortwave Solar Radiation [more on this later..]
  5. Atmospheric Pressure (barometric)
  6. Latitude
  7. Elevation
  8. Julian day

Rain is derived from OpenWeatherMap API along with some of the factors above using the latitude and longitude configured.

Crop characteristics use some of the understanding gained from the website of University of California, Division of Agriculture and Natural Resources and particularly from this document for calculating drip irrigation schedules. Specifically, it utilises the following based on the conditions of the particular zone being irrigated:

  1. Crop coefficients [0.1 - 0.9] based on the type of plants Read here!
  2. Planting Density [0.5 - 1.3]
  3. Exposure Factor [0.5 - 1.4] based on the zone's microclimate

Additionally, information about the number of drip emitters, their discharge rate, area irrigated and efficiency is considered with the above factors.

Operating Logic & Scheduling

If masterDisable is not checked, the plugin will calculate the total watering durartion and check if watering can be completed today before sunrise or by the time as specified in sunriseOffset. If not, it will schedule the irrigation for the next day. Regardless of masterDisable it will gather the weather information and also send a notification email if emailEnable is set.

Forecasted low and high temperature higher than their respective thresholds must be met for the day being scheduled.

If adaptive watering is disabled for a zone, but scheduling remains enabled, the zone will be watered for the number of minutes specified by defDuration and not factor any other calculations.

The plugin schedules asynchronous zone watering - cycling sequentially through all the scheduled zones needing water one at a time and repeats the process the number of times specified by cycles.

Start times will vary daily as a result of changing sunrise times as well as the calculated watering time based on the weather factors.

recheckTime instructs the plugin to reassess the watering times based on the most current forecast available 15, 30 or 60 minutes prior to the scheduled run - if this is of no use to you set it to 0. But for many living in tropical regions where climate modeling is far too complex to give accurate forecasting, this can be helpful as the forecasts change frequently or significantly.

  1. Gather weather forecast for the next 7-day period
  2. Using the above and Solar Radiation data, calculate projected ETo for the next 7 days
  3. If the zone is enabled & adaptive, calculate the total ETo until the next watering day
  4. If rainFactoring is enabled, calculate the total projected rainfall till the zone's next watering day
  5. Calculate the net irrigation requirement of a zone based on total ETo and total rain till the zone's next watering schedule
  6. Calculate zone specific time required based on that zone's irrigation infrastructure and crop profile
  7. Schedule the watering run and send notification email if emailEnable
  8. Reassess recheckTime minutes before the scheduled run

Example config block:


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap