09-24-2019, 02:57 PM
Thanks for the fast reply @765GHF.
Seems to be working, at least the sensor will be detected.
May just need to play a little bit with the range values - I will see.
I would also like to use auto brightness (within Crankshaft I have used this too).
I have tried to follow the readme instruction from the first entry.
But when I try to start the service, I'm facing following error:
I'm not sure what's going wrong here.
I have created the lightsensor folder inside /opt and applied the execution rights (chmod +x) for the necessary files which I have copied to the Pi via an USB stick.
Any ideas?
Seems to be working, at least the sensor will be detected.
May just need to play a little bit with the range values - I will see.
I would also like to use auto brightness (within Crankshaft I have used this too).
I have tried to follow the readme instruction from the first entry.
But when I try to start the service, I'm facing following error:
● lightsensor.service - Pi Lightsensor Service
Loaded: loaded (/etc/systemd/system/lightsensor.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-09-24 15:30:34 CEST; 55s ago
Process: 1406 ExecStart=/opt/lightsensor/service_lightsensor.py (code=exited, status=2)
Process: 1407 ExecStartPost=/bin/touch /tmp/auto_brightness_active (code=exited, status=0/SUCCESS)
Main PID: 1406 (code=exited, status=2)
Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Service RestartSec=5s expired, scheduling restart.
Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Scheduled restart job, restart counter is at 3.
Sep 24 15:30:34 raspberrypi systemd[1]: Stopped Pi Lightsensor Service.
Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Start request repeated too quickly.
Sep 24 15:30:34 raspberrypi systemd[1]: lightsensor.service: Failed with result 'exit-code'.
Sep 24 15:30:34 raspberrypi systemd[1]: Failed to start Pi Lightsensor Service.
I'm not sure what's going wrong here.
I have created the lightsensor folder inside /opt and applied the execution rights (chmod +x) for the necessary files which I have copied to the Pi via an USB stick.
Any ideas?