Somfy Tahoma Official API


#86

What’s you describe has been already done by the Tahoma component. This last one use the unofficial API use by the mobile app and the Somfy Connect website. The cons for this is that there is no official support, so they can change it at any time and break all the implementations. This should not be the case for an official API like the one I use.


#87

True, i agree, we should use the API that is official. I was hoping there were using it too but i can see they are not. Let’s hope there is going to be support for it. Anyway my biggest interest will be to support Somfy shades that use RTS called Somfy Sonesse 30, i will report back when i get them soon.


#88

For your futur shade it should be OK I guess. But if it’s not too late try to find io shade. RTS is stateless, you will never get any information back.


#89

I know, my wife works with a company making shades and can get the somfy sonesse 30 for a good deal e.g cheap so she ordered those besides i hear there are no IO motors for indoor on battery so all other are 230V or 12V which means they have to be power supplied.


#90

I do it step by step. Changing Open to 100 and close to 0. That reverse tilt buttons and work corectly.

def open_cover_tilt(self, **kwargs):
    """Open the cover tilt."""
    from pymfy.api.devices.blind import Blind
    Blind(self.device, self.api).orientation = 100

def close_cover_tilt(self, **kwargs):
    """Close the cover tilt."""
    from pymfy.api.devices.blind import Blind
    Blind(self.device, self.api).orientation = 0

First problem is, if i close tilt (set 0), tilt will disappear and only position will remain.
xetuusv
hjaez

EDIT:
Maybe i got it! :slight_smile: If blinds tilt are closed, doesnt “0”, but none.

This is closed tilt:
ffchvdc
Any solution?

The second problem is with the position. If fully closed / down, the value is 100. If open / pulled up is without value.


#91

For imagination
Blinds maximal UP
“states”: [
{
“name”: “orientation”,
“value”: 100,
“type”: “integer”
},
{
“name”: “position”,
“type”: “integer”
}
],

Blind maximal down, tilt full closed
“states”: [
{
“name”: “orientation”,
“type”: “integer”
},
{
“name”: “position”,
“value”: 100,
“type”: “integer”
}
],

Blind maximal down, till full opened
“states”: [
{
“name”: “orientation”,
“value”: 100,
“type”: “integer”
},
{
“name”: “position”,
“value”: 100,
“type”: “integer”
}
],


#92

Thank you for your investigation and your time. What you found does not surprise me. Indeed, it’s exactly the same behavior for the position state. So, I’ve reported this to Somfy support. Meanwhile, I’ve updated my pymfy library to handle this behavior. New version is 0.4.4. I’ve also updated the component.


#93

:slight_smile: happy the help You And mě And others in Future.

Are You updated files init And somfy.py component?


#94

Yes I have. You can see the diff in the links I gave in my previous message.


#95

Great. I Will try it And let You know.


#96

After copy new init and somfy

2018-12-29 12:24:57 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.cover.somfy. Make sure all dependencies are installed

ModuleNotFoundError: No module named 'homeassistant.components.somfy'

2018-12-29 12:24:57 ERROR (MainThread) [homeassistant.loader] Unable to find component cover.somfy

Unable to prepare setup for platform cover.somfy: Platform not found.

#97

@Bojkas You have to change this again…


#98

@gieljnssns: yes, you are right. :slight_smile: Thanks

@tetienne: great, it works almost perfect.

Delete “100 -”
def set_cover_position(self, **kwargs):
“”“Move the cover shutter to a specific position.”""
position = kwargs.get(ATTR_POSITION)
from pymfy.api.devices.roller_shutter import RollerShutter
RollerShutter(self.device, self.api).set_position(100 - position)

Delete “100 -”
@property
def current_cover_position(self):
“”“Return the current position of cover shutter.”""
position = None
if self.has_capability(‘position’):
from pymfy.api.devices.roller_shutter import RollerShutter
shutter = RollerShutter(self.device, self.api)
position = 100 - shutter.get_position()
return position

After this, i need only change show buttons up/down. Its work fine, but show bad. How can i do that?


#99

Oh I didn’t notice the position reverse. I will check that. I didn’t understand your question about the button. Can you rephrase or share a picture?


#100

I’m sorry, I’m probably wrong. After the edits I wrote, everything looks right. Both sliders, tilt close open, everything is perfect. only the up and down buttons are displayed incorrectly. When the blinds are completely down, the down arrow is displayed. if I click on it, the blinds will go up right.

All works perfect, just show bad Up And down…



#101

Interesting case. Because with my own cover, I have to perform the 100 - somfy_position to have a correctly value in HASS. Can you open and close your cover and like you did here return me the state of your device? I hope Somfy does not change the meaning of 0 and 100 depending the type of the device.

Edit: Your cover are closed (according to the Somfy screenshot) but are displayed as opened in HASS.


#102

@tetienne
im not sure, what you think.
Full closed

    "states": [
      {
        "name": "orientation",
        "type": "integer"
      },
      {
        "name": "position",
        "value": 100,
        "type": "integer"
      }
    ],

tqgmdnuy

Full opened

 "states": [
      {
        "name": "orientation",
        "value": 100,
        "type": "integer"
      },
      {
        "name": "position",
        "type": "integer"
      }
    ]

bcbzn


#103

Hello

i am running HassOS and I get Tahoma components working except for
Dimmer
Temperature sensor
They aren’t show up on frontend.

Here is the my config log

I will be very pleased to find a solution to get them work.

Regards


#104

Hi, this topic is related to a new component using the official Somfy API. This is not linked to the Tahoma component you are talking about.


#105

Hello tetienne

Is this solution could solved my issues?
I need to get access to my tahoma box through home assistant.
It works but some of my entites are not supported.