G-Tag > Bluetooth BLE-tag > Webhook ?

Post your questions and help other users.

Moderator: Martin

Friedhofsblond
Posts: 14
Joined: 26 Feb 2017 14:56

G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Friedhofsblond » 21 Aug 2017 07:33

Hallo auch,
sorry, das kann ich in englisch nicht erklären...
Ich möchte eine einfache Anwesenheitskontrolle für meinen Homee "basteln".
So ungefähr:
Ich habe einen Gigaset-BT G-Tag Anhänger am Schlüsselbund.
Dieser sendet wohl kein echtes iBeacon-Protokoll sondern einen BLE-tag.
Dann habe ich am Wohnungseingang ein Tablet mit automagic zu hängen.
Wenn das Tablet per BT den Schlüsselanhänger findet, soll er via automagic einen webhook an meinen Homee senden.
Mit den webhooks kann ich dann Regeln (Homeegramme) erstellen.

Ich müßte also erstmal die Adressen der G-Tags ermitteln und die irgendwie von automagic abfangen lassen.
Das wird wohl noch über eine zusätzliche App nötig sein, oder kann automagic einen BT-Sender finden?

Geht das überhaupt so?
Danke für die Anwort.

PS.:
habe schon was gefunden:
http://automagic4android.com/de/hilfe/k ... _available
Muss nur noch rausfinden wie ich den Webhook an den homee sende. - Irgend eine action denke ich.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Desmanto » 21 Aug 2017 15:06

Can the G-Tag connect normally to the tablet? If yes, then the bluetooth address can be accessed directly from automagic, as long as it has been paired once using the regular bluetooth setting or from the default app provided by Gigaset. If it implements BLE, then probably the condition that you show can be used. However, I haven't tried it yet. Just reopen my bluetooth tag again, but the batttery has been dead. I have to replace it tomorrow to try it out. Seems a nice pairing with automagic.

If the G-Tag can actively connect to the tablet (it must be the G-Tag initiate the connection), then at the tablet with automagic installed, you can use trigger Bluetooth Device Connected, specific device and choose the G-Tag (check the address is correct). If it is BLE, then you need to use Trigger Period Timer, combined with the Bluetooth LE Device Available. Then the next action will be HTTP Request (you can call it webhook), put in the URL/IP address of your Homee and the necessary parameter. The tablet should be connected to the wifi that can reach your homee address. It will then issue command via HTTP to your homee and can be processed as needed.

You can add another trigger, Bluetooth device disconnected (or BLE not available) and do another HTTP request. Probably the scenario that you want is something like turn on the lamp when you G-Tag connnected to the tablet. And when disconnected, it will have a delay for 5 minutes and then turn off the lamp.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Friedhofsblond
Posts: 14
Joined: 26 Feb 2017 14:56

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Friedhofsblond » 21 Aug 2017 17:32

"HTTP Request" = That was the solution.
The "webhook" on my homee but works.
My shipment with g-tags comes only tomorrow.
https://www.amazon.de/Gigaset-Bluetooth ... aset+g-tag

Thanks for the time being!

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Desmanto » 22 Aug 2017 14:47

Oh, the webhook is at your homee, I thought you refer to the tablet.

I have tested with iTag, it is using BLE as well. I can find it using Condition : Bluetooth LE Device Available. It automatic get its name and bluetooth address.
Tested a simple flow, trigger : Periodic Timer : every 5 seconds, will check if the iTag is available (near to the phone), then it will ring notification sound. (you can replace this with HTTP request with the required parameter)

Unfortunately my iTag is a cheap one, cost no more than $2. When I buy it, I just tested out for a while, it is working then I just put it back to the box, until i really needed.
Today I tested it out, turns out the beacon sent by the iTag is not realiable. I put the iTag just 10 cm from my phone, for the next 15 seconds it detects properly.
After that next 10 seconds - connection lost. Another 10 seconds connect again. 50% of the time it just simply won't stay detected properly even I don't move it at all. :cry:

It happens in its own app as well, also happens at other app (I tried several). Try iTag Alarm app, the connection also lost intermittently. So it is the iTag problem, not automagic's problem.
But what do I expect? It is just a cheap $2 iTag. :D
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Friedhofsblond
Posts: 14
Joined: 26 Feb 2017 14:56

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Friedhofsblond » 24 Aug 2017 13:28

OK thanks for the reply.
There are many possibilities and APPs which also give a webhook.
e.g. https://play.google.com/store/apps/deta ... .app&hl=de
Something will already work ....


Here is my post:
https://community.hom.ee/t/einfache-anw ... cht/6416/9

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Desmanto » 24 Aug 2017 14:03

From what I have read, you have successfully make the webhook works. So leaving only the G-tag.
Those apps can work too. However if you use automagic, you can have all function just in one app. It will take some time to configure it, but you only need to do it once.

If only my bluetooth iTag can work reliably.... :cry:

So far I only back to the basic logic.
Since I always bring my phone everywhere, why not just use my phone as the "tag"? So no need any additional tag.

When my phone is connected to my wifi AP, i can configured it to send periodic Http request to turn on the lamp.
When no Http request within certain amount of time, the server will then turn off the lamp.
If the phone is going to be shut down for some time (example for routine TWRP backup), then it can send additional http request to keep the timeout longer.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Friedhofsblond
Posts: 14
Joined: 26 Feb 2017 14:56

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Friedhofsblond » 01 Sep 2017 06:30

Hello,
I have found again time for my project.
The first test with gigaset g-tag was successful.
The reception area I still have to test.
Today I got the absence message about 100m after my house.
The presence detection I realize for the time being via the app "Beacon Locator".
The locator passes the http-request to the homee.
Unfortunately, the smallest scan interval is only 30 seconds.
I'm also looking for a solution to send the battery quality of the G-tags to the homee.


It would be nice if you could realize this about Automagic.

hallo,
ich habe wieder zeit für mein projekt gefunden.
Der erste test mit gigaset g-tag war erfolgreich.
Den Empfangsbereich muss ich noch testen.
Heute habe ich die Abwesenheitsnachricht ca 100m nach meinem Haus bekommen.
Die Anwesenheitserkennung realisiere ich vorerst über die App "Beacon Locator".
Der Locator übergibt den http-request an den Homee.
Leider ist das kleinste Scannintervall nur 30sekunden.
Ich suche auch noch eine Lösung den Batteriequalität der G-Tags an den Homee zu senden.


Es wäre schön wenn man das über Automagic realisieren könnte.

https://play.google.com/store/apps/deta ... ator&hl=de
https://community.hom.ee/t/einfache-anw ... dhofsblond

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Desmanto » 01 Sep 2017 10:05

Kinda confused with the translation. But I think you mean how to scan for this g-tag in automagic.

Create new flow
Trigger : Period Timer : 5s
Condition : Bluetooth LE Device Available : scan for the G-Tag and choose it to autamatically fill in the address
Action (True) : HTTP Request : Put in the URL of your home and any additional URI.
If the homee use form request, choose Method : POST, content type : Form and put in the form field list those you need.

I think you don't need to use other app for this case, automagic can do it all for you.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.


User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: G-Tag > Bluetooth BLE-tag > Webhook ?

Post by Desmanto » 03 Sep 2017 15:38

Glad you made it work. :)

I am thinking about purchasing a new better quality BLE tag also. Kinda interesting to implement it as part of automation.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply