MTry / homebridge-smart-irrigation

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 based climate and plant adaptive irrigation controller with the use of OpenWeatherMap API. The plugin can optionally email you, and/or send you push notifications through Pushover or 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.
MIT License
78 stars 4 forks source link

Assistance in setting up #11

Closed Sergbmw closed 3 years ago

Sergbmw commented 3 years ago

Describe in more detail how to set up the relationship with a sonoff or other relay to turn on the valve

MTry commented 3 years ago

It depends a little on your actual setup. Home app doesn't permit the required control automations yet for valve accessories - you need to use Eve or similar to achieve this.

First - you need to have a real functioning valve which is exposed to Homekit - it does not matter whether it is exposed as a valve type or a switch or outlet - as long as it is a device which can be turned on and off allowing the water to flow or stop, you are ready to automate it now with this plugin. This is required regardless of what you use - sonoff or simply an irrigation valve(real) powered by a smart outlet which will energise the solenoid when turned on.

What you can do is set up 2 scenes for each of your real zones: MyBalconyPots Off (This scene being defined as an off state of your real valve watering that zone) & MyBalconyPots On (This scene being defined as an on state of your real valve watering that zone). Subsequently, setup 2 automations off the zone exposed by the plugin which you want to link your real valve to - one to trigger the scene MyBalconyPots On when the plugin zone turns on and the other to trigger the scene MyBalconyPots Off when the plugin zone turns off.

Hope this helps.. do let me know once you get it going...

Sergbmw commented 3 years ago

pls, screenshots your systems in EVE

MTry commented 3 years ago

Take a look at #7

Can you tell me your exact configuration? maybe I can run you through the steps?

Sergbmw commented 3 years ago

pls photo scenes

MTry commented 3 years ago

image

MTry commented 3 years ago

image

MTry commented 3 years ago

image image image image

Hope this helps..

Sergbmw commented 3 years ago

No :(, pls rec video

Sergbmw commented 3 years ago

?

MTry commented 3 years ago

Not getting the time to create a video but do try this resource which can help in understanding how Eve automations can created..

subcritical71 commented 3 years ago

@Sergbmw how is your irrigation system being controlled? What model is your irrigation controller and how are you able to control it using Homebridge or Homekit outside of this plugin?

MTry commented 3 years ago

@Sergbmw - don't know if you figured this out yet.. else if you are on discord could guide you over chat sometime..

Sergbmw commented 3 years ago

@Sergbmw - don't know if you figured this out yet.. else if you are on discord could guide you over chat sometime..

Good day. I still did not understand how to tie automation to the irrigation relay

cladmonitor commented 3 years ago

I’m having the same difficulty setting this up, I’m using a raw HomeKit setup and want to use an exposed smart switch as a trigger. Nothing exposed seems to be actionable against automation. In my eyes I would assume there would be an exposed switch that is turned on and off by your plugin automatically on the given schedule. This would allow us to use the standard HomeKit automation workflow.

MTry commented 3 years ago

I’m having the same difficulty setting this up, I’m using a raw HomeKit setup and want to use an exposed smart switch as a trigger. Nothing exposed seems to be actionable against automation. In my eyes I would assume there would be an exposed switch that is turned on and off by your plugin automatically on the given schedule. This would allow us to use the standard HomeKit automation workflow.

Please understand that Homekit is an ecosystem and Apple's Home App is just one of the ways of interacting with it. Other apps such as Home+ or Controller for Homekit or Eve do not alter or modify the basic Homekit ecosystem itself but offer a greater degree of control and automation using Homekit - and everything that Homekit offers! Essentially the Home App only exposes a subset of what Homekit itself offers. So to modify your statement - "Nothing exposed seems to be actionable against automation - from within Apple's Home App". Homekit does permit it and that is how many other apps such as Eve achieve it - this is the reason why an automation created by them would survive within your Homekit hub even if you were to uninstall the apps themselves after creating the automation! Its the Home app's limitation, not Homekit - and the design decision for this plugin(like many others) was not to be limited by the Home app - and utilise what Homekit offers. Surely the Home app will grow up further one day!🙂

That being said, the benefits of exposing irrigation valves far exceeds those of exposing switches - there is no way for a switch to show a countdown timer(within Homekit!) like a valve indicating when it will shut off! There would also be no way of showing remaining duration on the Irrigation system. Going further in the direction of aggregating total water consumption in Eve would also be non-intuitive using switches.

Please check out any of the apps referred above to unleash a little more of what Homekit offers compared to the Home app✌️

Sergbmw commented 3 years ago

If so many questions arise, maybe it is worth making a simpler instruction? Shoot a video of creating all automation using the example of one irrigation zone

subcritical71 commented 3 years ago

@Sergbmw I’m willing to try to help with a video or write up, could you answer the questions I had from above? A generic video may not be of any use for you. “how is your irrigation system being controlled? What model is your irrigation controller and how are you able to control it using Homebridge or Homekit outside of this plugin?”

MTry commented 3 years ago

I'm going to and create a video for a generic smart socket today..

MTry commented 3 years ago

@subcritical71 - thanks so much for offering to help with this! @Sergbmw - have tried to do a video grab on my phone to show how I setup to trigger a smart socket with the zone-1 using the Eve app - you will probably need to keep a finger on "pause" as you watch it to make sure you are getting the steps right.. [Edit: seems the video file is too large(32MB) to be posted here so please check again if you are able to understand from the below instructions along with the screenshots above!]

The video starts by showing that the socket is not yet following the state of the valve in absence of the automations. This is followed by going into the Eve app to create a rule for which the triggers are "zone valve is running(on) and in use" - no conditions - to activate the scene where the smart socket is turned on. Similarly a rule is created to be triggered by the zone valve being "off" - no conditions - to activate the scene where the smart socket is turned off. Thats it - when the zone turns on, the rule activates the "on" scene and when the zone vale turns off it activates the scene where the socket is off. The video ends with the demonstration that the rules are working and the socket is being turned on and off following the state of the plugin exposed valve.

Hope this helps...

Sergbmw commented 3 years ago

@subcritical71 - thanks so much for offering to help with this! @Sergbmw - have tried to do a video grab on my phone to show how I setup to trigger a smart socket with the zone-1 using the Eve app - you will probably need to keep a finger on "pause" as you watch it to make sure you are getting the steps right.. [Edit: seems the video file is too large(32MB) to be posted here so please check again if you are able to understand from the below instructions along with the screenshots above!]

The video starts by showing that the socket is not yet following the state of the valve in absence of the automations. This is followed by going into the Eve app to create a rule for which the triggers are "zone valve is running(on) and in use" - no conditions - to activate the scene where the smart socket is turned on. Similarly a rule is created to be triggered by the zone valve being "off" - no conditions - to activate the scene where the smart socket is turned off. Thats it - when the zone turns on, the rule activates the "on" scene and when the zone vale turns off it activates the scene where the socket is off. The video ends with the demonstration that the rules are working and the socket is being turned on and off following the state of the plugin exposed valve.

Hope this helps...

Where is the video

MTry commented 3 years ago

@subcritical71 - thanks so much for offering to help with this! @Sergbmw - have tried to do a video grab on my phone to show how I setup to trigger a smart socket with the zone-1 using the Eve app - you will probably need to keep a finger on "pause" as you watch it to make sure you are getting the steps right.. [Edit: seems the video file is too large(32MB) to be posted here so please check again if you are able to understand from the below instructions along with the screenshots above!] The video starts by showing that the socket is not yet following the state of the valve in absence of the automations. This is followed by going into the Eve app to create a rule for which the triggers are "zone valve is running(on) and in use" - no conditions - to activate the scene where the smart socket is turned on. Similarly a rule is created to be triggered by the zone valve being "off" - no conditions - to activate the scene where the smart socket is turned off. Thats it - when the zone turns on, the rule activates the "on" scene and when the zone vale turns off it activates the scene where the socket is off. The video ends with the demonstration that the rules are working and the socket is being turned on and off following the state of the plugin exposed valve. Hope this helps...

Where is the video

Like I said in the edit...

[Edit: seems the video file is too large(32MB) to be posted here so please check again if you are able to understand from the below instructions along with the screenshots above!]

Sergbmw commented 3 years ago

add youtube

MTry commented 3 years ago

sorry.. the video is too crude. Please get on Discord and I can possibly help you there...

MTry commented 3 years ago

Did you manage to get it going?