"Read light sensor" action (already been implemented)

Xaon420

New member
Shell scripts bearly work and after many attempts on a s20fe I still cannot read the light sensor.

We need a read light sensor option, shell can't work almost always on newer devices, and this action would allow us to have 1 action to read the sensors so we can use 1 set Brightness action and not use 6-12 triggers or constraints.

This action should have 1 or 2 options/fields:
~Output(outputs light sensor value)
~Raw(Outputs Sensor in raw data)
 

Attachments

  • Screenshot_20220213-095947_Termux.jpg
    Screenshot_20220213-095947_Termux.jpg
    363.4 KB · Views: 29
  • Screenshot_20220213-092712_MacroDroid.jpg
    Screenshot_20220213-092712_MacroDroid.jpg
    336.5 KB · Views: 27

Jotzi

New member
I agree.

You can read the sensors from terminal only on a rooted device.
But apps can of course read them without root.

Alternatively Tasker can do this. (without root)
 

420

Active member
Yes, but how can I read the value of the light sensor with it?
You can't, that is a seperate issue, but if he only/mainly wants to use it to set the screen brightness this would work. Don't get me wrong, i'm all for a magic text or write to variable action for the lux value, the more info MD has the better.
 

Xaon420

New member
You can't, that is a seperate issue, but if he only/mainly wants to use it to set the screen brightness this would work. Don't get me wrong, i'm all for a magic text or write to variable action for the lux value, the more info MD has the better.
my ideal plan would be to map the value returned from the light sensor to the screens Brightness, with some Offsets for control.

And using samsungs "autobrightness" that is already included allows no control

And last point I have is one call to a sensor would be a smaller hit on the battery than say using 6+ triggers and a Crapton of actions just for half-functional brightness control


My options are:
1: use a crapton of light sensor triggers(which won't work, an s10e reads roughly 10x lower than an s20fe) so other users couldn't use the macro, and the battery usage for that is noticeable...

2: use autobrightness, might as well not use macrodroid for screen brightness at that point(I would rather use MD)

3: request a new way for all users to retrieve a float value that contains the lumens of the sensor at the time of calling the action on the md forums(already did that)
 
Top