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.
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.
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.
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.
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.
EDIT:
Maybe i got it! If blinds tilt are closed, doesnt “0”, but none.
This is closed tilt:
Any solution?
The second problem is with the position. If fully closed / down, the value is 100. If open / pulled up is without value.
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”
}
],
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.
Yes I have. You can see the diff in the links I gave in my previous message.
Great. I Will try it And let You know.
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.
@gieljnssns: yes, you are right. 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?
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?
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…
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.
@tetienne
im not sure, what you think.
Full closed
"states": [
{
"name": "orientation",
"type": "integer"
},
{
"name": "position",
"value": 100,
"type": "integer"
}
],
Full opened
"states": [
{
"name": "orientation",
"value": 100,
"type": "integer"
},
{
"name": "position",
"type": "integer"
}
]
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
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.
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.