RF controlled window shutters via shell script

Hi, first post and probably breaking a good amount of rules, but here it goes.

I have quite a number of 433MHz RF controlled window shutter motors from the German supplier 3T-Motors in my house. They use their proprietary RF protocol which I managed to reverse-engineer and write a Python program for so that I can control them from a Raspberry Pi that has a simple 433 MHz transceiver connected to its GPIO, see GitHub - MrBatschner/Polladen: A Python tool to control a 433MHz remote controlled window shutter from an RPi..

That very same RPi runs my home-assistant installation which so far only controlled some Zigbee sockets (the sun entity is totally awesome for automating outdoor lights). What I want to do now, is having shutter/cover buttons (up/down/stop) on my home-assistant dashboard that call the tool with the required parameters.

Even though I was reading through the documentation, I have no clue how to start. Could you maybe give me some hints on where to start and how I can wire a shutter button to a shell/python script?

Any help is greatly appreciated, thanks in advance.

Regards TB

Welcome to HA! :slightly_smiling_face:
You can use shell_commands to call your scripts and the template_cover.
EDIT: There’s also the Command line cover.

I can’t believe it’s not butter it’s so simple… but it is. :open_mouth:

cover:
  - platform: command_line
    covers:
      kitchen:
        command_open: /polladen/polladen.py -r 1337 -c1 up
        command_close: /polladen/polladen.py -r 1337 -c1 down
        command_stop: /polladen/polladen.py -r 1337 -c1 stop

Works like a charm. Thank you so much. :blush: