Page 1 of 1
position sensor
Posted: 27 Mar 2014 17:00
by bichlepa
Retrieve whether the phone is in vertical, horizontal ... or any user defined position. This could be useful to determine whether the phone is in a dock or something else.
Re: position sensor
Posted: 27 Mar 2014 20:13
by ZSasha
there is a trigger "Device Orientation" as well as condition.
Re: position sensor
Posted: 27 Mar 2014 21:24
by bichlepa
Indeed. I've overlooked this.
Then my request: custom orientation with a parameter how many degrees the position may differ. (To be hones I don't know actually why I need it.)
Re: position sensor
Posted: 27 Mar 2014 21:52
by ZSasha
bichlepa wrote:Indeed. I've overlooked this.
Then my request: custom orientation with a parameter how many degrees the position may differ. (To be hones I don't know actually why I need it.)
Have no idea to be honest. Probably would really depend on a device's sensors and will vary from phone to phone.
Re: position sensor
Posted: 27 Mar 2014 22:37
by bichlepa
ZSasha, I think you misunderstood me. I wanted to say following:
My request is now that Automagic can determine the exact orientation (in addition to the 6 already existing). Let's say not only those orientations: | or _ but also orientations like that: /
To realize that there should also be a parameter that says how many degrees the position might vary.
To be honest, I don't know whether it might be good for something.
Maybe it could be useful to determine whether the phone is on a certain dock.
Re: position sensor
Posted: 08 Jun 2020 14:36
by vertigo
I can give one example of why this would be useful, which is why I came to request essentially the same thing. I need the device orientation trigger and possibly the condition as well to allow specifying a range or threshold (e.g. within or outside 10 degrees of face down) instead of just "face down" or "face up" etc. This is because, at least with my phone, it's far too sensitive to use otherwise, causing it to constantly trigger. I'm trying to make a flow to turn on DND when I flip my phone over and turn it off when I flip it to any other orientation (not face down), but when I have it in my pocket while sitting it switches back and forth like crazy with my slight movements. Even when setting it down on its face, it often triggers two or three times. It's unusable.
Re: position sensor
Posted: 09 Jun 2020 19:05
by Micky Micky
Hello
You have a trigger called COMPASS that returns azimuth, pitch and roll.
This might me useful for your needs.
Good luck
Micky
Re: position sensor
Posted: 20 Jun 2020 21:12
by vertigo
Thanks, but unfortunately it doesn't look like that will work, either, though it helped point me in the right direction. For starters, I thought using the relative sector change with two sectors (0-180 & 180-360) would be best, but I couldn't get it to trigger set that way. So I set it to 30 degree changes, but that doesn't work very well, either. On one hand, there was a while where it wasn't triggering at all, no matter how I moved it. On the other, it often triggers frequently, over and over, while standing and walking with it in my pocket, most of which time I seriously doubt there's a change in orientation of more than 30 degrees, not to mention enough stability to trigger with that option enabled. And then there's the fact it uses almost twice the power as the accelerometer, though it's unclear if that actually makes a difference. I think it would work better if it could be set to trigger based on a range (e.g. 150-210, or 30 degrees off from face down).
I ended up sticking with the device orientation trigger with some modifications. Instead of using (not)face down, which was causing far too many trigger events (phone in pocket switching back and forth between face down and a few degrees off of face down, which registers as (not)face down), I use just face down for one trigger and every other orientation for the other, then use conditions to branch the flow first based on the trigger then, using your idea, using the compass to init vars then use those to check the exact device orientation. I then wait 5 seconds and check again, and if it's not almost exactly the same, it doesn't enable DND, to prevent it from enabling it unintentionally when in my pocket.
So far it seems to be working quite well, though I'm still testing. While I was able to make it work, I still think allowing ranges to be set in the orientation trigger would be helpful. If nothing else, it would greatly simplify things, and it may still allow for more functionality.