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
Gigaset G-Tag - Failed to find characteristic #1177
Comments
Hi @kroman666, just out of curiosity, have you tried with 16 instead of the complete 128 bit service and characteristic. and/or including the expected value_type?
At least for some of my devices I have to use the shorter 16 bit service/characteristic. |
Hi @DigiH, I have tried so many things without success. |
Hi @kroman666, It could be interesting to integrate this natively into OMG. Could you share some broacasted advertisement payload examples from this device. You can find those into the BTtoMQTT topic from your broker. |
@1technophile, also as this is the default service/characteristic combination for the battery level it could be the start of possibly introducing READ presets, something like
to allow for easy reading of such common service/characteristic combinations. |
Hi @1technophile, that sounds great!
And for the battery level it looks like this:
|
Thanks @kroman666 , is it sending always the same @DigiH makes sense, we could even auto detect the devices that have this pair of information and publish the battery level every X scans |
"80010215123480c390ffbbc5" 8001 - Gigaset Company identifier
@1technophile even better :) and looking at all the other normative service/characteristics like Pulse Oximeter, Blood Pressure, Health Thermometer etc. it might be a good alternative to implementing connection decoders for specific devices in such categories by auto detection or presets for such device classes if they adhere to the standards and not implement their own. |
Good guess I think :) I have 3 of those G-Tags and this grep always matches for all 3 of them:
That would be perfect. If the interval for checking the battery level would be configurable it would be even better. Btw in practice e.g. 1 day is a good value for me. I'm using this setup for presence detection to e.g. switch on the light when/even before the door opens. So it needs to be fast. Sometimes I experienced this issue when reading the battery level (the code tag doesn't like newlines it seems):
I played a lot with parameters and I think it just happened with TimeBtwRead=0. Just wanted to say that with these setup it works quite well now:
while seeing this:
If you have some recommendation for the parameters, I'd appreciate if you'd tell me. Actually what I wanted to say is that if you implement to read the battery level in a controlled way, this should not happen anymore, right? |
so only really the difference in the last parts of their MAC addresses. From going through its manual I found that other than being a presence beacon it doesn't have any other functionality like temperature etc.
I do the same for my Playbulb candles, but they don't leave the house ;) With a beacon like yours I'd get the battery level at least every 12 hours, so that most likely one of them at least would fall into a time when the beacon is at home. Or implement the battery level check only once at the first successful scan every new day?!?
I would leave the '-DScan_duration=1000' at its default 10000, as within these 10 seconds it's very likely that it catches the beacon braodcast - The same with -DBLEScanInterval=5000, which defaults to 52 and -DBLEScanWindow=1000 with its default 30. Actually, all I would adjust, and do for my beacons, which I use in a very similar way as you do, is '-DAttemptBLEConnect=false' // even that could be left at true if you also have other ble sensors which need connections |
from what I see from my 3 G-Tags, yes.
I was thinking to fetch the battery level via MQTT when the beacon is at home and shortly after it reported to the server.
That would be the better solution I think. Once a day is enough, the time doesn't matter. But still curious if problems I mentioned before could be avoided by doing so.
Nothing else to do for my OMG currently, so I thought "false" is the better option. With TimeBtwRead=5000, others at default, most of the time it takes ~15sec between detections. Putting TimeBtwRead=0 it reduces to ~10sec. Then with Scan_duration=5000 I'm achieving ~5sec which I will keep I think. DBLEScanInterval and DBLEScanWindow I will keep default as you said. Thank you! |
With OpenMQTTGateway-0.9.10 I cannot make reading out the battery level from a Gigaset G-Tag (not the Keeper).
T: Hey I got a callback home/OMG1/commands/MQTTtoBT/config
N: [ MQTT->OMG ]: {"ble_read_address":"7C:2F:80:AA:BB:CC","ble_read_service":"0000180f-0000-1000-8000-00805f9b34fb","ble_read_char":"00002a19-0000-1000-8000-00805f9b34fb","immediate":true}
T: MQTTtoBT json set
T: update WorB
T: update WorB
T: BLE ACTION TTL = 1
T: BLE ACTION Read
T: getDeviceByMac 7C:2F:80:AA:BB:CC
T: update 7C:2F:80:AA:BB:CC
T: getDeviceByMac 7C:2F:80:AA:BB:CC
N: BLE Connect begin
T: Model to connect found: 7C:2F:80:AA:BB:CC
T: processing BLE read
T: Found service: 0000180f-0000-1000-8000-00805f9b34fb
T: Client isConnected, freeHeap: 143940
N: Failed to find characteristic UUID: 00002a19-0000-1000-8000-00805f9b34fb
N: BLE Connect end
N: BLE Connect begin
N: BLE Connect end
N: Send on /BTtoMQTT/7C2F80AABBCC msg {"id":"7C:2F:80:AA:BB:CC","service":"0000180f-0000-1000-8000-00805f9b34fb","characteristic":"00002a19-0000-1000-8000-00805f9b34fb","success":false}
T: jsonPubl - ON
T: [ OMG->MQTT ] topic: home/OMG1/BTtoMQTT/7C2F80AABBCC msg: {"id":"7C:2F:80:AA:BB:CC","service":"0000180f-0000-1000-8000-00805f9b34fb","characteristic":"00002a19-0000-1000-8000-00805f9b34fb","success":false}
The service is found, but the characteristics is not. But actually the UUID of the characteristics should be correct.
$ sudo gatttool -b 7C:2F:80:AA:BB:CC --primary
attr handle = 0x0001, end grp handle = 0x0009 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x000c, end grp handle = 0x000f uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x0010, end grp handle = 0x0018 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle = 0x0019, end grp handle = 0x001c uuid: 0000180f-0000-1000-8000-00805f9b34fb
$ sudo gatttool -b 7C:2F:80:AA:BB:CC --characteristics
handle = 0x0002, char properties = 0x02, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x0a, char value handle = 0x0007, uuid = 00002a02-0000-1000-8000-00805f9b34fb
handle = 0x0008, char properties = 0x02, char value handle = 0x0009, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x000d, char properties = 0x22, char value handle = 0x000e, uuid = 00002a05-0000-1000-8000-00805f9b34fb
handle = 0x0011, char properties = 0x02, char value handle = 0x0012, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0013, char properties = 0x02, char value handle = 0x0014, uuid = 00002a24-0000-1000-8000-00805f9b34fb
handle = 0x0015, char properties = 0x02, char value handle = 0x0016, uuid = 00002a26-0000-1000-8000-00805f9b34fb
handle = 0x0017, char properties = 0x02, char value handle = 0x0018, uuid = 00002a28-0000-1000-8000-00805f9b34fb
handle = 0x001a, char properties = 0x12, char value handle = 0x001b, uuid = 00002a19-0000-1000-8000-00805f9b34fb
$ sudo gatttool -b 7C:2F:80:AA:BB:CC --char-read --uuid=00002a19-0000-1000-8000-00805f9b34fb
handle: 0x001b value: 42
Does the Gigaset G-Tag need special treatment on OMG or anyone knows what's the problem?
Thanks in advance!
The text was updated successfully, but these errors were encountered: