I’m on vacation so I don’t even have a computer. After Monday I can see what possible. There might not be any status updates from the SmartFriends hub. If there isn’t then I can do anything but I’ll see if I can do something like if I know a cover is moving then continually query for the position until it stops.
The examples are for manually creating entities directly in the configuration file. So they would go in the configuration.yaml
@GimpArm thank you.
Just figured it out as well… and that my error was that I just did a “reload” instead of restart for the entity to show up - regarding the restful documentation a reload should be enough.
Two more questions:
The IP here:
shell_command:
shutter_up: "curl http://127.0.0.1:5001/set/{{ device_id }}/rollingShutter/up"
shutter_down: "curl http://127.0.0.1:5001/set/{{ device_id }}/rollingShutter/down"
shutter_stop: "curl http://127.0.0.1:5001/set/{{ device_id }}/rollingShutter/stop"
shutter_position: "curl http://127.0.0.1:5001/set/{{ device_id }}/position/{{ 100 - position }}"
Is it the IP from the Smart Friends box or from the HA server?
I thought it should be the friends box, but the port you used here is the one from the HA server
For the IDs:
you have this example:
cover:
- platform: template
covers:
shutter_office:
friendly_name: "Shutter - Office"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_office') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 10433
close_cover:
service: shell_command.shutter_down
data:
device_id: 10433
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 10433
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 10433
position: "{{ position }}"
Is this just the overall ID? I assume yes, since shutter position and the commands have the same ID
e.g. this is how the “list” is looking like for me:
{
"id": 2283,
"name": "Rohrmotor PREMIUM",
"room": "LivingRoom",
"gatewayDevice": "SmartFriendsBox",
"kind": "RollingShutter",
"manufacturer": "Alfred Schellenberg GmbH",
"state": "Stop",
"devices": {
"rollingShutter": {
"Id": 1705,
"description": "SchellenbergRadioMotor_V2",
"commands": {
"Stop": 0,
"Up": 1,
"Down": 2
},
"currentValue": "Stop"
},
"position": {
"Id": 3300,
"description": "SchellenbergPosition_Dual",
"max": 100,
"min": 0,
"precision": 0,
"step": 1,
"currentValue": 100
},
"failureStatus": {
"Id": 3885,
"description": "SchellenbergFailureDevice",
"currentValue": "FailureNoFailure"
}
}
}
So in this case I have to enter the ID 2283?
or 1705 for up/down/stop and 3300 for the position?
Tried out now multiple things.
Seems to be indeed the Home Assistant Server IP + Port and the overall ID.
Jay
Thank you sooo much for this Addon!
I checked what data the SmartFriends hub is making available. It does not give the position until it is stopped and there is nothing I can do. The state does update with the motion, up, down, stopped. I’m pretty sure in the official app they just play an animation that has nothing to do with the actual position.
Hallo GimpArm
brauche hilfe zum einbinden von rest
dein Addon zur smartfriends Box bereits installiert
kann Werte mit homeassostant/list sehen
Hallo tom_smarthome
wie bekomme ich die rest daten in Homeassistant
wie bekomme ich rest in homeassistant zum laufen
einen token dazu habe ich schon
Hallo GimpArm
mit der adresse:http://homeassistant.local:5001/list
erhalte ich nachstehende Daten
[
{
“id”: 17133,
“name”: “Rollo drei”,
“room”: “Esszimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 13174,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 741,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 7086,
“name”: “Rollo sechs”,
“Zimmer”: “Wohnzimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 10993,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 9767,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 15819,
“name”: “Rollo vier”,
“room”: “Esszimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 12907,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 4813,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 9862,
“name”: “Rollo eins”,
“Zimmer”: “Küche”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 133,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 7443,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 13352,
“name”: “Rollo sieben”,
“room”: “Schlafzimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 10553,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 18677,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 11163,
“name”: “Rollo acht”,
“room”: “Schlafzimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 17816,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 13971,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 5608,
“name”: “Rollo zwei”,
“room”: “Esszimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 8368,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 17867,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
},
{
“id”: 6833,
“name”: “Rollo fünf”,
“Zimmer”: “Wohnzimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 15354,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 11667,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
}
}
}
]
Hallo GimpArm
was muss ich wo und wie eintragen?
Hallo @Wolfi0912 ,
du musst dir das Addon File Editor herunterladen und dort die configuration.yaml bearbeiten. Dort kannst du den nötigen Code aus der Dokumentation einfügen und auf dein System anpassen (device ids usw.). Kann dann z.B. so aussehen (nur ein Teil des Codes!):
Ich hoffe ich konnte dir helfen!
Hallo tom_smarthome
danke werde es testen
Hallo tom_smarthome
ein Auszug aus meiner homelist
“id”: 5608,
“name”: “Rollo zwei”,
“room”: “Esszimmer”,
“gatewayDevice”: “SmartFriendsBox”,
“Art”: “RollingShutter”,
“Hersteller”: “Alfred Schellenberg GmbH”,
“Zustand”: “Stopp”,
“Geräte”: {
“Rolltor”: {
“ID”: 8368,
“Beschreibung”: “SchellenbergRolloDrive”,
“Befehle”: {
“Stopp”: 0,
“Nach oben”: 1,
“Runter”: 2
},
“currentValue”: “Stopp”
},
“Position”: {
“ID”: 17867,
“Beschreibung”: “SchellenbergPosition”,
“max”: 100,
“min”: 0,
“Präzision”: 0,
"Schritt 1,
“aktuellerWert”: 0
wie müsste die jaml config aussehen?
mit dieser bekomme ich Fehlermeldung:
shell_command:
shutter_up: “curl http://homeip:5001/set/{{ device_id }}/rollingShutter/up”
shutter_down: “curl http:// homeip:5001:5001/set/{{ device_id }}/rollingShutter/down”
shutter_stop: “curl http:// homeip:5001:5001/{{ device_id }}/rollingShutter/stop”
shutter_position: “curl http:// homeip:5001:5001/set/{{ device_id }}/{{ 100 - position }}”
cover:
- platform: template
covers:
Rollo zwei:
friendly_name: “Rollo zwei”
device_class: shutter
position_template: “{{ states(‘sensor.shutter_position_Rollo zwei’) }}”
open_cover:
service: shell_command.shutter_up
data:
device_id: 5608
close_cover:
service: shell_command.shutter_down
data:
device_id: 5608
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 5608
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 5608
position: “{{ position }}”
homeip:5001 habe ich durch meine ip ersetzt
Du hast http:// homeip:5001:5001
geschrieben. Es gibt ein Leerzeichen und du hast den Port zweimal geschrieben. Du brauchst http://homeip:5001
Hallo @Wolfi0912,
ich habe dir gerade mal eine Config auf deine Geräte zugeschnitten erstellt. Kannst die ja mal einfügen und schauen, ob es klappt. Sollte ohne eine Änderung eigentlich funktionieren.
Melde dich gerne, wenn es klappt oder du weitere Fragen/Probleme hast.
shell_command:
shutter_up: "curl http://127.0.0.1:5001/set/{{ device_id }}/rollingShutter/up"
shutter_down: "curl http://127.0.0.1:5001/set/{{ device_id }}/rollingShutter/down"
shutter_stop: "curl http://127.0.0.1:5001/set/{{ device_id }}/rollingShutter/stop"
shutter_position: "curl http://127.0.0.1:5001/set/{{ device_id }}/position/{{ 100 - position }}"
command_line:
- sensor:
name: shutter_position_rollo1
command: "curl http://127.0.0.1:5001/get/9862/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo2
command: "curl http://127.0.0.1:5001/get/5608/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo3
command: "curl http://127.0.0.1:5001/get/17133/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo4
command: "curl http://127.0.0.1:5001/get/9862/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo5
command: "curl http://127.0.0.1:5001/get/6833/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo6
command: "curl http://127.0.0.1:5001/get/7086/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo7
command: "curl http://127.0.0.1:5001/get/13352/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
- sensor:
name: shutter_position_rollo8
command: "curl http://127.0.0.1:5001/get/11163/position"
unit_of_measurement: "%"
scan_interval: 5
value_template: '{{ 100 - value_json.currentValue }}'
cover:
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 1"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo1') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 9862
close_cover:
service: shell_command.shutter_down
data:
device_id: 9862
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 9862
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 9862
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 2"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 5608
close_cover:
service: shell_command.shutter_down
data:
device_id: 5608
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 5608
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 5608
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 3"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 17133
close_cover:
service: shell_command.shutter_down
data:
device_id: 17133
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 17133
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 17133
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 4"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 9862
close_cover:
service: shell_command.shutter_down
data:
device_id: 9862
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 9862
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 9862
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 5"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 6833
close_cover:
service: shell_command.shutter_down
data:
device_id: 6833
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 6833
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 6833
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 6"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 7086
close_cover:
service: shell_command.shutter_down
data:
device_id: 7086
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 7086
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 7086
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 7"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 13352
close_cover:
service: shell_command.shutter_down
data:
device_id: 13352
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 13352
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 13352
position: "{{ position }}"
- platform: template
covers:
shutter_office:
friendly_name: "Rollo 8"
device_class: shutter
position_template: "{{ states('sensor.shutter_position_rollo2') }}"
open_cover:
service: shell_command.shutter_up
data:
device_id: 11163
close_cover:
service: shell_command.shutter_down
data:
device_id: 11163
stop_cover:
service: shell_command.shutter_stop
data:
device_id: 11163
set_cover_position:
service: shell_command.shutter_position
data_template:
device_id: 11163
position: "{{ position }}"
Hat super funktioniert vielen Dank
Kannst du die position sehen wenn du sie mit alexa zumachst
Alexa nutze ich nicht, aber eigentlich sollte das klappen. Wird dir denn die richtige Position in Home Assistant angezeigt? Und wie hast du Alexa integriert?