Transform android phones in a new sensor

Hi, thank you for the app that work fine on my phone.

I would love to see the possibility to share more information from the phone to openHab.

In particular

  • Share your phone call: If I receive a phone call, I send the information to openhab2. I could use that to “ring a bell”, “light some lamps”, etc…
  • Send a notification when the phone is in an area (or on the network of my house). Example of use: switch off some lamps if my phone and the phone of my wife is not in the area of the house. [I know there is a plugin for that…]
  • Share internal sensors of the phone. In particular the pressure sensor available on a few phones.
  • Share GPS location with openhab2. Example: If we detect that the two phones are in the “garden” and the door is open => send an alert. (I know this one may be quite limited)

I was thinking of creating an app :slight_smile: but it would make more sense to have that in the official android app :slight_smile:


I don’t have any in-depth guides to hand but many of those examples can be realised using existing apps like Tasker in combination with the OH REST API.

Set a profile for when the phone is ringing. The caller’s number will be placed into a variable. Use the task above as a template to send a command to an Item to trigger a rule to do what you want it to do in OH.

Look up presence detection, OwnTracks, IFTTT, or if you want to stick with Tasker, look at AutoLocation.

Tasker is able to read and report the Pressure reading on those phones that have them. Temperature and Humidity as well.

GPS really is not that fast nor accurate for something like that. If your wifi extends out to the garden, you should look into FIND which can do very precise location of devices based on wifi signal strength seen by your phone. If you want to try the GPS route, see comment above about presence detection.

ibeacon in the shed ( or in a tree or…) to detect phone(s) in garden and automagic4android ( use tasker if life isn’t complex enough) to tell openHAB about it… would be my approach.
Somehow beacons keep being forgotten. Don’t know why, they fill out that gps gap where centimeters ( metric system :metal:t2:) is the key…

I did some tests with iBeacon.

I got mitigated results concerning placement. In my “real scenarios” I often get an error of 1 meter.

I agree with all your applications :slight_smile: you have an application for everything, but you have to find the right application. Nothing that work “out of the box” :slight_smile: (Sorry I’m a bit lazy sometime).

@rlkoshak mentioned Tasker which is (I think) the most powerful tool allowing you to automate everything around your Android smartphone.

There’s an issue in repo regarding Tasker integration. There’s even bounty for it :slight_smile:

@mueller-ma has done some significant progress on listening to Android broadcasts, see this PR.

No direct Tasker integration so far, but I’m looking forward to it! :slight_smile:
It would open endless possibilities and essentially turn your phone into an openHAB actuator.

There were some apps before that could connect OH with Tasker, but HABDroid is the way to go.
HABSweetie was an app created around 2014 and targeted OH1.x.
Project Rotini also has Tasker integration, but it’s a commercial product which does basically same thing HABPanel does. So yeah…

@jjhuff is working on geofence feature for the app:

The android broadcast PR needs some other larger PR to be merged, but after that I can finish the integration. Its very simple and only working for one broadcast, but I try to extend it in the future.

@gabriel.klein Feel free to add some ideas here:
PS: Your blog was a big help for me, when I was new to oh. Thanks for that.
PPS: Your site has a broken ssl cert.