From 216f065cefdf1e4d8419e8d94ee32ec243baf76d Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Wed, 25 Apr 2018 21:08:09 -0600
Subject: [PATCH 01/11] Adds docs for RainMachine component/hub
---
source/_components/rainmachine.markdown | 83 +++++++++++++++++++
.../_components/switch.rainmachine.markdown | 79 +++++-------------
2 files changed, 105 insertions(+), 57 deletions(-)
create mode 100644 source/_components/rainmachine.markdown
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
new file mode 100644
index 000000000000..a53eae4146ca
--- /dev/null
+++ b/source/_components/rainmachine.markdown
@@ -0,0 +1,83 @@
+---
+layout: page
+title: "RainMachine"
+description: "Instructions on how to integrate RainMachine units within Home Assistant."
+date: 2018-04-25 20:32
+sidebar: true
+comments: false
+sharing: true
+footer: true
+logo: rainmachine.png
+ha_category: Hub
+ha_release: 0.68
+ha_iot_class: "Cloud Polling"
+---
+
+The `rainmachine` component is the main component to integrate all platforms
+related to [RainMachine smart Wi-Fi sprinkler controllers](http://www.rainmachine.com/).
+
+## {% linkable_title Configuration %}
+
+The platform allows for either local (i.e., directly across the LAN) or remote
+(i.e., through RainMachine's cloud API) access; the route you choose will
+dictate what your configuration should look like.
+
+For local access, specify the IP address/hostname of your RainMachine unit,
+your RainMachine password, and optionally, the device's HTTP port:
+
+```yaml
+rainmachine:
+ platform: rainmachine
+ ip_address: 192.168.1.100
+ password: YOUR_PASSWORD
+```
+
+For remote access, specify your RainMachine username/email and password:
+
+```yaml
+rainmachine:
+ platform: rainmachine
+ email: user@host.com
+ password: YOUR_PASSWORD
+```
+
+{% configuration %}
+password:
+ description: your RainMachine password.
+ required: true
+ type: string
+email:
+ description: your RainMachine username/email; cannot be used with the `ip_address` parameter
+ required: false
+ type: string
+ip_address:
+ description: the IP address or hostname of your RainMachine unit; cannot be used with the `email` parameter
+ required: optional
+ type: string
+port:
+ description: the TCP port used by your unit for the REST API
+ required: false
+ type: int
+ default: 8080
+ssl:
+ description: whether communication with the local device should occur over HTTPS
+ required: false
+ type: boolean
+ default: true
+{% endconfiguration %}
+
+## {% linkable_title Weblink %}
+
+If you would like to see and control more detailed information, create an
+[iFrame](/components/panel_iframe/) that renders the RainMachine web app:
+
+```yaml
+panel_iframe:
+ rainmachine:
+ title: RainMachine
+ url: "https://my.rainmachine.com/s//ui/"
+ icon: mdi:water
+```
+
+You can find `` by logging into
+[your RainMachine dashboard](https://my.rainmachine.com) and noting it in the URL.
diff --git a/source/_components/switch.rainmachine.markdown b/source/_components/switch.rainmachine.markdown
index 26b73e0aa8fc..252a35c2b17a 100644
--- a/source/_components/switch.rainmachine.markdown
+++ b/source/_components/switch.rainmachine.markdown
@@ -13,55 +13,27 @@ ha_iot_class: "Cloud Polling"
ha_release: 0.51
---
-The `rainmachine` switch platform allows you to control programs and zones within a [RainMachine smart Wi-Fi sprinkler controller](http://www.rainmachine.com/).
+The `rainmachine` switch platform allows you to control programs and zones
+within a [RainMachine smart Wi-Fi sprinkler controller](http://www.rainmachine.com/).
-## {% linkable_title Configuring the Platform %}
-
-The platform allows for either local (i.e., directly across the LAN) or remote (i.e., through RainMachine's cloud API) access; the route you choose will dictate what your configuration should look like.
-
-For local access, specify the IP address/hostname of your RainMachine unit, your RainMachine password, and optionally, the device's HTTP port:
+
+You must have the [RainMachine component](https://www.home-assistant.io/components/rainmachine/)
+configured to use this switch.
+
-```yaml
-switch:
- platform: rainmachine
- ip_address: 192.168.1.100
- password: YOUR_PASSWORD
-```
+## {% linkable_title Configuring the Platform %}
-For remote access, specify your RainMachine username/email and password:
+To enable the platform, add the following lines to your `configuration.yaml`
+file:
```yaml
switch:
- platform: rainmachine
- email: user@host.com
- password: YOUR_PASSWORD
+ - platform: rainmachine
```
{% configuration %}
-password:
- description: Your RainMachine password.
- required: true
- type: string
-email:
- description: "Your RainMachine username/email. Cannot be used with the `ip_address` parameter."
- required: false
- type: string
-ip_address:
- description: "The IP address of your RainMachine unit; cannot be used with the `email` parameter."
- required: optional
- type: string
-port:
- description: The TCP port used by your unit for the REST API.
- required: false
- type: int
- default: 8080
-ssl:
- description: Whether communication with the local device should occur over HTTPS.
- required: false
- type: boolean
- default: true
zone_run_time:
- description: The number of seconds that a zone should run when turned on.
+ description: the default number of seconds that a zone should run when turned on
required: false
type: int
default: 600
@@ -70,27 +42,20 @@ zone_run_time:
## {% linkable_title Controlling Your Device %}
-After Home Assistant loads, you will see new switches for every enabled program and zone. These work as expected:
+After Home Assistant loads, new switches will be added for every enabled
+program and zone. These work as expected:
- Program On/Off: starts/stops a program
-- Zone On/Off: starts/stops a zone (using the `zone_run_time` parameter to determine how long to run for)
-
-Programs and zones are linked. If a program is running its final zone, you will see both the program and zone switches turned on; turning either one off will turn the other one off (just like in the web app).
-
-## {% linkable_title Weblink %}
-
-If you would like to see and control more detailed information, create an [iFrame](/components/panel_iframe/) that renders the RainMachine web app:
-
-```yaml
-panel_iframe:
- rainmachine:
- title: RainMachine
- url: "https://my.rainmachine.com/s//ui/"
- icon: mdi:water-pump
-```
+- Zone On/Off: starts/stops a zone (using the `zone_run_time` parameter to
+determine how long to run for)
-You can find `` by logging into [https://my.rainmachine.com](https://my.rainmachine.com ) and taking note of the URL.
+Programs and zones are linked. If a program is running its final zone,
+you will see both the program and zone switches turned on; turning either one
+off will turn the other one off (just like in the web app).
## {% linkable_title For Awareness %}
-The remote RainMachine API currently has two broken operations (i.e., they return error codes): starting a program and stopping a program. Please note that starting/stopping programs with the remote API is disabled until RainMachine can fix the issue.
+The remote RainMachine API currently has two broken operations (i.e., they
+return error codes): starting a program and stopping a program. Please note
+that starting/stopping programs with the remote API is disabled until
+RainMachine can fix the issue.
From 96ae6a6728bbd203138da51fe37d474da1384b1e Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Thu, 26 Apr 2018 14:52:10 -0600
Subject: [PATCH 02/11] Removing references to remote API
---
source/_components/rainmachine.markdown | 46 +++----------------
.../_components/switch.rainmachine.markdown | 7 ---
2 files changed, 6 insertions(+), 47 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index a53eae4146ca..6f7a5c669d0a 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -18,42 +18,24 @@ related to [RainMachine smart Wi-Fi sprinkler controllers](http://www.rainmachin
## {% linkable_title Configuration %}
-The platform allows for either local (i.e., directly across the LAN) or remote
-(i.e., through RainMachine's cloud API) access; the route you choose will
-dictate what your configuration should look like.
-
-For local access, specify the IP address/hostname of your RainMachine unit,
-your RainMachine password, and optionally, the device's HTTP port:
+To connect to your RainMachine device, add the following to your
+`configuration.yaml` file:
```yaml
rainmachine:
- platform: rainmachine
ip_address: 192.168.1.100
password: YOUR_PASSWORD
```
-For remote access, specify your RainMachine username/email and password:
-
-```yaml
-rainmachine:
- platform: rainmachine
- email: user@host.com
- password: YOUR_PASSWORD
-```
-
{% configuration %}
+ip_address:
+ description: the IP address or hostname of your RainMachine unit
+ required: optional
+ type: string
password:
description: your RainMachine password.
required: true
type: string
-email:
- description: your RainMachine username/email; cannot be used with the `ip_address` parameter
- required: false
- type: string
-ip_address:
- description: the IP address or hostname of your RainMachine unit; cannot be used with the `email` parameter
- required: optional
- type: string
port:
description: the TCP port used by your unit for the REST API
required: false
@@ -65,19 +47,3 @@ ssl:
type: boolean
default: true
{% endconfiguration %}
-
-## {% linkable_title Weblink %}
-
-If you would like to see and control more detailed information, create an
-[iFrame](/components/panel_iframe/) that renders the RainMachine web app:
-
-```yaml
-panel_iframe:
- rainmachine:
- title: RainMachine
- url: "https://my.rainmachine.com/s//ui/"
- icon: mdi:water
-```
-
-You can find `` by logging into
-[your RainMachine dashboard](https://my.rainmachine.com) and noting it in the URL.
diff --git a/source/_components/switch.rainmachine.markdown b/source/_components/switch.rainmachine.markdown
index 252a35c2b17a..7989e0b76687 100644
--- a/source/_components/switch.rainmachine.markdown
+++ b/source/_components/switch.rainmachine.markdown
@@ -52,10 +52,3 @@ determine how long to run for)
Programs and zones are linked. If a program is running its final zone,
you will see both the program and zone switches turned on; turning either one
off will turn the other one off (just like in the web app).
-
-## {% linkable_title For Awareness %}
-
-The remote RainMachine API currently has two broken operations (i.e., they
-return error codes): starting a program and stopping a program. Please note
-that starting/stopping programs with the remote API is disabled until
-RainMachine can fix the issue.
From 5e80fe0cf5e0c74d3baad1215d6f10d4a1ca080b Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Mon, 30 Apr 2018 15:03:44 -0600
Subject: [PATCH 03/11] Collaborator-requested changes
---
source/_components/rainmachine.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index 6f7a5c669d0a..d907836d61df 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -9,7 +9,7 @@ sharing: true
footer: true
logo: rainmachine.png
ha_category: Hub
-ha_release: 0.68
+ha_release: 0.69
ha_iot_class: "Cloud Polling"
---
From d28e8a4192a906e2db5989dadacefdb06eef4cfc Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Tue, 1 May 2018 11:42:04 -0600
Subject: [PATCH 04/11] Adding new info (per
home-assistant/home-assistant#14225)
---
source/_components/switch.rainmachine.markdown | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/source/_components/switch.rainmachine.markdown b/source/_components/switch.rainmachine.markdown
index 7989e0b76687..d967550dc86b 100644
--- a/source/_components/switch.rainmachine.markdown
+++ b/source/_components/switch.rainmachine.markdown
@@ -18,17 +18,21 @@ within a [RainMachine smart Wi-Fi sprinkler controller](http://www.rainmachine.c
You must have the [RainMachine component](https://www.home-assistant.io/components/rainmachine/)
-configured to use this switch.
+configured to use this switch. After configuring that component, switches will
+automatically appear.
## {% linkable_title Configuring the Platform %}
-To enable the platform, add the following lines to your `configuration.yaml`
-file:
+To optionally extend the functionality of these switches, augment your
+`configuration.yaml` as below:
```yaml
-switch:
- - platform: rainmachine
+rainmachine:
+ ip_address: 192.168.1.100
+ password: YOUR_PASSWORD
+ switches:
+ zone_run_time: 240
```
{% configuration %}
From c4c6d197df2cae2c7330f6f1532cc1feeaf0c653 Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Wed, 2 May 2018 12:21:50 -0600
Subject: [PATCH 05/11] Collaborator-requested changes
---
source/_components/rainmachine.markdown | 24 +++++++++++++++-
.../_components/switch.rainmachine.markdown | 28 ++-----------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index d907836d61df..f2bbdcd0684d 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -16,7 +16,7 @@ ha_iot_class: "Cloud Polling"
The `rainmachine` component is the main component to integrate all platforms
related to [RainMachine smart Wi-Fi sprinkler controllers](http://www.rainmachine.com/).
-## {% linkable_title Configuration %}
+## {% linkable_title Base Configuration %}
To connect to your RainMachine device, add the following to your
`configuration.yaml` file:
@@ -47,3 +47,25 @@ ssl:
type: boolean
default: true
{% endconfiguration %}
+
+## {% linkable_title Switch Configuration %}
+
+To configure switch-related functionality, add configuration options beneath
+a `switches` key within the `rainmachine` sections of `configuration.yaml`
+as below:
+
+```yaml
+rainmachine:
+ ip_address: 192.168.1.100
+ password: YOUR_PASSWORD
+ switches:
+ # switch configuration options
+```
+
+{% configuration %}
+zone_run_time:
+ description: the default number of seconds that a zone should run when turned on
+ required: false
+ type: int
+ default: 600
+{% endconfiguration %}
diff --git a/source/_components/switch.rainmachine.markdown b/source/_components/switch.rainmachine.markdown
index d967550dc86b..f37ce0fbd553 100644
--- a/source/_components/switch.rainmachine.markdown
+++ b/source/_components/switch.rainmachine.markdown
@@ -22,28 +22,6 @@ configured to use this switch. After configuring that component, switches will
automatically appear.
-## {% linkable_title Configuring the Platform %}
-
-To optionally extend the functionality of these switches, augment your
-`configuration.yaml` as below:
-
-```yaml
-rainmachine:
- ip_address: 192.168.1.100
- password: YOUR_PASSWORD
- switches:
- zone_run_time: 240
-```
-
-{% configuration %}
-zone_run_time:
- description: the default number of seconds that a zone should run when turned on
- required: false
- type: int
- default: 600
-{% endconfiguration %}
-
-
## {% linkable_title Controlling Your Device %}
After Home Assistant loads, new switches will be added for every enabled
@@ -53,6 +31,6 @@ program and zone. These work as expected:
- Zone On/Off: starts/stops a zone (using the `zone_run_time` parameter to
determine how long to run for)
-Programs and zones are linked. If a program is running its final zone,
-you will see both the program and zone switches turned on; turning either one
-off will turn the other one off (just like in the web app).
+Programs and zones are linked. While a program is running, you will see both
+the program and zone switches turned on; turning either one off will turn the
+other one off (just like in the web app).
From 34f75ffab911dcd9a9ae3163645c7c6e9dbf54ee Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Wed, 2 May 2018 15:51:46 -0600
Subject: [PATCH 06/11] Collaborator-requested changes
---
source/_components/rainmachine.markdown | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index f2bbdcd0684d..e19d6d775b75 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -25,6 +25,10 @@ To connect to your RainMachine device, add the following to your
rainmachine:
ip_address: 192.168.1.100
password: YOUR_PASSWORD
+ port: 8080
+ ssl: true
+ switches:
+ zone_run_time: 300
```
{% configuration %}
@@ -46,23 +50,6 @@ ssl:
required: false
type: boolean
default: true
-{% endconfiguration %}
-
-## {% linkable_title Switch Configuration %}
-
-To configure switch-related functionality, add configuration options beneath
-a `switches` key within the `rainmachine` sections of `configuration.yaml`
-as below:
-
-```yaml
-rainmachine:
- ip_address: 192.168.1.100
- password: YOUR_PASSWORD
- switches:
- # switch configuration options
-```
-
-{% configuration %}
zone_run_time:
description: the default number of seconds that a zone should run when turned on
required: false
From 92652c71013f6e5c6c8baf97f32bf94d6e1800f2 Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Thu, 3 May 2018 14:05:00 -0600
Subject: [PATCH 07/11] Revert "Collaborator-requested changes"
This reverts commit 34f75ffab911dcd9a9ae3163645c7c6e9dbf54ee.
---
source/_components/rainmachine.markdown | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index e19d6d775b75..f2bbdcd0684d 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -25,10 +25,6 @@ To connect to your RainMachine device, add the following to your
rainmachine:
ip_address: 192.168.1.100
password: YOUR_PASSWORD
- port: 8080
- ssl: true
- switches:
- zone_run_time: 300
```
{% configuration %}
@@ -50,6 +46,23 @@ ssl:
required: false
type: boolean
default: true
+{% endconfiguration %}
+
+## {% linkable_title Switch Configuration %}
+
+To configure switch-related functionality, add configuration options beneath
+a `switches` key within the `rainmachine` sections of `configuration.yaml`
+as below:
+
+```yaml
+rainmachine:
+ ip_address: 192.168.1.100
+ password: YOUR_PASSWORD
+ switches:
+ # switch configuration options
+```
+
+{% configuration %}
zone_run_time:
description: the default number of seconds that a zone should run when turned on
required: false
From 361b5ea618c975130255a6e29e43781a5ff265c4 Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Thu, 3 May 2018 14:05:19 -0600
Subject: [PATCH 08/11] I think I got it this time...
---
source/_components/rainmachine.markdown | 2 --
1 file changed, 2 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index f2bbdcd0684d..56439f329679 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -48,8 +48,6 @@ ssl:
default: true
{% endconfiguration %}
-## {% linkable_title Switch Configuration %}
-
To configure switch-related functionality, add configuration options beneath
a `switches` key within the `rainmachine` sections of `configuration.yaml`
as below:
From fcc3972d3fab163c609ae639ebf45f79b561bbbe Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Thu, 3 May 2018 14:14:46 -0600
Subject: [PATCH 09/11] Collaborator-requested changes
---
source/_components/rainmachine.markdown | 27 +++++++++++--------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index 56439f329679..1e4052b65498 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -27,6 +27,18 @@ rainmachine:
password: YOUR_PASSWORD
```
+To configure switch-related functionality, add configuration options beneath
+a `switches` key within the `rainmachine` sections of `configuration.yaml`
+as below:
+
+```yaml
+rainmachine:
+ ip_address: 192.168.1.100
+ password: YOUR_PASSWORD
+ switches:
+ zone_run_time: 300
+```
+
{% configuration %}
ip_address:
description: the IP address or hostname of your RainMachine unit
@@ -46,21 +58,6 @@ ssl:
required: false
type: boolean
default: true
-{% endconfiguration %}
-
-To configure switch-related functionality, add configuration options beneath
-a `switches` key within the `rainmachine` sections of `configuration.yaml`
-as below:
-
-```yaml
-rainmachine:
- ip_address: 192.168.1.100
- password: YOUR_PASSWORD
- switches:
- # switch configuration options
-```
-
-{% configuration %}
zone_run_time:
description: the default number of seconds that a zone should run when turned on
required: false
From 7eb0ccec4b74f385b41a2df3b18e615d6e16c963 Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Thu, 3 May 2018 14:26:04 -0600
Subject: [PATCH 10/11] Collaborator-requested changes
---
source/_components/rainmachine.markdown | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index 1e4052b65498..c7e2f3718c90 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -58,9 +58,14 @@ ssl:
required: false
type: boolean
default: true
-zone_run_time:
- description: the default number of seconds that a zone should run when turned on
+switches:
+ description: switch-related configuration options
required: false
- type: int
- default: 600
+ type: map
+ keys:
+ zone_run_time:
+ description: the default number of seconds that a zone should run when turned on
+ required: false
+ type: int
+ default: 600
{% endconfiguration %}
From 9b8813fa14fbecb3bc2faa5c84342ec9449beb99 Mon Sep 17 00:00:00 2001
From: Aaron Bach
Date: Thu, 3 May 2018 14:26:33 -0600
Subject: [PATCH 11/11] Small tweak
---
source/_components/rainmachine.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/_components/rainmachine.markdown b/source/_components/rainmachine.markdown
index c7e2f3718c90..e416c7f62617 100644
--- a/source/_components/rainmachine.markdown
+++ b/source/_components/rainmachine.markdown
@@ -36,7 +36,7 @@ rainmachine:
ip_address: 192.168.1.100
password: YOUR_PASSWORD
switches:
- zone_run_time: 300
+ # switch configuration options...
```
{% configuration %}