Not all the devices are supported yet by the official Somfy API (and so by the Somfy component). To be sure your devices are (not) supported please follow these steps:
After some research, the Somfy API look like the Wink API. So inspired by the python-wink library, I’ve started to develop the Somfy one: https://github.com/tetienne/somfy-open-api/
I’ve 10 years of experience in Java, Python is kind of new for me. So I will use this project to learn the basics.
I’ve finished to developed the client to manipulate the covers from the Somfy API. The documentation does not provide enough information to implement other devices. I need some volunteers to discover what Somfy exposes. The list of available devices are here: https://developer.somfy.com/products-services-informations.
Meanwhile, I’ve contacted Somfy Support to have more details. They are also working on a fix about the GET /device/<device_id> not returning the correct state. That’s a bug I found during my tests.
Once the client mature enough, I will start to integrate it in Home Assistant. I’ve read the documentation, it seems not so obvious but will be feasible.
Thank you for your issue. It should be quick to add support for this device. Monday I will have a look.
I’m curious, you cannot control the position of your blinds?
Well the blinds don’t support it. So that makes sense. However, the blinds do support a predefined position called the My Position. I raised the issue with somfy to support it in the API.
@robertpe We never said the opposite. Currently the Tahoma component use the unofficial API, scraped from the Tahoma website.
Purpose here is to use the official API which has been created to be exposed to the world. Perhaps, the set of features is limited but it should evolve in the future if Somfy play well the game.
@pbavinck Indeed that makes sense. You are right, for the covers, I haven’t too the My position command. I’ve solved your issue on the repository. There is one question waiting for you
By the way, if you can only open and close your blinds, what’s the purpose of the stop command?
You can stop them mid-way. E.g.
Open: not covering the window
Closed: curtains/covers are all the way down
Stop: While the curtain/covers is going up or down, you can tell it to stop, only covering top part of the window.
@pbavinck So that’s weird Somfy does not return the position command like the roller shutter. That’s make no sense. By the way, can you have look on your issue please?
I’ve uploaded my library to pypi. It means now an home assistant component can use it.
@tetienne I do not seems to manage to install your pymfy module using PyPI…
I set up a python3 virtual environment using python3 -m venv . . Then I started python application with your example code. It gives me:
(test) Bert-MBP:test bertouttier$ python3 main.py
Traceback (most recent call last):
File "main.py", line 8, in <module>
from pymfy.api.somfy_api import SomfyApi
ModuleNotFoundError: No module named 'pymfy'
What am I doing wrong? Could you indicate how to install your module from source?
pi@raspberry:~ $ pip install pymfy
Collecting pymfy
Could not find a version that satisfies the requirement pymfy (from versions: )
No matching distribution found for pymfy