Hi,
I just started to join this community and already have some question for which I didn’t find any solution on the internet. I have several old and new Samsung Android cell phones, which I would like to put on wall in rooms and use them as switch.
Is it possible to use or configure device build in proximity sensor (sensor which turn off screen during call) to report state out of call? I can see that this sensor works while I have call, but I don’t see status change out of call.
Do you have some idea how to use proximity sensor as switch?
When you install the app on your device you can go into “App Configuration” and from there “Sensors”
The proximity sensor should be in the list, just enable it and it will show up in your HA entities
Depending on the device it wont switch to near until you actually almost touch the screen (ear detection)
Better would be to use:
And use the REST api to get the motion sensor state from the json data.
There are alot of guides around on how exactly everything works. Plus its free so you can check if everything works on your older phones
The proximity sensor is a poll based sensor so it may not work as you would expect. You can try enabling more sensors to get it to update more frequently
If that’s the case and you are willing to spend $4 on the Tasker app, the proximity sensor (not the entity in HA) could trigger the Android phone to send an http request that would give you instant update. There are probably other options to http request for an Action to achieve your goal.
I have activated all possible sensors but I never get update. Sensor state changing only durring a call. Maybe that is specific to Samsung devices or it’s hardcoded in Android it self.
Keep in mind that most proximity devices report either 5 or 0 and meaning you only have a small area to trigger the sensor. If you say it only happens when your on the phone then try waving your hand closer to the screen. Not all devices report the actual distance. It could be specific to samsung, hard to tell since they dont document it.
Hi, I have configured another device and I have it in HA dashboard. It is reporting state 5 or 0. Which is enough for me. Now problem is that refeshing that information takes long time. I guess that this 15 minutes rule is applied. On picture you can see that HA knew that It’s something close to phone sensor, there why it’s there 0 (close). Otherwise it’s 5 as far.
I have been searching on the interenet how to change that refresh rate for this sensor. Or how to use REST or JSON . But didn’t find anything useful.
yes it is a sensor that doesn’t make any sense unless it is refreshed every second, but somehow this seems to elude the folks in charge. it’s like the most useful functions of the phone are actively being pushed aside for some reason… I have been using Android IP Webcam for this functionality but they’ve broken that one now too