Skip to main content

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 

{
   "motion": true,
   "last_motion": "2020-09-28T08:04:02.330388"
}

The RaspberryPi/PIR sensor hardware setup and wiring may look like HC SR501 example.

To install the software you may usePIP 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 on 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

Metadata

Release files for pi-pir-webthing 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pi-pir-webthing 0.1.1
File Size Uploaded
pi_pir_webthing-0.1.1.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pi-pir-webthing 0.1.1
File Interpreter ABI Platform
pi_pir_webthing-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / pi_pir_webthing-0.1.1.tar.gz

Download URL pi_pir_webthing-0.1.1.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4e465a40e65171480ffaefe35db2e7fe81137afbe7e1b548b6ae8395d0bc8d8c
BLAKE2b-256 checksum
How to use checksums
aceb80fbc756fb6c65d8eb9ce6cbd02672e8b92d08cc4acb4ed37bc1716e85de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / pi_pir_webthing-0.1.1-py3-none-any.whl

Download URL pi_pir_webthing-0.1.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
524069aa53245a593b325977456da7186236e053d89595c27258da19400d5c97
BLAKE2b-256 checksum
How to use checksums
12efd4409e62896e6042e70442685574c4b760cb0cf1f8178a3b5cde77c10294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.31

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page