I'm very new to the Node-RED and Rpi, so I might be asking a lot, but any help I would appreciate very much.
So, up until now, I was controlling my Philips HUE lights through my phone and it's built-in light sensor, with an app called Tasker and 3rd party plugin for hue.
I built an array in Tasker in which, whenever I'm home (my phone connected to my wifi), a looping task and profile starts, in which every 13 seconds it checks the lux data, if it's above a certain value, it dimms the light, more above, it turns it off etc.
When I leave home (disconnected from wifi AND not in range of my home geolocation - Autolocation check), it turns the lights off.
I was also able to connect through Join a config, where whenever I launch VLC in windows (watching a movie), Eventghost sends a request to my phone to turn off the lighting looping task and profile, and turn off the lights except for 1, which becomes dimmed.
So basically I would wanna build an array where nodered checks the lux value every 10 seconds, reads value, if its more-less than x value, dimms/turns off etc the lights, and I can turn this loop on-off using either Join or tasker from phone, since I would wanna only automate the lights when I'm home (sending "xy" Join message to nodered turns off the lopp, sending "yx" Join message starts the loop).
My question is, how can I achieve this using a raspberry pi and a TSL2591 light sensor with Node-red?
Thanks for your time and answers,