Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

alexmohr/raspberrypi-mqtt-light-sensor

Repository files navigation

Light Sensor MQTT

This repsository contains a simple light sensor for the raspberry pi. Because the pi does not have any analog inputs the scripts measures how long it takes to charge a capacitor until the pi recognizes the voltage as logical one.

The script will takes n measurements, averages them and publishes the result via MQTT. In my setup the MQTT data will be read by home assistant and is used to control the lights.

Requires python3 to run.

Installation

pip install raspberrypi-mqtt-light-sensor

About

Read a light dependent resistor with the digital inputs of a raspberry pi.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages