Hey Community,
I got a tubular motor and installed the hardware today to control my roller shutters (see pics below). The remote has three buttons (up, stop, down - see pic below) and all the RF codes can be learned through Broadlink RM Pro (which I have).
Is there a way to get the position status of my roller shutters?
I was thinking to get a RF receiver and connect to Raspberry Pi, where my HA is installed but I am not sure if I would be able to know the position of the roller shutters even then?
I would really appreciate your feedback.
keithh666
(Keith Hull)
September 9, 2018, 2:07am
2
If itâs RF you donât get any feedback so itâs not possible to know what the position is except at either end. You could use time to semi-determine the position but it wouldnât be very accurate. You could maybe fit a hall effect transistor and a magnet to get position data but it would probably be quite difficult. You really need a stepper motor to do precise positioning.
Sanyi
(Szekely Sandor)
September 9, 2018, 6:48am
3
Hi , this is similar to your system but its for an older version of Home Assistant
https://rollertrol.com/raspberry-pi-smart-home-with-home-assistant-and-broadlink-part3
i have modified-t to pass config check but did not tested on actual rollers
it works as apackage
homeassistant:
customize:
switch.open_blackout_blinds:
friendly_name: Redony Nyit
icon: mdi:window-open
assumed_state: true
switch.close_blackout_blinds:
friendly_name: Redony Zar
icon: mdi:window-closed
assumed_state: true
switch.stop_blackout_blinds:
friendly_name: Redony Stop
icon: mdi:window-minimize
assumed_state: true
input_number:
theater_blackout_blinds:
name: âTheater Blackout Blindsâ
icon: mdi:window-closed
min: 0
max: 100
step: 25
initial: 0
switch:
platform: broadlink
host: 192.168.0.100
mac: âB4:43:0D:38:87:B6â
timeout: 15
switches:
open_blackout_blinds:
friendly_name: âOpen Blackout Blindsâ
command_off: âJgAoAAABJ5ISRxJIEkcSSBJHEkgSRxJIEkcSSBJHEkcTRxJHEkgSRxIADQU=â
command_on: âJgAoAAABJ5ISRxJIEkcSSBJHEkgSRxJIEkcSSBJHEkcTRxJHEkgSRxIADQU=â
close_blackout_blinds:
friendly_name: âClose Blackout Blindsâ
command_off: âJgAoAAABJ5ISRxJIEkcSSBJHEkgSRxJIEkcSSBJHEkcTRxJHEkgSRxIADQU=â
command_on: âJgAoAAABJ5ISRxJIEkcSSBJHEkgSRxJIEkcSSBJHEkcTRxJHEkgSRxIADQU=â
stop_blackout_blinds:
friendly_name: âStop Blackout Blindsâ
command_off: âJgAoAAABJ5ISRxJIEkcSSBJHEkgSRxJIEkcSSBJHEkcTRxJHEkgSRxIADQU=â
command_on: âJgAoAAABJ5ISRxJIEkcSSBJHEkgSRxJIEkcSSBJHEkcTRxJHEkgSRxIADQU=â
sensor:
platform: mqtt
name: âSlider Startedâ
state_topic: âsetStart/#â
platform: mqtt
name: âSlider Stoppedâ
state_topic: âsetStop/#â
platform: mqtt
name: âPercent Travelâ
state_topic: âsetPctTravel/#â
platform: mqtt
name: âDirection Travelâ
state_topic: âsetDirection/#â
platform: mqtt
name: âTravel Timingâ
state_topic: âsetTravelTime/#â
platform: mqtt
name: âControl STATUSâ
state_topic: âsetStatus/#â
END SENSOR READINGS
automation:
AUTOMATION TRIGGERED BY HASS RESTART
AUTOMATION TRIGGERED BY SLIDER CHANGE
alias: âTheater Blackout Blind Slider Automationâ
hide_entity: True
trigger:
platform: state
entity_id: input_number.theater_blackout_blinds
THESE CONDITIONS MUST ALL BE MET FOR TRIGGER TO WORK
condition:
condition: and
conditions:
- condition: state
entity_id: âscript.slider_moved_openâ
state: âoffâ
- condition: state
entity_id: âscript.slider_moved_closeâ
state: âoffâ
- condition: template
value_template: â{{ states(âsensor.control_statusâ) == âDONEâ }}â
action:
service: script.turn_on
data_template:
#### SCRIPT DIRECTION DECISION re OPEN or CLOSE ####
entity_id: >
{% if (trigger.to_state.state | int - trigger.from_state.state | int < 0) %}
script.slider_moved_close
{% else %}
script.slider_moved_open
{% endif %}
#### VARIABLE VALUES PASSED TO SCRIPTS ####
variables:
set_start: '{{ trigger.from_state.state | int }}'
set_stop: '{{ trigger.to_state.state | int }}'
full_excursion: '30' #seconds
travel_pct: >
{% if (trigger.to_state.state | int - trigger.from_state.state | int < 0) %}
{{ trigger.from_state.state | int - trigger.to_state.state | int }}
{% else %}
{{ trigger.to_state.state | int - trigger.from_state.state | int }}
{% endif %}
direction_travel: >
{% if (trigger.to_state.state | int - trigger.from_state.state | int < 0) %}
CLOSE
{% else %}
OPEN
{% endif %}
travel_time: >
{% if (trigger.to_state.state | int - trigger.from_state.state | int < 0) %}
{{ (( trigger.from_state.state | int - trigger.to_state.state | int)/100*30) | round(0) }}
{% else %}
{{ ((trigger.to_state.state | int - trigger.from_state.state | int)/100*30) | round(0) }}
{% endif %}
script:
slider_moved_open:
sequence:
#### YOU CAN DYNAMICALLY CONTROL THE VISIBILITY OF GROUPS [not used here]
#- service: group.set_visibility
#data:
#entity_id: group.theater_blackout_blinds
#visible: true
#### UPDATE SENSOR DISPLAY
- service: mqtt.publish
data_template:
topic: "setStatus"
retain: true
payload: 'Moving'
- service: mqtt.publish
data_template:
topic: "setStart"
retain: true
payload: '{{ set_start }}'
- service: mqtt.publish
data_template:
topic: "setStop"
retain: true
payload: '{{ set_stop }}'
- service: mqtt.publish
data_template:
topic: "setPctTravel"
retain: true
payload: '{{ travel_pct }}'
- service: mqtt.publish
data_template:
topic: "setDirection"
retain: true
payload: '{{ direction_travel }}'
- service: mqtt.publish
data_template:
topic: "setTravelTime"
retain: true
payload: '{{ travel_time }}'
- delay: 00:00:04
- service: switch.turn_on
entity_id: switch.open_blackout_blinds
- delay: 00:00:0{{ travel_time }}
#- delay: 00:00:04
- service: switch.turn_off
entity_id: switch.open_blackout_blinds
- service: input_number.set_value
data_template:
entity_id: input_number.theater_blackout_blinds
value: '{{ set_stop }}'
- service: mqtt.publish
data_template:
topic: "setStatus"
retain: true
payload: 'DONE'
- delay: 00:00:02
slider_moved_close:
sequence:
- service: mqtt.publish
data_template:
topic: "setStatus"
retain: true
payload: 'Moving'
- service: mqtt.publish
data_template:
topic: "setStart"
retain: true
payload: '{{ set_start }}'
- service: mqtt.publish
data_template:
topic: "setStop"
retain: true
payload: '{{ set_stop }}'
- service: mqtt.publish
data_template:
topic: "setPctTravel"
retain: true
payload: '{{ travel_pct }}'
- service: mqtt.publish
data_template:
topic: "setDirection"
retain: true
payload: '{{ direction_travel }}'
- service: mqtt.publish
data_template:
topic: "setTravelTime"
retain: true
payload: '{{ travel_time }}'
- delay: 00:00:04
#- delay: '00:00:0{{ ((trigger.to_state.state | int - trigger.from_state.state | int)/25) | round(0) }}'
- service: switch.turn_on
entity_id: switch.close_blackout_blinds
- delay: 00:00:0{{ travel_time }}
#- delay: 00:00:04
- service: switch.turn_off
entity_id: switch.close_blackout_blinds
- service: input_number.set_value
data_template:
entity_id: input_number.theater_blackout_blinds
value: '{{ set_stop }}'
- service: mqtt.publish
data_template:
topic: "setStatus"
retain: true
payload: 'DONE'
- delay: 00:00:02
1 Like