Rollease Acmeda Blinds IFTTT Template Cover

These days when purchasing hardware for our home I’m always on the lookout for the ability to connect it with Home Assistant. We’ve recently replaced our blinds with motorised units and thanks to Rollease Acmeda using their Automate Wirefree Tubular Motors together with the Automate Pulse Hub are able to control our blinds using their mobile app, Alexa or IFTTT.

I’m personally not a fan of the mobile app, as it takes my interaction outside of HA where the rest of my smart home tech lives. Alexa integration is great using the provided skill with one limiting factor which I’ll get to in a minute. The real standout is their support for IFTTT.

My first integration of the blinds into HA using IFTTT was a simple input_boolean which provided me with basic open/close functionality, providing the control of the blinds were done though HA, this brings me back to the point I made above. If the blinds were operated by another device such as the mobile app or remote the state in HA wouldn’t update as the system is stateless.

In order to remedy this problem and I’d need to ensure that the blinds could not only be open/closed but to have their position set, and after refining my initial code I feel it’s time to share it with the greater community with the aim that it will help others who might want something similar but wasn’t sure how to go about it.

There are some whispers in the community of a few people who are looking to reverse engineer / utilise the built-in RS485 serial interface so a custom/native component can be created, but until then this can hopefully help bridge the gap.

The tutorial is split into several parts, one for each component, and list of all components used with their corresponding links are below:

  1. Template Cover
  2. Template Sensor
  3. Input Number
  4. Automation
  5. IFTTT
  6. Script

Ready! Let’s start!

Cover

Start of by creating a cover using the below YAML code.

  cover_name:
    friendly_name: Cover Name
    value_template: "{{is_state('sensor.blind_state_sensor', 'Open')}}"
    open_cover: 
      service: script.blind_script_1
      data:
        mode: 'open'
        position: '0'
    close_cover:  
      service: script.blind_script_1
      data:
        mode: 'close'
        position: '100'

Sensor

Add the following sensor.

platform: template
sensors:
  blind_state:
    value_template: >
      {% if is_state('input_number.blind_test_position', '0.0') %}
        Open
      {% else %}
        Closed
      {% endif %}

Input Number

Creates a slider on the frontend allowing you to control the exact position of the blind.

blind_position_1:
  min: 0
  max: 100

Automation

Triggers anytime the input_number is changed and sends the value (retrieved via templating) to the event which matches the one you created on IFTTT. Information on configuring IFTTT with HA and creating webhooks can be found on the IFTTT component documentation linked above.

alias: Blind Automation 1
trigger:
  platform: state
  entity_id: input_number.name_of_your_input_number
action:
  - service: ifttt.trigger
    data_template: {"event":"name_of_ifttt_web_request", "value1":"{{trigger.to_state.state | int}}"}

Script

A single script to handle both opening and closing of the cover by using templating to dynamically call the correct service. Lastly {{position}} will set the value of your input_number to 0 or 100 depending on the service called.

blind_script_1:
  sequence:
    - service_template: cover.{{mode}}_cover
      data:
        entity_id: cover.name_of_cover
    - service: input_number.set_value
      data_template:
        entity_id: input_number.blind_position_1
        value: "{{position}}"

Show and tell

Feedback/Comments/Suggestions

There is always room to improve so I’d love to hear any feedback, comments or suggestions you may have. Thank you and enjoy!

3 Likes

Hi cryptelli, this is great. You have saved me a lot of time. Can you elaborate on the IFTTT set up as well as what parts of your code I need to change for my setup eg “name_of_ifttt_web_request”

Thanks.

@f0rk Thank you, glad you’ve found my work useful :+1:.

In regards to your question, the parts of the code you’ll need to change are the entity ids and the IFTTT web request.

When setting up your IFTTT recipe the name you enter under “Event Name” is what use in place of name_of_ifttt_web_request

With the entity ids you can name your cover, sensor, input_number, automation and script whatever you like, just be sure to use those names in place of my example values, so for example where I’ve called the script blind_script_1 you can change that to blind_living_room: then update the entity inside the cover.

Hope this helps.

@cryptelli Thanks for your reply.

The one question I have is when the blind is operated via IFTTT or the RF remote, how is its position updated back to Home Assistant?

eg. The blind is in the open position. Via RF remote control the blind is then closed half way. To Home Assistant, will the blind not still be in its last know position(Open)?

Thanks.

@f0rk, please see the below from my opening post.

1 Like

Thanks for all your work. I’m planning on buying the PULSE and implementing this!!

So cool, and looks great

Side discussion re:

If the blinds were operated by another device such as the mobile app or remote the state in HA wouldn’t update as the system is stateless.

I have a remote that you can scroll to a position for the blinds. Does this not imply there IS a state for the blinds being communicated to the remote?

Thanks, glad you like it :+1:.

I have the same remote, the issue is because the PULSE hub doesn’t communicate back to HA with the position the blind was moved to if for example say the blind was set to 50% inside HA and you scrolled your remote to 75% while the remote would be correct HA would still show it being set at 50%.

This is the definition of stateless, hopefully that makes sense.

1 Like

Make perfect sense, thanks for explaining.