Smart Garden Tap Water - On and Off

@sh00t2kill
Hi, I have just bought this device and I’d like to include in HA … as a component, preferably.

Any progress on this issue?

@AnthonyB
Are you using the Tap Water with HA? Could you send me any “instructions / yaml files” that you are using? Thank you in advance, I’m a newbee, too :slight_smile:

Sorry i havent replied … but they turned off the API due to it getting DoS’d – so until thats back again, its not working :frowning:

I had high hopes for the Link Taps.
Following sparkydave’s inspiration I have just got this off ebay which I’m hoping to link up to a sonoff, seems easy enough. Connect two of these and a plug to the sonoff.
I’ll share my results, hopefully that I’ve got it up and running…

I used a couple of sonoffs (tasmota) connected to inline 15mm water valves bit of tubing all done for 50 quid more or less. I don’t have a complete picture but you get the drift from below.

1 Like

this is excellent! Gives me hope cause it seems way too simple in my head so expect there to be some surprises once I get started.

If your using sonoffs like me you will need to drop the voltage down to 12v I saw from your eBay link that your valves are 12v.

I used these
https://www.amazon.co.uk/dp/B079WLNGJ3/ref=cm_sw_r_cp_api_uJlZBb8MS3C5M

These are the balances I used also as it has a little filter that can be cleaned, which is great as it prevents debris getting into my underground watering hose

Thank you but i especially went for these as they have a 220v option. Keep it simple!

Finally got round to building this, really quick and easy. In a waterproof box ready to connect to the irrigation system. Attached pics for inspiration…

4 Likes

Hi, I done my personal LinkTap Integration without AppDaemon and is more “direct”. Works (I tested) with only 1 LinkTap Device and restore the previous program when finished (See “autoBack” in the API https://www.link-tap.com/#!/api-for-developers)

NOTE: With the LinkTap API there is a limit for polling. Can toggle the switch only every 1 minute and can update the sensor only every 5 minutes. The sensor automatically update every 6 minutes AND 5 seconds after the switch toggle, so if you enable the toggle and 2 minutes later the automatic scan will be triggered, API return an error, so i forced the “on” status if error. Anyway after 6 or 12 minutes the correct status will be restored. I already wrote to the LinkTap support for request less time of device status polling time. LinkTap support tell me that soon will be a local LAN API support.

In “configuration.yaml” add the package and customizations support:

homeassistant:
  [....... Your Things .......]
  # Customizations
  customize: !include customize.yaml
  # Packages
  packages: !include_dir_named packages

Add folder “packages” and create into it “linktap.yaml” with this lines:
!!! Change values between “…” with your User, API Key ecc… !!!

# LinkTap Package

# Inputs
input_number:
   linktap_duration:
     name: 'Duration'
     icon: mdi:clock
     min: 5
     max: 150
     step: 5

# Switches
switch:
  - platform: template
    switches:
      linktap_sprinkler:
        friendly_name: 'Sprinkler'
        value_template: '{{ is_state("binary_sensor.linktap_status","on") }}'
        turn_on:
          service: script.linktap_on
        turn_off:
          service: script.linktap_off

# Binary Sensors
binary_sensor:
  - platform: rest
    name: 'LinkTap Status'
    verify_ssl: true
    scan_interval: 360
    resource: https://www.link-tap.com/api/getAllDevices
    method: POST
    payload: '{"username": "USER", "apiKey": "APIKEY"}'
    value_template: >-
      {% if value_json.result == 'ok' %}
        {% if value_json.devices[0].taplinker[0].plan.action %}
          true
        {% else %}
          false
        {% endif %}
      {% elif value_json.result == 'error' %}
        true
      {% else %}
        false
      {% endif %}
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json

# REST Commands
rest_command:
  linktap_on:
    verify_ssl: true
    timeout: 10
    url: https://www.link-tap.com/api/activateInstantMode
    method: POST
    payload: '{"username": "USER", "apiKey": "APIKEY", "gatewayId": "GATEWAYID", "taplinkerId": "TAPLINKERID", "action": "true", "duration": {{ states.input_number.linktap_duration.state }}, "autoBack": "true"}'
    content_type: 'application/json; charset=utf-8'
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json
  linktap_off:
    verify_ssl: true
    timeout: 10
    url: https://www.link-tap.com/api/activateInstantMode
    method: POST
    payload: '{"username": "USER", "apiKey": "APIKEY", "gatewayId": "GATEWAYID", "taplinkerId": "TAPLINKERID", "action": "false", "duration": 0, "autoBack": "true"}'
    content_type: 'application/json; charset=utf-8'
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json

# Scripts
script:
  linktap_on:
    alias: 'Activate LinkTap'
    sequence:
    - service: rest_command.linktap_on
    - delay: '00:00:05'
    - service: homeassistant.update_entity
      entity_id: binary_sensor.linktap_status
  linktap_off:
    alias: 'Deactivate LinkTap'
    sequence:
    - service: rest_command.linktap_off
    - delay: '00:00:05'
    - service: homeassistant.update_entity
      entity_id: binary_sensor.linktap_status
  linktap_update:
    alias: 'Update LinkTap'
    sequence:
    - service: homeassistant.update_entity
      entity_id: binary_sensor.linktap_status

And in “customize.yaml” add:

# LinkTap
script.linktap_update:
  hidden: false
  friendly_name: 'Update'
  icon: mdi:sync

The result (In my language, Italian) is:

45

I hope can be useful for someone :slight_smile:!

10 Likes

why not just use a rainmachine? https://www.home-assistant.io/components/rainmachine/

RianMachine have only “computers”, this is smaller, direct to water and wireless. is a different think, before it i used gardena products, but the smart products is too expensive… so the good alternatives are eve aqua or linktap.

linktap tell me for a lan api and HA component in future.

2 Likes

meh, it was only $180, worth it to me, can’t really understand the rest of your sentances

how can you use rainmachine direct on a balcony faucet?

Great work sagittcyber, thanks for sharing. The LAN API support would be very much welcome and make it so much more reliable to control. I have duplicated your script to run 2 LinkTap Devices on the same gateway.

Capture

1 Like

Thanks,

you can use the following template to force the sensor to retain the state instead of forcing it active. obviously a time of at least 10 minutes is recommended

scan_interval: 600

  {% if value_json.result == 'ok' %}
    {% if value_json.devices[0].taplinker[0].plan.action %}
      true
    {% else %}
      false
    {% endif %}
  {% elif value_json.result == 'error' %}
    {% if is_state("binary_sensor.linktap_status","on") %}
      true
    {% else %}
      false
    {% endif %}
  {% else %}
    false
  {% endif %}
2 Likes

hey!
where do you add in the username, APIkey, gatewayID and taplinkID values, sorry?

linktap api

Just did the same like @lessman:

(esphome re-flashed) Sonoff, magnetic valve and 240V -> 12V led driver device. Currently integerating it into HA.
Need to do some input_select, input_datetime and the esphome-integrated switch. Also some automations, then it will do the job. Add a condition for raining so it does not need to start watering.
Maybe check with on of my Plant sensors…
Some job for teh rainy days…

/ Ralf

Wow, thank you so much! Are there any news on the LAN API? Could you implement something new?

Kind regards,
lordhenry

1 Like

After asking for generic zigbee compatiblity and LAN API i got the following response beginning of may:

We implemented proprietary protocol on top the standard Zigbee protocol, so our devices are not compatible with third-party Zigbee devices. The reason we have to design our own protocol is because we want to deliver the best user experience to our clients while the standard Zigbee is simply not comprehensive enough for our product scenario.

Our current product has to talk to our cloud server in order to function properly. All our current open APIs listed on our website are based on our cloud server system.

The good news is that we are also working on a LAN based feature which will be available to all our existing clients through remote software upgrade later. Once this feature is released, user can control his/her LinkTap water timer within their LAN. The LAN based API will also be released at that time. We are looking at another 4-5 months to get it ready. (We are current busy with other new product development :-()

1 Like