pi_lightsensor_webthing
A web connected digital light sensor measuring the intensity of ambient light on Raspberry Pi
This project provides a webthing API to a digital light sensor such as BH1750. Please consider to activate I2C on raspberry pi.
The pi_lightsensor_webthing package exposes an http webthing endpoint which supports measuring the intensity of ambient light via http. E.g.
# webthing has been started on host 192.168.0.23
curl http://192.168.0.23:9122/properties
{
"brightness": 100
}
Regarding the RaspberryPi/digital light sensor hardware setup and wiring please refer tutorials mentioned above
To install this software you may use Docker or PIP package manager such as shown below
Docker approach
sudo docker run --privileged -p 9122:9122 grro/pi_lightsensor_webthing
PIP approach
sudo pip install pi_lightsensor_webthing
After this installation you may start the webthing http endpoint inside your python code or via command line using
sudo lightsensor --command listen --port 9122
Here, the webthing API will be bind to the local port 9122
Alternatively to the listen command, you can use the register command to register and start the webthing service as systemd unit. By doing this the webthing service will be started automatically on boot. Starting the server manually using the listen command is no longer necessary.
sudo lightsensor --command register --port 9122
Metadata
Release files for pi-lightsensor-webthing 0.2.22
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pi_lightsensor_webthing-0.2.22.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pi_lightsensor_webthing-0.2.22-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / pi_lightsensor_webthing-0.2.22.tar.gz
| Download URL | pi_lightsensor_webthing-0.2.22.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
729766b452a9c4c909b0d2cc754b20fdc55548959a8e758e9806456117574419
|
|
BLAKE2b-256 checksum How to use checksums |
44705b73b42e069348ea2e068a9925f2b1e3d307b62485a5cdf5b94edb8bb9ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Release files / pi_lightsensor_webthing-0.2.22-py3-none-any.whl
| Download URL | pi_lightsensor_webthing-0.2.22-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
641677703e0c64636cd95505239cfdc887680a66bd6bad8a8a744029141887e3
|
|
BLAKE2b-256 checksum How to use checksums |
4dc1cc555e2a092279556228aa4c659532531b2c011222f1fb7fb219329bd151
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.12
|
Security for pi-lightsensor-webthing 0.2.22
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.