Howto control awnings with MQTT

Hello, I hope someone can help me with my issue.
I have 4 Somfy / RTS controlled awnings that I manged to acess via MQTT due to the great instructions by MakerMike (GitHub - MakerMeik/Somfy_Remote: An Arduino Sketch able to simulate a Somfy remote control). I can now move the awnings in and out, and stop the awnings with MQTT commands, which is working great so far. The awnings just can listen to the commands: u,d,s (up, down ans stop). The MQTT topic is for example: “Somfy-1” and the payload is either: “u”, “d” oder “s”. So for my 4 awnings there are just the four topics “Somfy-1”, “Somfy-2”, “Somfy-3” and “Somfy-4”. I listened to the topics in Home Assistant and I could see them. But I dont get it to work that i could use the existing mqtt cover platform. Home Assistant complaints that the Somfiy entity is not a unique one and so i am stuck. Hopefully somone knows a way out…
Thanks in advance

1 Like

Hey @pkmax
did you already find a solution to your problem?

I followed the same tutorial by MakerMeik to make my somfy awning MQTT-compatible.
After that I experimented a lot to integrate my awning into Home Assistant.
The following lines made it work:

mqtt:
  cover:
    name: "Somfy Markise"
    command_topic: "Garden/Awning"
    state_topic: "Garden/Awning/Feedback"
    qos: 1
    unique_id: somfy_markise
    payload_open: "u"
    payload_close: "d"
    payload_stop: "s"

It works well, thats what I see in the control panel:
ha_somfy_awning

But I did not yet manage to do any automations with it because it shows only as one entity.
Maybe someone has a hint for me?

Hello Crumbelino, thanks for your answer.
I manageded to solve the problem in the meantime with an automation:

I publish by MQTT:
homeassistant/cover/Somfy-3/config

with the following payload:

{ “name”: “Markiese-Wintergarten”, “command_topic”: “Somfy-3”, “position_topic”: “Somfy-3”, “set_position_topic”: “Somfy-3”, “payload_open”: “d”, “payload_close”: “u”, “payload_stop”: “s”, “state_open”: “100”, “state_closed”: “0”, “unique_id”: “markwiga”, “device”: { “name”: “Markiese-Wintergarten”, “model”: “Pi-Somfy controlled shutter”, “manufacturer”: “pkduino”, “identifiers”: “markwiga” } }

This did the trick for me but i think this is somehow very similar to your soltion.
Thanks a lot for your effort to reply.

2 Likes