Update to documentation

pull/42/head
shaun feakes 2018-08-04 08:13:29 -05:00
parent fa568b6434
commit e62fa37399
3 changed files with 391 additions and 25 deletions

View File

@ -44,6 +44,9 @@ Designed to mimic AqualinkRS6 All Button keypad, and just like the keypad you ca
* (Salt Water Generator is configured as Thermostat as it's the closest homekit accessory type, so °=% and Cooling=Generating)
* Full support for homekit scenes, so can make a "Spa scene" to turn spa on, set spa heater particular temperature, turn spa blower on, etc etc)
### In Home Assistant
<img src="extras/HomeAssistant.png?raw=true" width="600"></img>
## All Web interfaces.
* http://aqualink.ip/ <- (New UI)
* http://aqualink.ip/old <- (If you prefer the old UI, this is not maintained)
@ -178,15 +181,16 @@ Other command like options for serial_ligger are :-
```
Specifically, make sure you configure your MQTT, Pool Equiptment Labels & Domoticz ID's in there, looking at the file it should be self explanatory.
## Configuration with home automation hubs
## Domoticz
With MQTT
* Enable MQTT in Domoticz, and install a MQTT broker.
* Create a virtual device for each piece of pool equiptment you have, eg Filter Pump, Spa Mode, Pool Light, Cleaner.
* Place the Domoticz IDX for each device in the aqualinkd.conf file under the appropiate button. Then modify each virtual device.
#
# Configuration with home automation hubs
Without MQTT
* Follow generic hub setup.
AqualinkD offers 3 ways to connect to it from other devices MQTT, Web API's & Web Sockets.
* MQTT is a realtime pub/sub style event system and will require you to install a MQTT server, like Mosquitto
* WEB API's simple poll based way to get information and request something to be done
* WEB Sockets is realtime and realy only applicable for the WEB UI's included. it's not documented. If someone wants to use this, let me know and I can document it. (or look at the index.html and it should be easy to work out)
All Hubs will use either MQTT or WEB API to counicate with AqualinkD. MQTT is prefered, but it will depend on your setup and how you want to achieve the integration. The Generic MQTT and WEB API defails are below, followed by specific implimentations for diferent hubs.
All Hubs you will Create a device for each piece of pool equiptment you have, eg Filter Pump, Spa Mode, Pool Light, Cleaner, Water Temperature etc then configure that device to use either the MQTT or API endpoints listed below to both get the status and set the status for that device.
## MQTT
Aqualinkd supports generic MQTT implimentations, as well as specific Domoticz one described above.
@ -243,31 +247,57 @@ Example that would turn on the filter pump
aqualinkd/Filter_Pump/set 1
```
## All other hubs (excluding Apple HomeKit) Amazon,Samsung,Google etc
Create a device for each piece of pool equiptment you have, eg Filter Pump, Spa Mode, Pool Light, Cleaner. Then add the following URL to program the switching of each device
## Web API's
The following URL is an example of how to turn the pump on
```
http://aqualinkd.ip.address:port?command=Filter_Pump&value=on
```
each button ie command=xxxxx uses the default Aqualink name so valid options are
* Filter_Pump
* Spa_Mode
* Aux_1
* Aux_2
* Aux_3
* Aux_4
* Aux_5
* Aux_6
* Aux_7
* Pool_Heater
* Spa_Heater
* Solar_Heater
each button ie command=xxxxx uses the default Aqualink name, and the value=xx is simply on or off. Valid options for command are :-
```
Filter_Pump
Spa_Mode
Aux_1
Aux_2
Aux_3
Aux_4
Aux_5
Aux_6
Aux_7
Pool_Heater
Spa_Heater
Solar_Heater
```
To get status than can be passed by any smart hub use the below url, a JSON string with the state of each device and current temprature will be returned.
There are a few extended commands that will set Heater setpoints, Salt Water Generator %, and light mode (if configured), these are in the came form only the value is a number not a on/off
```
http://aqualinkd.ip.address:port?command=pool_htr_set_pnt&value=95
```
```
poollightmode
swg_percent
pool_htr_set_pnt
spa_htr_set_pnt
frz_protect_set_pnt
```
To get status that can be passed by any smart hub use the below url, a JSON string with the state of each device and current temprature will be returned.
Both return similar information, the `devices` will simply return more, but be harder to pass. So pick which souits your configuration better.
```
http://aqualinkd.ip.address:port?command=status
or
http://aqualinkd.ip.address:port?command=devices
```
The status of any device can be :-
```
on
off
enabled -> (for heaters, they are on but not heating)
flash -> (delayed On or Off has been inicitated by the control panel)
```
#
# Specific Hub integrations
## Apple HomeKit
For the moment, native Homekit support has been removed, it will be added back in the future under a different implimentation.
Recomended option for HomeKit support is to make use of the MQTT interface and use [HomeKit2MQTT](https://www.npmjs.com/package/homekit2mqtt) to bridge between Aqualinkd and you Apple (phone/tablet/tv & hub).
@ -289,8 +319,24 @@ Recomended option for HomeKit support is to make use of the MQTT interface and u
You can of course use a myriad of other HomeKit bridges with the URL endpoints listed in the `All other hubs section`, or MQTT topics listed in the `MQTT` section. The majority of them (including HomeBridge the most popular) use Node and HAP-Node.JS, neither of which I am a fan of for the RaspberryPI. But HomeKit2MQTT seemed to have the least overhead of them all. So that's why the recomendation.
#
# Domoticz
With MQTT
* Enable MQTT in Domoticz, and install a MQTT broker.
* Create a virtual device for each piece of pool equiptment you have, eg Filter Pump, Spa Mode, Pool Light, Cleaner.
* Place the Domoticz IDX for each device in the aqualinkd.conf file under the appropiate button. Then modify each virtual device.
## MeteoHub
Without MQTT
* Follow generic hub setup.
#
# Home Assistant (HASS.IO)
Copy the sections from
[`HASSIO Implimentation.txt`](https://github.com/sfeakes/aqualinkd/blob/master/extras/HASSIO.implimentation.txt)
into your config.yaml
#
# MeteoHub
If you want to log/track water temps within MeteoHub, simple configure it to poll the below URL and water & air tempratures will be sent in a format native to MeteoHub.
```
http://aqualinkd.ip.address:port?command=mhstatus

View File

@ -0,0 +1,320 @@
#-----THESE Entries are entered in your Configuration.yaml
#---- AQUALINK THERMOSTATS (Freeze, Pool, Spa) -------------
climate:
- platform: honeywell
username: brian_sheedy@symantec.com
password: !secret honeywell_password
scan_interval: 2400
region: us
- platform: mqtt
name: Pool Heater
qos: 1
modes:
- 0
- 1
send_if_off: true
# Uncomment if you want HA to set it to an inital temperature when it boots up.
# initial: 70
payload_on: "1"
payload_off: "0"
current_temperature_topic: "aqualinkd/Temperature/Pool"
min_temp: 70
max_temp: 90
mode_command_topic: "aqualinkd/Pool_Heater/set "
mode_state_topic: "aqualinkd/Pool_Heater"
mode_state_template: "{{ value_json }}"
temperature_command_topic: "aqualinkd/Pool_Heater/setpoint/set "
temperature_state_topic: "aqualinkd/Pool_Heater/setpoint"
temperature_state_template: "{{ value_json }}"
- platform: mqtt
name: Spa Heater
modes:
- 0
- 1
send_if_off: true
# Uncomment if you want HA to set it to an inital temperature when it boots up.
# initial: 100
payload_on: "1"
payload_off: "0"
current_temperature_topic: "aqualinkd/Temperature/Spa"
min_temp: 80
max_temp: 104
mode_command_topic: "aqualinkd/Spa_Heater/set "
mode_state_topic: "aqualinkd/Spa_Heater"
mode_state_template: "{{ value_json }}"
temperature_command_topic: "aqualinkd/Spa_Heater/setpoint/set "
temperature_state_topic: "aqualinkd/Spa_Heater/setpoint"
temperature_state_template: "{{ value_json }}"
- platform: mqtt
name: Freeze Protect
modes:
- 0
- 1
send_if_off: true
# Uncomment if you want HA to set it to an inital temperature when it boots up.
# initial: 36
payload_on: "1"
payload_off: "0"
current_temperature_topic: "aqualinkd/Temperature/Air"
min_temp: 36
max_temp: 42
mode_command_topic: "aqualinkd/Freeze_Protect/set "
mode_state_topic: "aqualinkd/Freeze_Protect"
mode_state_template: "{{ value_json }}"
temperature_command_topic: "aqualinkd/Freeze_Protect/setpoint/set "
temperature_state_topic: "aqualinkd/Freeze_Protect/setpoint"
temperature_state_template: "{{ value_json }}"
#---- AQUALINK GROUPS -------------
group:
ARS:
name: Pool
view: yes
entities:
- sensor.Air_Temp
- sensor.Pool_Temp
- sensor.Spa_Temp
- sensor.pool_check
- binary_sensor.Auto_Mode
- sensor.battery_check
- group.PL1
- group.SP1
- group.TC1
- group.SC1
PL1:
name: Pool Control
view: no
entities:
- switch.Filter_Pump
- switch.Cleaner
- switch.Low_Speed
- light.Pool_Light
- switch.Waterfall
- switch.Pool_Drain
- input_number.pooldrain
- switch.Pool_Fill
- input_number.poolfill
- switch.Pool_Mode
SP1:
name: Spa Control
view: no
entities:
- switch.Spa_Mode
- switch.Spa_Blower
- light.Spa_Light
TC1:
name: Temp Control
view: no
entities:
- binary_sensor.Pool_Heater_Enabled
- climate.Pool_Heater
- binary_sensor.Spa_Heater_Enabled
- climate.Spa_Heater
- binary_sensor.Freeze_Enabled
- climate.Freeze_Protect
SC1:
name: Automation
view: no
entities:
- script.summer_pool
- script.winter_pool
- script.waterfall
- script.spa
#---- AQUALINK LIGHTS -------------
Light:
- platform: mqtt
name: "Spa Light"
state_topic: "aqualinkd/Aux_4"
command_topic: "aqualinkd/Aux_4/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Pool Light"
state_topic: "aqualinkd/Aux_5"
command_topic: "aqualinkd/Aux_5/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
#----AQUALINK SWITCHES
switch:
- platform: mqtt
name: "Freeze"
state_topic: "aqualinkd/Freeze_Protect"
command_topic: "aqualinkd/Freeze_Protect/set "
qos: 1
payload_on: "0"
payload_off: "1"
retain: false
- platform: mqtt
name: "Filter Pump"
state_topic: "aqualinkd/Filter_Pump"
command_topic: "aqualinkd/Filter_Pump/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Waterfall"
state_topic: "aqualinkd/Solar_Heater"
command_topic: "aqualinkd/Solar_Heater/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Spa Mode"
state_topic: "aqualinkd/Spa_Mode"
command_topic: "aqualinkd/Spa_Mode/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Cleaner"
state_topic: "aqualinkd/Aux_1"
command_topic: "aqualinkd/Aux_1/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Low Speed"
state_topic: "aqualinkd/Aux_2"
command_topic: "aqualinkd/Aux_2/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Spa Blower"
state_topic: "aqualinkd/Aux_3"
command_topic: "aqualinkd/Aux_3/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Pool Heater"
state_topic: "aqualinkd/Pool_Heater"
command_topic: "aqualinkd/Pool_Heater/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
- platform: mqtt
name: "Spa Heater"
state_topic: "aqualinkd/Spa_Heater"
command_topic: "aqualinkd/Spa_Heater/set "
qos: 1
payload_on: "1"
payload_off: "0"
retain: false
#----AQUALINK SENSORS
sensor:
- platform: mqtt
state_topic: "aqualinkd/Temperature/Air"
name: "Air Temp"
value_template: "{{ value_json }}"
unit_of_measurement: "°F"
- platform: mqtt
state_topic: "aqualinkd/Temperature/Spa"
name: "Spa Temp"
value_template: "{{ value_json }}"
unit_of_measurement: "°F"
- platform: mqtt
state_topic: "aqualinkd/Temperature/Pool"
name: "Pool Temp"
value_template: "{{ value_json }}"
unit_of_measurement: "°F"
- platform: mqtt
state_topic: "aqualinkd/Pool_Heater/setpoint"
name: "Pool Temp Set"
value_template: "{{ value_json }}"
unit_of_measurement: "°F"
- platform: mqtt
state_topic: "aqualinkd/Spa_Heater/setpoint"
name: "Spa Temp Set"
value_template: "{{ value_json }}"
unit_of_measurement: "°F"
- platform: command_line
name: Battery
command: 'curl -k --silent "http://YOUR_IP_ADDRESS:PORT?command=status" | jq -r ".battery"'
value_template: "{{ value }}"
- platform: template
# This simple sensor shows the current state of the Aqualink battery...
sensors:
battery_check:
value_template: >-
{%- if states('sensor.Battery') == "ok" %}
OK
{% else %}
LOW
{%- endif %}
icon_template: >-
{%- if states('sensor.Battery') == "ok" %}
mdi:battery
{% else %}
mdi:battery-alert
{%- endif %}
friendly_name: 'Battery'
#----AQUALINK BINARY SENSORS
binary_sensor:
- platform: mqtt
state_topic: "aqualinkd/Pool_Heater/enabeled"
name: "Pool Heater Enabled"
qos: 0
payload_on: "1"
payload_off: "0"
- platform: mqtt
state_topic: "aqualinkd/Spa_Heater/enabeled"
name: "Spa Heater Enabled"
qos: 0
payload_on: "1"
payload_off: "0"
- platform: mqtt
state_topic: "aqualinkd/Freeze_Protect"
name: "Freeze Enabled"
qos: 0
payload_on: "1"
payload_off: "0"
#-----THESE Entries are entered in your automation.yaml file
- alias: 'Notify of Low Pool Battery'
initial_state: 'on'
trigger:
platform: state
entity_id: sensor.battery_check
from: 'OK'
to: 'LOW'
condition:
condition: time
after: '08:15:00'
before: '16:00:00'
action:
# Change notify.ios.brianphone to whatever your phone name is...
- service: notify.ios_brianphone
data:
message: 'The Aqualink Pool Controller Battery is LOW'
title: 'Home Assistant'

BIN
extras/HomeAssistant.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB