Hi @Celaeno1, sorry to hear that it is not working for you. As @sozkara pointed out earlier it might be a new security feature. What phone do you have @Celaeno1? I may also suggest you to try to use a real bluetooth beacon / keyfob / keytag for $5 on aliexpress to track your presence.
Unfortunately I copy - pasted the log entries but i couldn’t find it I will send it to you once i reconfigure openhab.
I think all devices announce their “Device” UUID’s even if they’re not connectable and has no service. I found about this when i installed an app called “BLE Scan Raw” on my iPhone. If you have time take a look at that app. It reports every BLE device’s last 4 digits of Device UUID’s and RSSi. Which is enough for presence. OFC, if this can be implemented on bluez and java is another question
Yes, it is possible to access advertising data. However, I’m pretty sure that not all (actually only a few) devices advertise something. But… If you can make your iphone advertise something specific via an app… yep it might be a good idea.
Well, i can see my iPhone device uuid and rssi without any app running on phone and phone sleeping (not paired). 9EC7 being my phone’s device UUID last 4 digits. I’m attaching a screenshot. I’ll report back if this is true with android also when i get my hands on an android phone. This is of course with BLE.
Hi, I installed bluetooh binding on my raspberry hopenhab2.
I can see the devices comet-blue-eurotronic
But I can’t find the way to get the data you say:
Comprehensive support for Bluetooth Low Energy (Bluetooth Smart) devices. If a bluetooth device supports the Bluetooth specification 4.0, then the standard GATT services and characteristics can be automatically recognized and corresponding thing channels be created for each GATT characteristic and its GATT fields. This feature allows you to connect Bluetooth Smart sensors and other bluetooth devices.
Custom built (non-standard) BLE Bluetooth devices support. A custom built bluetooth device can be automatically recognized like a standard one by specifying a folder on the system disk with custom GATT service and characteristic definitions in XML files.
Can I see some exemple of XML files?
Can you help me to write the the XML files?
I can expose to internet my raspberry if you will test the devices. (IPV6 only)
Hi everyone, I’ve updated the main post with the roadmap so you know where this project is heading to.
Hi @matteopedani, thank you for your interest in this project. I’ve updated your issue on github with some basic instructions: https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/issues/14
Adding support for your device is on the roadmap of this project. I’ll jump on it as soon as I complete the items in the priority list (readmap) that go before your ticket.
Hi @sozkara, I believe your idea to map iphone devices (or any other devices that dynamically allocate MAC addresses) via some advertizements packets is quite viable. I’ve added this feature to the roadmap: https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/issues/17
Great! I’m looking forward to test it
How i can stop adding new things to Inbox? now it’s smth like 400+ and value growing(
cause after 7-8 hours CPU is over 95% and i should turn of Discovery controll, manually remove all strange bt devices in inbox and then CPU goes to it’s normal state
Hi @None_No, sorry to hear that it causes some issue for you. It is a know bug that I’m working on. Unfortunately this bug is caused by TinyB library, I’m going to create a pull request for an improvement in TinyB that should potentially help to resolve our issue. I’ll keep you posted.
I installed the binding from the marketplace on my OH machine (Debian) and it successfuly discovered the adapter and my BLE “weather station” Oregon RAR213HG.
However weather station thing is always OFFLINE and it does have only generic channels, no channels for temperature neither humidity. Also when I tried to change some settings in adapter thing I received 500 with such logs:
2018-01-23 20:03:20.954 [WARN ] [.core.thing.binding.BaseThingHandler] - Error while applying configuration changes: 'IllegalArgumentException: Provider for thing bluetooth:ble:ED8914A1503A cannot be determined because it is not known to the registry' - reverting configuration changes on thing 'bluetooth:ble:ED8914A1503A'. 2018-01-23 20:03:20.972 [ERROR] [ome.io.rest.core.thing.ThingResource] - Exception during HTTP PUT request for update config at 'things/bluetooth:ble:ED8914A1503A/config' for thing 'bluetooth:ble:ED8914A1503A': Provider for thing bluetooth:ble:ED8914A1503A cannot be determined because it is not known to the registry
First I would like to have this weather station online (if it does matter) and add to it some channels (temperature, humidity). I assume the binding needs to know GATT specification of the device. I am happy to help creating required files, just tell me what to do.
Hi @druciak, I’m happy to help you. Could you please share OH logs so I can understand what’s happening there. Also could you please let me know:
- version of OpenHab
- OS type
- what BT transport are you using (what bluetooth adapter type? BlueGiga or generic USB?)
- if you are running Linux and a generic USB adapter, let me know Bluez version as well
Regarding my previous post, I was changing the station thing and got the error, but when I tried one more time I succeeded. Moreover when I changed adapter for this thing to preferred one, it shows as ONLINE.
Unfortunately when I linked some generic channels (Model, HW revision, Manufacturer, Battery level, RSSI) I only got valid data for RSSI.
Here are the details about my setup:
- I am running Sept. snapshot of 2.2, but I am going to update to some 2.3 snapshot soon
- on Debian Stretch
- with generic bluetooth transport
- using Bluez 5.43-2+deb9u1
BTW: currently I am using a Python script to get data from Bluez and push it using MQTT to OH.
I cannot find the source, but interesting info you can find also here.
Hi @druciak, I’ve create a ticket on github for your device: https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/issues/27
From what I can see, we could try to add support for your device through custom GATT spec files.
Also it seems that when I add Weather Station thing, my python script stops working. When I remove it is working again. Does the binding prevent other clients from reading the device’s data? Is bluez connection exclusive, so no other client can connect?
Anyway I will be watching this.
One more thing I’ve spotted are weird entries in the syslog:
Jan 23 21:30:55 ipserv3 java: g_dbus_interface_get_info: assertion 'G_IS_DBUS_INTERFACE (interface_)' failed Jan 23 21:30:56 ipserv3 java: Error setting property 'Powered' on interface org.bluez.Adapter1: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.100 was not provided by any .service files (g-dbus-error-quark, 2)
Do you know what it means?
hi @druciak, looks like it is definitely possible to add support for your device.
Could you please try to add GATT files form this commit? https://github.com/sputnikdev/bluetooth-gatt-parser/commit/175b10eb1e497f896ef2663bbb4ba0872f0cc2ad See a new message below.
Create a folder on your file system that is accessible by “openhab” user, something like that:
That folder should contain two subfolders:
These two folders should contain your xml files from the commit above, e.g. “characteristic” folder contains XML file for characteristics and “service” contains XML files for your services.
Make sure that file permissions are set correctly so that “openhab” user can read them.
Specify gatt extension folder here:
Let me know how it goes.
Update #1: You will have to remove the thing and add back again.
Update #2: The following channels will be available (if it is working properly):
- Base temp
- Base max temp
- Base min temp
- Sensor 1 temp
- Sensor 1 max temp
- Sensor 1 min temp
That’s what I could decode from the python script on the article you mentioned earlier. However, from what I can see, there are some other channels that could be potentially added. Unfortunately I do not nave that device, so it is not possible for me to work further. However, if you have some experience in software engineering, you could try to add more by looking what characteristics the device has and what they represent. Most likely humidity readings and extra outdoor sensors could be added.
Yep, It is binding. Bluetooth devices can support only single simultaneous connection. That’s why your python script stops working.
I’m not recommending using multiple bluetooth clients (tools, scripts) just for now. This might interrupt the binding stuff. It is definitely not tested.