rstrouse / espsomfy-rts-ha Goto Github PK
View Code? Open in Web Editor NEWControl your somfy shades in Home Assistant
License: The Unlicense
Control your somfy shades in Home Assistant
License: The Unlicense
Hi,
sorry for the maybe silly question - as I'm new to HA... 😇
After installing the HACS integration ESPSomfyRTS-HA on my HA instance, I got a lot of services and I didn't know which ones to use... In the meantime it works very well for my purposes and I have already created some automations. However, there are still some things I don't understand, e.g. what is the difference between the service 'espsomfy_rts.open_shade' and the service 'cover.open_cover'? Both work fine - which one should I use?
...& thx for this great integration!!
Please forgive me if this is too much off-topic...
First of all, great project! I also managed to control my Somfy Blinds in Home Assistant using a bash script and a Broadlink RM Pro device (1st gen);
https://www.ibroadlink.com/productinfo/762672.html
Of course my interface is very basic, and the range may be limited since from my understanding the Broadlink RF frequency is slightly different from the one used by Somfy remotes...
Anyhow, I was wondering: would you be open to consider adding Broadlink RF support to your homeassistnant component?
I can provide to you my script if needed. I think it should be fairly easy, but I understand if you want to keep the scope of your component limited...
Anyhow, thanks in advance!
Hello,
I've successfully build the ESP32 device and added all shades and groups. Now I wanted to add the Home Assistant integration from HACS. I've added the custom repository and installed the integration. Then I restartet HA and it successfully found the device in the network. But when I try to add it (using username and password) it fails, showing the error: "Invalid flow specified".
Restarted multiple times, no success.
ESPSomfy RTS firmware: V 2.3.0
HA version: 2023.10.5
Running on Docker container at Synology NAS
Any idea, where this is coming from?
After calling the set position service, the shade reaches the set position. If I call the 'ESPSomfy RTS: Open Shade' service or use an entity card to open it again, it sometimes works, sometimes stops at the previously set position, or does not react.
However, I can open the shade after several up-and-down calls via the ESPSomfy RTS UI.
I am still trying to determine if this issue is related to the integration or the ESPSomfy-RTS project.
It would be nice to easily integrate the backup of the configuration of the ESPSomfy RTS controllers in the central home assistant backup.
Currently I have to backup every controller on its own and it would be very convenient if this were integrated in the Home Assistant backup process.
I already tried to find the relevant information (e.g. remote address, timings, last rolling code) somewehere in Home Assistant (e.g. the home-assistant_v2.db), but I was not able to locate it. I was just able to see the according entities and eventes being sent/processed but no config values:
When restarting HA after upgrade or installation of integrations etc. ESPSomfy-RTS-HA is not loaded.
All configured shades appear grayed-out. I tried reloading the integration, restarting HA etc. nothing helps.
When enabling debug and reloading the integration following line is shown in the log:
"ERROR (MainThread) [homeassistant.config_entries] Error unloading entry ESPSomfyRTS for binary_sensor"
The only way I get the integration active again is by rebooting the HA Yellow. (works 9 times out of 10)
Please note that the ESP Somfy sketch on the ESP32 device is fully responsive, without any flaws.
Thanks for the great job @rstrouse and the team!
I'm trying to add manually the ESPSomfy-RTS device to my HA instance over the internet and I'm getting wrong_host. I use my dynamic dns and the port forwarded to the port 80 of esp. I can verify that the port is open but no luck for the HA😊.
Also when I try to access the esp from a web page over the internet I can reach the site but it's useless because it keeps loading for centuries (attached picture)
From local access all are good!
Any help will be very welcome
Thanks again
Originally posted by @kostas125 in #4 (comment)
Firstly, thanks as this is a brilliant project.
I have one bit of strangeness - within seconds of configuring the integration, I get a notification that it has been discovered and I get the option to configure it again:
Otherwise, it works really well.
Not sure what I can add - happy to look for diagnostics or a log if directed...
hi, gonna thank you by translating to spanish, file attached
es.json
Thinking about the Open/Closed state in Home Assistant cover card, could we have the tilt-only blinds show Closed at position 0 and 100 and Open for all other positions? This may also mean changing the "Opening" and "Closing" states too.
Maybe "Moving" while the target position is 1-99 and "Closing" if the target is 0 or 100.
Great Integration, exactly what I needed, thanks! I updated the integration yesterday and wanted to use the set position state. When I select a shade and set a percentage (e.g., 20) I get the following error:
extra keys not allowed @ data['position']. Got None
The open and close services work perfectly, any idea?
The shade position in ESPSomfy-RTS is showing correctly (opened when open, closed when closed), and I have not activated the "inverted" option in ESPSomfy-RTS. However, in HA, the status is showing opposite (fully closed when fully opened), which means that the buttons do not work (ie when it is fully closed, only the "close" button is enabled, which doesn't do anything).
Firmware: v2.4.1
Thoughts/suggestions on where I should start looking?
I would need to be able to send StepUp and StepDown commands to my blinds based on button presses from my wall buttons, but there does not seem to be HA Services for ESPSSomfy RTS for that.
(I have KNX buttons. With long presses I want to start moving the blinds to the top or bottom, and with short presses I want to stop the blinds and adjust the tilt. The buttons send separate events for long and short presses.)
I've combined two roller shades into a group using the ESPSomfy web application and integrated them into Home Assistant using the integration. All was working well in v.2.1.6. but after upgrading the integration to v.2.1.9. the group entity became unavailable.
I was running my ESPSomfy on 2.1.6 and tried upgrading to 2.1.9 but failed as I couldn't find the S2 version (the artifact was expired), so I upgraded to 2.1.10. However, this didn't change the situation.
Now I've rolled back my HA integration to v.2.1.8. and the group entity is working again.
With v.2.1.9. I see this in my device page in Home Assistant (it's the "Slaapkamer" entity). The screenshot is before the ESPSomfy upgrade, but as stated, that had no effect.
Back to v.2.1.8. shows the controls again
Also, with v.2.1.9. I tried controlling the grouped shades using my HA cover card, resulting in this error message
2023-10-17 10:44:55.595 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547918101056] Entity cover.slaapkamer does not support this service.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 227, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1969, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2006, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 851, in entity_service_call
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity cover.slaapkamer does not support this service.
I wanted to start by saying thanks for doing this as I think it's an amazing project.
So far I have had an ESP just shorting correct DI on the remotes to have my blinds controlled in HA but this would be a game changer for me.
Unfortunately I'm struggling with pairing process.
I have quintuple checked my wiring and tried swapping RX/TX without changing them in the configuration and swapping RX/TX and then also swapping them in the config.
Basically I put my blinds into pairing by holding the button on the back, they jog and blink green but then nothing ever happens when I try to pair them from ESPSomfy.
I do see all the commands I send from my remote and I do see them regardless of the RX/TX situation.
Strangely (for me) I'm still seeing the commands sent in the logs even if I swap the TX/RX without changing them in the config
I'm using the blue E07-M1101D with a Wifi ESP32-WROOM-32.
It's a 56 bit motor. I have tried 2 different blinds - same results.
Any solutions for debugging/diagnosing?
Hi,
first of all, great project and very well put together!
I made the hardware according to the documentation, flashed the software and added the blinds without any issues.
Used everything last summer with no errors at all.
A week or two ago I noticed that the entity became unavailable in home assistant.
so I went to the web interface and saw that the following was happening?
After rebooting the hardware it immediately works again for a couple of days. Then this behavior starts again.
do you have any clue what is going on here?
No chantes to the hardware
Latest version of your software
Latest version of the home assistant integration
Latest version of home assistant
thanks in advance!
does anyone know how to make or how to modify the software for the remote control in question?
for the antenna You also have to use a different hardware I guess...
Hi,
Im having some issues with the function of the blinds when I have imported them into the home app. Everything works great up and down etc, but let’s say I open the blind 37% it says it’s closing them, and vice versa, once the operation is complete the state is always correct, it’s just getting confused with the wording within the icon if that makes sense! It’s not actually getting the up and down wrong, it’s just when I press to open the blinds it will state (closing..). I’m not sure if this is a limitation of the home app, or if there is something I can change. Any help would be great.
Thanks.
Hello
Does anyone thought of using events detected by the ESP's application to propagate them to HA (send cover ID + remote ID + key ID) ?
For example, it could be used as a trigger in an automation: kind of human overlap/bypass.
Regards
I miss a service asking the shades to go to the ´my’ position.
I do this with the somfy remote wich commands every shade at once. It would be great to call such a service instead of pressing the my button ov every shade in home assistant’s UI.
I tried to simulate this by asking every shade to go to its position by % but it’s slow and not accurate.
While adjusting the position using the built-in HomeAssistant cover page, the slider jumps between the target position and current position until they meet.
The state also shows closed at every position which seems to be from the integration not seeing these blinds as "Tilt only" which is a new addition to ESPSomfy-RTS.
Versions installed
ESPSomfy-RTS: 2.1.5
ESPSomfy-RTS-HA: 2.1.5
HomeAssistant: 2023.9.1
Hi,
I have grouped 5 shades in my kitchen on the ESP and when controlled directly via HA, all shades move up&down simultaneously. I have exposed the group to HomeKit so my wife can ask Siri to open or close the shades in the kitchen, but when initiated this way, the shades seem to be operating individually and only 4 of the 5 shades are moving, so the override of the group functionality seems to ignore commands when operated through HomeKit.
Is it possible to make the existing override apply on HomeKit based commands?
Or is there a workaround?
Would it be possible to implement manual configuration of the ESPSomfy-RTS device connection?
The use case for this is: The ESPSomfy-RTS device is located in a separate "IoT" vlan. Connection to it is possible from the main vlan where HomeAssistant resides but due to the nature of vlan SSDP doesn't work here hence the device is never going to be automatically discovered.
With manual connection it's just a matter of pointing the HA at the target IP address and firewall rules but that's outside of scope here.
Hello,
ESPSomfy-RTS group mechanism is working fine and you did a good job.
I'm just missing a feature :
As you can see cover.volets_salon
does have an extra entity_id
attribute with the cover's ID list when defined as cover group in HA yaml config.
cover:
- platform: group
name: "volets_salon"
entities:
- cover.volet_salon_allee
- cover.volet_salon_rue
ID list is already available in ESPSomfy-RTS UI
May this be added as a new feature ?
Many thanks
if autocheck update is off, HA notify an update.
and the link is not correct https://github.com/rstrouse/ESPSomfy-RTS/releases/tag/
Recently having an issue where every time home assistant has been restarted, the integration doesn't reconnect back to the blinds, causing them to be labelled unavailable. I am able to access the web gui on my esp32 and operate the blinds through that so I think its something to do with the integration. A temporary fix for this is to manually reload the integration then it connects back instantly. Currently running on v2.2.2 with HACS.
Open and Close seems to be inverted in Home Assistant, but it works correctly from the ESPSomfy-RTS website.
Awnings are open on ESPSomfy-RTS:
And Home Assistant displays it correctly:
However, if I try to press Close on the Awnings Group, it does nothing.
But if I use the slider, it works correctly:
But then, the same happens again if I try to open them:
It's like the bug only affects the Open/Close buttons and not the slider...
At Home-assistant startup I'm seeing this error
Logger: homeassistant.components.cover
Source: helpers/entity_platform.py:607
Integration: Cover (documentation, issues)
First occurred: 13:09:12 (1 occurrences)
Last logged: 13:09:12
Platform espsomfy_rts does not generate unique IDs. ID espsomfy_105180_4 already exists - ignoring cover.zonnetent
Hello,
I have an issue with the integration booting, when i want to add the esp, i get a blank popup after validating the IP and nothing happen. When checking in the logs i see that the component didn't boot properly but i can find why.
Based on my past issue with other custom_component, i've checked that HA have all access on the files and folders, rebooted 2 times the HA server but i can't make it work. Any kind of help would be appreciated :)
Hypothesis would be an HA version issue, just want confirmation if it's the case or not.
Thanks for your time
HA version : 2023.7.3 (Synocommunity)
Log :
Logger: homeassistant
Source: custom_components/espsomfy_rts/config_flow.py:161
Integration: espsomfy_rts (documentation)
First occurred: 7 mai 2024 à 22:36:48 (1 occurrences)
Last logged: 7 mai 2024 à 22:36:48
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/volume2/@appstore/homeassistant/env/lib/python3.11/site-packages/homeassistant/helpers/discovery_flow.py", line 95, in async_start
await gather_with_concurrency(
File "/volume2/@appstore/homeassistant/env/lib/python3.11/site-packages/homeassistant/util/async.py", line 185, in gather_with_concurrency
return await gather(
^^^^^^^^^^^^^
File "/volume2/@appstore/homeassistant/env/lib/python3.11/site-packages/homeassistant/util/async_.py", line 183, in sem_task
return await task
^^^^^^^^^^
File "/volume2/@appstore/homeassistant/env/lib/python3.11/site-packages/homeassistant/config_entries.py", line 856, in async_init
flow, result = await task
^^^^^^^^^^
File "/volume2/@appstore/homeassistant/env/lib/python3.11/site-packages/homeassistant/config_entries.py", line 884, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume2/@appstore/homeassistant/env/lib/python3.11/site-packages/homeassistant/data_entry_flow.py", line 393, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume2/@appdata/homeassistant/config/custom_components/espsomfy_rts/config_flow.py", line 143, in async_step_zeroconf
return await self.async_step_zeroconf_confirm()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/volume2/@appdata/homeassistant/config/custom_components/espsomfy_rts/config_flow.py", line 161, in async_step_zeroconf_confirm
"model": self.zero_conf.model,
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ZeroconfServiceInfo' object has no attribute 'model'
https://my.home-assistant.io/redirect/hacs_repository/?owner=rstrouse&repository=espsomfy-rts-ha
Repository rstrouse/espsomfy-rts-ha not found
Hi there,
First thank you so much for this incredible work!!!
I just setted up everything. Shades a correctly behaving from the webpage.
On my side, HA integration do not work at all, even without user/password and both HA and user language settings in English.
I also tried PIN setting, without success.
I have either "Invalid flow specified" or "Unknown error occurred" on the HA integration page.
The path to setup was challenging (and of course I messed up a shade before getting working😄) but we're getting close!
I hope you ladies and gentlemen will be able to help us, and I'm willing to contribute if I can!
I'm looking forward getting it done and wish you a great day!
I successfully installed hardware and software and am able to control my shades via the up address.
After installing the home assistant ESPSomfy via Hacs I am trying to configure it. When entering ip (auto found) and authentication I get the error:
Invalid flow specified
any directions in how to solve this issue?
I've posted the issue and screenshots in the HA forum for this amazing project.
https://community.home-assistant.io/t/esp-somfy-rts-integration/543401/535?u=goldenjeevan
Hi @rstrouse ,
Many thanks for you work, this whole project is awesome and works out of the box.
I'm just having one issue with my shades. The cover.stop_cover command rerturns shades to previous position, mostly if triggered after shades movement stop.
Steps to reproduce:
EspSomfy-RTS Firmware 2.4.0 on ESP Wroom
Shades with HZ remove (not sure what type of receiver is in the shade box), 80bit RTS
I spotted this problem during integration with Loxone Automatic shades module. It also has configuration of times up and down. My integration sends http commands to HA cover service. It always sends command up/down and when movement should stop, it sends stop command. So if the shade is faster than loxone time projection, stop command is sent after movement stopped. Which results in shade going full up and then down again. It is kind of frustrating, but sunny days are not here yet.
I can supply more logs or config backup if required.
Best Regards,
Petr Hovorka, @hovorkap
Is there any way to get the opened/closed/sun status of awning updated?
I would like to include it in some automations but if sun auto open is activated, I cannot get the actual status.
Thanks in advance
I have a Problem with the Homeassistant Integration.
Everything works fine until I use the normal Remote. Cause I get no feedback of the shade the position is unknown. Now I use Homeassistant to open the shade. After it's open I close it by remote. Now I can't open it again in Homeassistant because the arrow button to open it is disabled.
Is it possible to not disable the button?
Hi,
Just updated to HA 2024.3, and I was checking the logs. I saw this error a couple of times:
Logger: homeassistant.helpers.entity
Bron: helpers/entity.py:945
First occurred: 20:36:44 (2 gebeurtenissen)
Laatst gelogd: 20:36:44
Update for update.espsomfy_rts_851af8 fails
Update for update.espsomfy_rts_a62c1c fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 945, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1262, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 535, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 268, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 112, in async_call
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 294, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 384, in _async_refresh
raise err
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 273, in _async_update_data
raise NotImplementedError("Update method not implemented")
NotImplementedError: Update method not implemented
When the device change ip, zeroconf discover it correctly, but it ask to configure a new entry instead of updating the previous one (based on unique_id).
Hello.
I got the following error at startup:
Logger: homeassistant.components.cover
Source: custom_components/espsomfy_rts/controller.py:304
Integration: Cover (documentation, issues)
First occurred: 22:07:35 (1 occurrences)
Last logged: 22:07:35Error while setting up espsomfy_rts platform for cover
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/espsomfy_rts/cover.py", line 54, in async_setup_entry
for shade in controller.api.shades:
File "/config/custom_components/espsomfy_rts/controller.py", line 304, in shades
return self._config["shades"]
KeyError: 'shades'
I noticed that the devices and entities are automatically added to “Windows” area, even if you delete them in the setup process. (I didn’t have a Windows area before and in the setup process I deleted the area and the area was still created and the devices and entities were added. After that I had to change all of them individually and delete the area again.)
When device is not reachable then log is spammed by WebSocket:
2024-02-21 16:55:05.638 ERROR (SyncWorker_51) [websocket] [Errno 113] Host is unreachable - goodbye
2024-02-21 16:55:08.644 ERROR (SyncWorker_31) [websocket] [Errno 113] Host is unreachable - goodbye
2024-02-21 16:55:11.650 ERROR (SyncWorker_31) [websocket] [Errno 113] Host is unreachable - goodbye
2024-02-21 16:55:14.656 ERROR (SyncWorker_17) [websocket] [Errno 113] Host is unreachable - goodbye
Even disabling the integration doesn't solve the issue.
You need to delete it from custom_components. (this is the way I was sure it's related to this code).
Will try to debug code in the next days, but if you already have an idea is more than welcome.
Hi, first of all I want to thank you for this wonderful project!
Once I had the hardware components in, I had it up and running in a couple of hours. Great work!!
One question though: I noticed I cannot set the area per entity, it seems this only works on a device level.
As my covers (shades) are on windows in different rooms, and I suppose this is like that with most people, I find this odd.
Is there a solution or workaround for this?
Or can this only work when the covers (shades) would be created as individual devices?
Br, Tim
After I restart home assistant, espsomfy fails to launch correctly with every blind entity showing unavailable. I have to manually reload the integration for my blinds to load correctly. From what I can see there is no error in the logs. I'm running v2.4.1 but I've had this issue since v2.2.2.
I regularly receive the following error in my HA logs. Probably it is related to comments in this issue, but now I receive this error without turning off my Wi-Fi anymore. Cards in HA are disabled when seeing the error and enabled afterwards.
Logger: websocket
Source: custom_components/espsomfy_rts/controller.py:119
Integration: ESPSomfy RTS
First occurred: 07:13:43 (7 occurrences)
Last logged: 20:59:17
ping/pong timed out - goodbye
[Errno 110] Operation timed out - goodbye
websocket connected
Connection to remote host was lost.- goodbye
v2.4.1
I want to use the "set_current_position" service to correct for an incorrect curtain position due to delay's caused by the command lenght and the curtain to respond. However the "set_current_position" service is not available.
1. give command
service: cover.set_current_position
data:
entity_id: cover.woonkamer_klein_raam
position: 18
2. receive error
N/A
Since the last update I get the following warning
Logger: homeassistant.helpers.service
Source: helpers/service.py:553
First occurred: 15:25:57 (1 occurrences)
Last logged: 15:25:57Unable to parse services.yaml for the espsomfy_rts integration
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.