I know this topic has been inactive for a while but in case someone is also trying to do this: I got it to work using the Schellenberg wireless stick and the Schellenberg belt winder running home assistant on a Raspberry. This solution does not require a smart friends box or anything else.
My solution is based on the reverse engineering of the Schellenberg wirless stick which was done by someone else in this repository.
I will try to explain as good as I can how I set the belt winder up but if you have any questions feel free to ask. Also I am quite new to home assistant so my soultion may not be perfect - if you have any suggestions on how to improve it please let me know as I am always happy to learn
Find the correct usb port
Plug the wireless stick into the Raspberry Pi and connect to the Raspberry via SSH. Then run dmesg
which should deliver an output like in the screenshot below (maybe you need to scroll up a bit to find the correct lines):
The yellow highlighted part is the USB port we are looking for (if it says something different on your system replace the value in all future commands).
Pair the Shutters
The pairing of the shutters requires that the shutters are already paired (and working!) with a remote (I used the one with 5 channels).
- Select the channel on the remote that controlls the device that shall be paired
- Press the button on the battery compartment of the remote control to put it into programming mode
- Press the middle button of the remote control
- Send the “Pair” command to the wireless stick using
echo "ss119400000" > /dev/ttyACM1
(11 is the new device identifier - change this for every device you are pairing)
- Again press the button in the battery compartment of the remote control
You can test if the pairing worked by using echo "ss119010000" > /dev/ttyACM1
to open the sutter and echo "ss119020000" > /dev/ttyACM1
to close the shutter.
Create a bash script
I created a bash script to send commands to my shutters at config/bash_scripts/control_shutter.sh
:
echo "init" > /dev/ttyACM1
sleep 1
echo "ss"$1"9"$2"0000" > /dev/ttyACM1
sleep 1
The first command can be anything - I just found out that for some reason only every second command is executed (if someone knows why and how to avoid it let me know). The 1 second delay is needed because the wireless stick cannot handle parallel requests so I need to wait for the a command to complete before the next one can be issued.
I then made the bash script available in home assistant by adding
shell_command:
control_shutter: bash /config/bash_scripts/control_shutter.sh {{ device_id }} {{ command }}
to my configuration.yaml
Create an input boolean
Create an input boolean which will represent the state of the shutter in home assistant (mine is called input_boolean.bedroom_shutter_is_open
). The shutters do not report back anything to the wireless stick so the state we will be optimistically assumed and might get out of sync with the actual position of the shutter if a command is not received correctly or the position of the shutter is changed manually. In this case the state in HA must be changed manually to match the actual position.
Create a script
Add the following home assistant scripts to your configuration.yaml:
script:
open_bedroom_shutter:
alias: Open bedroom shutter
sequence:
- service: script.control_shutter
data:
device_id: '11'
command: '01'
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.bedroom_shutter_is_open
mode: queued
icon: mdi:window-shutter-open
max: 10
close_bedroom_shutter:
alias: Close bedroom shutter
sequence:
- service: script.control_shutter
data:
device_id: '11'
command: '02'
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.bedroom_shutter_is_open
mode: queued
icon: mdi:window-shutter
max: 10
control_shutter:
alias: Control shutters
sequence:
- service: shell_command.control_shutter
data:
device_id: '{{ device_id }}'
command: '{{ command }}'
mode: queued
icon: mdi:window-shutter-alert
max: 20
I use the single script control_shutter
for all commands I am sending to be able to queue all requests to the wireless stick as it cannot hanlde them in parallel.
Add an entity
The last thing you need to do is create a cover entity from a template by adding:
cover:
- platform: template
covers:
bedroom_shutter:
unique_id: "bedroom_shutter"
device_class: shutter
friendly_name: "Bedroom shutter"
value_template: "{{ states('input_boolean.bedroom_shutter_is_open') == 'on' }}"
open_cover:
service: script.open_bedroom_shutter
close_cover:
service: script.close_bedroom_shutter
to your configuration.yaml
You should now be able to contoll you shutter through HA.
This solution is propably not 100% reliable but it works fine for me so far. I wanted to share it in case someone else does not want to buy another box and have it standing around . There surely are ways to improve this setup so if you have any recommendations I am happy to learn more about them.