Smart Friends Bridge Addon

It should literally be device_id and not the actual ID. It gets the actual ID from the cover template.

shell_command:
    shutter_up:        "curl http://20.20.20.104:5001/set/{{ device_id }}/rollingShutter/up"
    shutter_down:      "curl http://20.20.20.104:5001/set/{{ device_id }}/rollingShutter/down"
    shutter_stop:      "curl http://20.20.20.104:5001/set/{{ device_id }}/rollingShutter/stop"
    shutter_position:  "curl http://20.20.20.104:5001/set/{{ device_id }}/{{ 100 - position }}"


    

cover:
  - platform: template
    covers:
      shutter_balkon_rechts:
        friendly_name: "Rolladen Balkon rechts"
        device_class: shutter
        position_template: "{{ states('sensor.shutter_position_balkon_rechts') }}"
        open_cover:
          service: shell_command.shutter_up
          data:
            device_id: 16551
        close_cover:
          service: shell_command.shutter_down
          data:
            device_id: 16551
        stop_cover:
          service: shell_command.shutter_stop
          data:
            device_id: 16551
        set_cover_position:
          service: shell_command.shutter_position
          data_template:
            device_id: 16551
            position: "{{ position }}"

sensor:
  - platform: command_line
    name: shutter_position_balkon_rechts
    command: "curl http://20.20.20.104:5001/get/{{ device_id }}/position"
    unit_of_measurement: "%"
    scan_interval: 5
    value_template: '{{ 100 - value_json.currentValue }}'

Although you’re getting the error because the bridge has no knowledge of the position sensor. I suspect there is no position sensor and the app just does it based on time. Maybe you had to calibrate how long it takes to go up and down and when you tell it to go to 50% it just does 50% of the time. I bet if you moved the shutters outside their app, it would not have the correct position.

The only way I can confirm if you have a position sensor or not is by that raw dump. So I urge you to try it again.

If you don’t have a position sensor then I suggest you look into using something like this: Custom Component: Cover Time Based

I could add a time based position into my bridge but if you ever moved the shutter outside the bridge then it would lose track and I’m not sure how to regain it. I’ll have to think about it more and maybe I can come up with something I’ll be happy with.