Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Candela pairs every time #24

Open
redviper2100 opened this issue Nov 2, 2018 · 3 comments
Open

The Candela pairs every time #24

redviper2100 opened this issue Nov 2, 2018 · 3 comments

Comments

@redviper2100
Copy link

redviper2100 commented Nov 2, 2018

Hey,

Nice work!
I have a little question. I want to use your code to integrate some Candelas with the Domoticz Home Automation System.
But from the moment I send the command it takes around 7 seconds for the Candela to receive it.
This is probably because the Candela doesn't stay connected all the time but it pairs every time I send a command.

Is there any way to make it faster? If I use this in a home automation system it's kinda strange to touch a switch and eat some popcorn while the light will turn on at some moment.

The code is very nice!

@redviper2100 redviper2100 changed the title The Candela pairs every etime The Candela pairs every time Nov 2, 2018
@rytilahti
Copy link
Owner

Hi,

there are two potential ways to make it faster:

  1. Instead of autodetecting the charasteristics to write to, add a type option to skip this. It will be a couple of calls less on the device with a slight speed up. Also, as you mentioned, the pairing procedure is done for every new connection even when it may not be necessary. This is something I have had in my todo list, but I don't have time to work on it in the foreseeable future, so if you want, PRs are very welcome!

  2. Keep the connection alive, this will make the changes (and updates from the lamp) instant. If you are interacting through the library interface, you can simply keep the bluetooth connection alive. This will likely consume a bit more battery, will block access from other devices (e.g. from the official app), and the amount of bluetooth devices your computer is also limited.

@matteos1
Copy link

matteos1 commented Feb 8, 2019

hi i think that in home assistant there is a problem with python because the pip install construct==2.9.41 and is not
pip install construct==2.9.25.
there is a possibilty to start this /config/custom_components with version 2.9.25.
thank you

@rytilahti
Copy link
Owner

@matteos1 that was likely fixed by #28, that is unrelated to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants