-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add support for Paulmann smart lights #66
Comments
Hi @Andre_Lerche, it looks that it is quite easy to add support for your device. Are you sure that your python script works for all of your devices. I believe there is a bug in it. It seems to me the only last device in the list gets updated in that script because the logic to control BT device is out of your Anyway, we could add GATT specs for you easily. However, there is some work going at the moment that is related to connection management (disconnect after work is done, so connection is released and the released connection can be used for next device). Having said that, you might not be able to control all of your bulbs at the moment, this really depends on how many connections (or home many adapters you have) your adapter can keep open simultaneously. |
Hi @vkolotov Great, sounds good. Well, the script works fine for me. I just call it with one of the lamps each. And the while loop is just a dirty workaround, because pygatt sometimes cannot connect to the lamp specified - for whatever reason. A second later it's working fine. Because of that I try the connection 5 times until I give up. Let me find out the UUID for the color temperature. Usually I never need that, but in your implementation this should be supported. This is all the lamps can do: on/off, dimm, temperature. There are other Paulmann lamps available supporting RGBW, but I don't own any of such. Thanks again :-) |
@papermoon1978, please see my comment ^^ |
Thank you for this. :-) The properties are available now, but the values are not shown. Also, it doesn't work to write values. This is what I get in the log
|
Just double checking, have you set up pin code as I mentioned earlier? |
What version of Bluez do you use? Can you please run this?
|
I guess you where right, I checked the wrong device. Sorry :-( I gave it another shot today morning, but all the devices are shown offline while they are online. I can find them using hcitool and can access and control them via gatt. This is what I can see in the log:
"Zeitüberschreitung wurde erreicht" means "timeout exceeded". The strange thing is that I see all the devices twice. But it looks like this from the beginning, so maybe ok.
|
Just double checking, did you see your lamps in the OH inbox? Could you please post some screenshots of your devices in the inbox and when you have added them? |
Right, the reason why it is offline is that it gets some errors when it tries to establish a connection and read values. Can you try to disable connection control and see if it becomes online again? Ok, we need to deal with that read error. Could you please post entire log file beginning from adding a device from inbox and ending when you enable connection control and when it becomes offline. |
This is the first try when I could not reproduce the status offline, but status "online connection error".
The rest of the log is full with a repetition of the last 3 lines. Then I did a restart of OH and removed and added the same device again. Now it is shown with status offline even with connection control enabled
|
Hm... Can you post your DBus config file for Bluez? Just checking again, did you go though these steps? https://github.com/sputnikdev/bluetooth-manager-tinyb#prerequisites |
sure. It is pretty much default. I only changed at_console to false to solve security issues.
|
And obviously your openhab user is in |
Ok, we need to debug this via |
This would eliminate multiple layers (no TinyB and the binding) in your debug strategy. |
btw, please run it as your openhab user:
|
hmm, not so easy. sorry :-(
Sometimes it is possible to establish a connection, but it automatically disconnects a very little moment later. |
right, so it requires PIN code to be sent once connected I guess. |
Well. I am not happy with it, but I guess it is best to skip this for now because the problem is definitely not with openhab or your great extension. I spent a couple of hours in trying to convince bluetoothctl to talk with my lamps. Sometimes it works to connect, but I was not able to send the password. Most of the time even the connection doesn't work. Now I have the same thing for gatt, so currently my script also doesn't work anymore. Same result on my Ubuntu laptop running with bluetooth USB stick. At the same time I can connect and send passwords without problems using a bluetooth tracer on my Ipad, and also the remote control delivered with the lamps is working fine. So the best idea I have is to start an Arduino project and let a robot press the buttons on the remote ;-) The thing is that I don't need home automation at all, I just want to control them via Alexa. And I thought that openhab, fhem and such are the easiest way. Thanks again for all your efforts! :-) |
It is pity. I have never seen that error (Operation Not Permitted) and even google know very little about it. Honestly speaking, once it is resolved, adding your lamps would be an easy part. |
How far is your rpi or laptop from the lamps? It might be that connection is too week and unstable because of distance between adapters and lamps. |
I moved the Rpi to the Bluetooth controller as close as I can. Now the distance is about 2m. Currently, it is again working to connect. But I don't know if it is by chance or really the distance because it also worked yesterday morning. ;-) Anyway. I have absolutely no idea how to enter the password. I tried almost all combinations I can think of (as you know the password is 0000) with 0 or in hex. See the following screenshot And either I get an invalid value or a Bluez exception. Do you have an idea? And if I don't set the password I am even not allowed to read values from the other characteristics. In such case I am forced to disconnect. Also I'm curious how the remote control works. I never provided my password (it looks like this, but it is not the default one that came with the lamps) to the remote control, but it is working fine. The remote control did not come together with the lamps, I bought it separately. So either they have a way to control the lamps without the password, or there is a master password for all the lamps. |
Dear Andre, dear Vlad, could this issue be resolved in the end or not? Are you satisfied with whatever solution you have at the moment, Andre? I have a couple of Paulmann BLE lights and I am thinking about setting up an OpenHAB server to control them. Would you advise for or against this plan? Thank you, |
Hi!
To be honest, I gave up. I still own the same Bluetooth lights, but control them just with the Paulmann remote control - no further automation yet.
Andre
Gesendet: Freitag, 05. Juni 2020 um 18:58 Uhr
Von: "rauferd" <[email protected]>
An: "sputnikdev/eclipse-smarthome-bluetooth-binding" <[email protected]>
Cc: "Andre Lerche" <[email protected]>, "Mention" <[email protected]>
Betreff: Re: [sputnikdev/eclipse-smarthome-bluetooth-binding] Add support for Paulmann smart lights (#66)
Dear Andre, dear Vlad,
could this issue be resolved in the end or not? Are you satisfied with whatever solution you have at the moment, Andre?
I have a couple of Paulmann BLE lights and I am thinking about setting up an OpenHAB server to control them. Would you advise for or against this plan?
Thank you,
Ferdinand
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@Andre_Lerche wrote:
I’m currently trying to add my Paulmann bluetooth lamps into openhab. Actually it is working fine, your bluetooth module is working perfectly. But unfortunately the lamps or better the protocol is a bit special. I’m not an expert in bluetooth things, but well, to make a long story short. First of all before being able to control the lamps I have to provide a password. After that I can control them, currently I do it via pygatt in a simple python script. It looks like this:
Any chance to have such device directly supported by your bluetooth module?
The text was updated successfully, but these errors were encountered: