ualex73 / slide Goto Github PK
View Code? Open in Web Editor NEWSlide Component for Home Assistant
License: Apache License 2.0
Slide Component for Home Assistant
License: Apache License 2.0
Any plans on adding motor strength to the component? On Reddit they posted the endpoint and settings for light/medium with the warning not go go beyond 1450 otherwise you'll brick you device
I have 4 slides. Below the relevant part of my yaml file
cover:
- platform: slide
host: 192.168.1.19
password: 123456781
api_version: 2
cover:
- platform: slide
host: 192.168.1.21
password: 123456782
api_version: 2
cover:
- platform: slide
host: 192.168.1.17
password: 123456783
api_version: 2
cover:
- platform: slide
host: 192.168.2.18
password: 123456784
api_version: 2
Looks like only the last slide (192.168.2.18) becomes visible and is working.
If I change the order, again the last mentioned slide is visible and working. The previously visible one becomes fully inactive.
Is there a way to fix this?
Despite the fix mentioned in #4 I still get errors when adding this integration to Home Assistant:
Error during setup of component slide
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 257, in _async_setup_component
result = await task
File "/config/custom_components/slide/__init__.py", line 146, in async_setup
username = config[DOMAIN][CONF_USERNAME]
KeyError: 'slide'
Unable to prepare setup for platform slide.cover: Unable to set up component.
I've made sure I installed the integration before adding the credentials to the configuration.yaml. I also made sure the Slide is set to use the Local API
Hello,
I added this intergration to my HA. But my Slide is not popping up in the devices. how is this possible?
Following the instructions for local API, I am getting the following error from HA:
Logger: homeassistant.setup
Source: setup.py:481
First occurred: 18:50:35 (1 occurrences)
Last logged: 18:50:35
Unable to prepare setup for platform 'slide.cover': Unable to set up component.
And the next error:
Logger: homeassistant.setup
Source: setup.py:404
First occurred: 18:50:35 (1 occurrences)
Last logged: 18:50:35
Error during setup of component slide
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/slide/__init__.py", line 146, in async_setup
username = config[DOMAIN][CONF_USERNAME]
~~~~~~^^^^^^^^
KeyError: 'slide'
The Slide is working fine using the native app from Google Play. Any way to further diagnose this? What seems to be the issue?
Hi there! I'm using this integration through the Home Assistant, but I guess the fastest way to notify would be to write here too :)
I just opened a discussion on the Home Assistant feature forum here
https://community.home-assistant.io/t/slide-curtains-add-slide-speed-control-into-integration/270819
Here is the quote:
Here is the new feature that is added which will be awesome to control from Home Assistant.
https://support.slide.store/article/336-slide-speed-settingScenarios would be, for morning alert open super slowly not to make any noise, and right after that set it back to 100% speed. Otherwise keeping it at 10% speed all the time would make it much unusable :) Or setting it to 10% before the sleep is annoying etc. :)
Will be awesome if this will be supported by this integration or the official one as it's exactly what was missing in my case to make it 100% perfect curtains :)
Thanks! Although I see that their Open API doc is missing info on how to achieve that, I guess it's possible to intercept somehow and see what exact parameters are being sent to the server or just ask them through the mail :) Unfortunately being a developer I completely have no clue about Python to contribute :) Hopefully, it will be a quick addition and soon it will be there in HA :)
First of all, thanks for creating this component!
After adding my Slides to HomeKit via this HomeAssistant component, they are reflecting the status incorrect in HomeKit.
When the curtains are closed, HomeKit will tell me they are open, and vise versa.
Asking Siri to "open" the curtains will close them and vise versa.
The status is correct displayed in the Slide.go app
Could it be that HomeAssistant and Slide are treating the position differently?
Like Slide thinks:
0=closed
1=open
While HA treats it like:
100=closed
0=open
The README says to configure the cloud API using:
slide:
username: XXX
password: XXX
and the local API using:
cover:
- platform: slide
host: XXX
password: XXX
However, whenever I configure the local API without configuring the cloud API, slide will fail to initialize:
2021-03-28 01:30:54 ERROR (MainThread) [homeassistant.setup] Error during setup of component slide
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 213, in _async_setup_component
result = await task
File "/config/custom_components/slide/__init__.py", line 146, in async_setup
username = config[DOMAIN][CONF_USERNAME]
KeyError: 'slide'
This makes sense, as __init__.py
always tries to read the username from its configuration. This fails, because I don't have a slide:
section in my configuration.
I added the following to init.py to get around the problem, but I wasn't sure this is just a hack or a proper fix:
if not DOMAIN in config:
_LOGGER.debug("Slide Cloud API not configured")
return True
I installed the custom component and the slide wont move if i set it from open to closed i hear the motor making a noise but that's about it.
cover:
- platform: slide
host:
password:
api_version: 2
i can see the current state and that is open but i can't change it to closed.
DEVICE_CLASS_CURTAIN was used from slide, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverDeviceClass.CURTAIN instead, please report it to the author of the 'slide' custom integration
When using the call "slide_overview" the postion are out of date when changes it takes a few min for that to update.
added this code to fix the issue and use the slide info api call to get the correct position
if "pos" in slide["device_info"]:
slidenew["pos"] = await hass.data[DOMAIN][API_CLOUD].slide_get_position(slide["id"])
_LOGGER.debug(slidenew["pos"])
slidenew["online"] = True
When trying to open or close the slide I get the following error:
Logger: goslideapi.goslideapi
Source: custom_components/slide/cover.py:309
Integration: Slide
First occurred: 21:41:42 (2 occurrences)
Last logged: 21:41:42
RES-L9: API=http://x.x.x.x/rpc/Slide.SetPos, type=POST, HTTPCode=500, Data={"code":-1,"message":"{"response": "bad request"}"}
Failed request with Local API. HTTPCode=500
My Config:
cover:
When I try to do this in postmen it works and when setting the position through the app Home Assistant also updates states.
Hello,
Some time (Especially when updating HA to a newer version) one or both of my slides show as unavailable.
The only solution at the moment is to restart HA again (Either reload only HA or reboot the entire system, both seem to help).
Even after this reboot sometimes this only fixes one of the Slides and I need to perform another reboot.
With any other integration I would simply invoke a reload for the respective integration to solve the issue.
However I do not know how to do this as I cannot find the ID of the integration via the GUI.
Any help would be appreciated (Either a fix for the unavailability or assistance in reload the integration)
HI
I have 2 slides. I am using the local api (as the cloud version is not working in Home Assistant anymore). One is configured as:
This one is working fine. As soon as I add another slide with the same config but another password and ip number ofcourse, this new slide is not working. WHen trying to open this using HomeAssistant, I get the following error:
RES-L26: API=http:///rpc/Slide.SetPos, type=POST, HTTPCode=500, Data={"code":-1,"message":"{"response": "bad request"}"}
It seems like I have two slides with different API versions. When I add the api_version: 2 to the second slide. Initialisation seems to be working but when I try to open and close, nothing happens.
Hopefully you can fix this issue as up until now everything was working perfectly!
If I would have a service to get he current position / state of slide I would be able to request it just in time before I would operate my slide. Based on the outcome of the get I would be able to take appropriate action.
What I have to do now is set the update interval very low. But this causes an insane amount of network requests just to get the right position.
My use case: I have a wall dimmer for my lights which I also use to control my curtains. Using the upper button will open my curtains and using the lower button will close them. I would like to be able to stop them whem they are either opening or closing, but to do this I need the current state.
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.