Skip to main content

A web connected PIR motion sensor detecting movement Raspberry Pi

Project description

pi_pir_webthing

A web connected PIR motion sensor on Raspberry Pi

This project provides a webthing API to a PIR motion sensor such as descriped here.

The pi_pir_webthing package exposes an http webthing endpoint which supports detecting motion via http. E.g.

# webthing has been started on host 192.168.0.23

curl http://192.168.0.23:9544/properties 

{
   "time": false,
   "last_motion": "2020-09-28T08:04:02.330388"
}

Regarding the RaspberryPi/PIR sensor hardware setup and wiring please refer tutorials such as How to Interface a PIR Motion Sensor With Raspberry Pi GPIO

To install this software you may use PIP package manager such as shown below

sudo pip install pi_pir_webthing

After this installation you may start the webthing http endpoint inside your python code or via command line using

sudo pir --command listen --port 9544 --gpio 14

Here, the webthing API will be bind to the local port 9544 and be connected to the PIR pin using gpio 14

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 pir --command register --port 9544 --gpio 14

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pi_pir_webthing-0.0.6.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pi_pir_webthing-0.0.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pi_pir_webthing-0.0.6.tar.gz.

File metadata

  • Download URL: pi_pir_webthing-0.0.6.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for pi_pir_webthing-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2d286fc1bd2d67c90bd85e17d557708b9c7bee1a2553b2ff295a76ea850a8bc9
MD5 e8a80a89b6b763baf1e84c9331738138
BLAKE2b-256 d946c8e91dc490747114912758a05c12983213b7a64f20dcaa0e638f45d1dd7c

See more details on using hashes here.

File details

Details for the file pi_pir_webthing-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pi_pir_webthing-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for pi_pir_webthing-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 434dc906a05c73973f099b9ab3c77715cbb49025f619793ff2cf95c476fabac5
MD5 8ae39712d7798be5da9f6a07a222a0fa
BLAKE2b-256 90f79c18869b89cbdbd0d535b486858293c39166a90870c600ac74fd3697192e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page