Use front camera like light sensor

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
colabi
Posts: 134
Joined: 06 Jan 2013 22:33

Use front camera like light sensor

Post by colabi » 09 Nov 2014 12:45

Hi Martin

Do you think is possible to add a trigger that monitor front camera for luminescence?
And use this like a light sensor? For devices without a light sensor?
(Maybe with an option to do that only if screen is on)

Thanks

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Use front camera like light sensor

Post by Martin » 10 Nov 2014 17:24

Hi,

Using the camera is probably extremely battery consuming. Maybe you could take a picture and use a function getPixelColor to check one pixel for it's brightness from time to time but I doubt that this works well.

Regards,
Martin

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Use front camera like light sensor

Post by MURTUMA » 10 Nov 2014 21:16

Martin's siggertion might work(*) but requires analyzing multiple pixels and averaging the results to even out noise and other things that would cause unwanted/inaccurate results.

*propably not good and fast enough to be satisfactory.

Locked