3rd Party Bluetooth Binding. Beta testers needed

Tags: #<Tag:0x00007f51f2e88668> #<Tag:0x00007f51f2e88528>

(Christian) #887

Raspberry with openhabian

(Paul Clarke) #888

I’m attempting to add a customer service and characteristic for a BLE irrigation valve controller.

The adapter and device are appearing with no issues, however I don’t seem to be able to use my customer service and characteristic files. I’ve created a directory, /home/openhabian/bluetooth, which contains a service and characteristic directories and dropped in my XML files. I also double checked them against a validator, but I’m not seeing anything showing up in the frontrail log viewer, not sure if I should.

I’ve also checked to make sure that the openhab user can access the files and that the adapter’s GATT services and characteristics extension folder is set correctly.

I’ve removed the thing and added it again, but I’m not seeing the custom channels appearing, just the base channels.

The device has it’s own custom service uuid, C521F000-0D70-4D4F-8E43-40D84C50AB38, which contains a characteristic, F006, which takes a 10 byte value as follows:

^ ^ ^
Valve Hrs Mins

As such, this value will open valve 1 for 0 hours and 1 minute.

0x00000000000000000000 can then be used to stop all valves.

I’m not quite sure how to handle this structure and how it could be managed in the dashboard, but as I’m not seeing the channel appear, I’m not sure my xml files are being used in the first place.

Is it possible that the log level isn’t high enough to see the possible issues with my service and characteristic files? If so, where do I change that? Is there a log level that would give me something that indicates that my xml files are being loaded and parsed successfully?

Also, any pointers on how to control that type of structure within a characteristic value field would be much appreciated.

(Christoph) #889

Hi @vkolotov
is it possible to increase the bluetooth devices update rate? I’ using your binding for temperature measurement. So an update rate from 5 to 10 minutes would be enough.
Thanks for your great work!

(Paul Clarke) #890

I’ve been able to solve my issue and it was reasonably simple, but easy to miss.

Everything I had described appears to have been correct, however I didn’t toggle the Connection Control switch in the device’s Control panel. Once I did that the new named characteristic appeared and I’m able to write data to it.

It was also useful to set the Bluetooth Binding’s GATT services and characteristics parsing strategy setting to Recognised + System + Unknown + unrecognised as binary, to see all of the characteristics.

(Vlad Kolotov) #891

Hi All, just want to let you know that I’m not able to work on this binding the moment due to some workload and home relocation. I’ll be providing some basic support, but won’t be able to code for some time (several months).

(Tiago Molinos) #892

“LE: installing some related dbus packages resolved the error”

What packages did you install?

(Bogdan P.) #893

opkg install dbus-utils
opkg install avahi-dbus-daemon

they weren’t updated when bluez was upgraded to 5.47 (opkg install /share/Download/lib-entware-archive/bluez* --force-downgrade)

After all the truggle it still does not work - no errors but no devices recognized.

bluetoothctl from bluez does not recognize also the controller/other devices. so I suppose it’s a kernel feature missing and I have not found a proper config from the kernel to recompile it.

in terms of Openhab on Qnap x86-64 the two bindings crash the java thread and openhab stops completely.

So I intend to get a NUC and make a fresh install on a SSD and to avoid SD/MMC/eMMC/etc alternatives

(Jesper Lauritsen) #894

After getting a Flower Care I have tried to reinstal the Bluetooth binding.
I got the Flower Care in the inbox as expected, and I made a thing for it.
I do however not get the 4 advertisement channels. I have enabled Discovery Control a described in the guide.
Any ideas about what I might be missing?

(Vlad Kolotov) #895

Make sure your sensor runs the most recent firmware, you can updated it in the app.

(Jesper Lauritsen) #896

they are updated to 3.1.9 and work fine in the app

(Vlad Kolotov) #897

Not sure what to say, what channels do you see in the PaperUI, can you post a screenshot?

(Jesper Lauritsen) #898

Sorry for the late reply. Here are screen shorts for my two flower care sensors:

(Vlad Kolotov) #899

Ok, I can see that the “Temperature” channels is there. Does it get updated?

Also pls add the “Frame counter” channel and see if it gets incremented (it is incremented every time the binding receives data from the device). The device normally sends data every 30s or so, check if it gets incremented after 30-60s.

Also, you should switch to disabled the “Connection Control” channel (you might have done it already).

Just bear in mind that all channels of that device are dynamic, it means that they get added/discovered once the device sends actual data for the corresponding channels.

(Jesper Lauritsen) #900

I tried that, but nothing gets received in neither the temperature nor the frame counter channel. Seems like it is not seeing any broadcasts at all :frowning:

(Vlad Kolotov) #901

Right, does it stay online this is very strange. You have some dynamic channels discovered but then they stop getting updated. Any errors in logs?

(Jesper Lauritsen) #902

Yes, it stays online, and no, no errors. Only log statements about other devises that goes online and offline.

(Vlad Kolotov) #903

Very strange, are you able to try different USB BT adapter?

What’s your set up? RPI? What Bluez version are you running? Could you please run this?

sudo -u openhab bluetoothctl --version

(Bogdan Manta) #904

Hello there!
I am new to OpenHab and I require some help if possible.
I am running openhabian on a Raspberry Pi 3 Model B+.
So…I have some BLE sensors from a Chinese manufacturer called Kaipule and I want to get obtain its manufacturer data and even decode it. Using this binding I can’t obtain other information rather than the usual ones.

My binding settings:

(Jesper Lauritsen) #905

Yeah, its a RPI, using the build-in BT.
–version shows 5.43

(Vlad Kolotov) #906

Hi @jesperdk, please upgrade to 5.47. Most likely this is the cause. Please report back if it resolves the issue. Thanks.

If you are using just miflora sensors, you could try to upgrade to the most recent version. Otherwise please follow these instructions to upgrade to 5.47: https://github.com/sputnikdev/bluetooth-manager-tinyb#prerequisites