Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pi-lightsensor-webthing

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pi-lightsensor-webthing

A web connected digital light sensor measuring the intensity of ambient light on Raspberry Pi

  • 0.2.22
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc