Skip to main content

This API provides functions for the configuration and operation of the Parallax 555-28027 PIR sensor and the Omron D6T-1A-02 temperature sensor. The data read from these modules may then be relayed via TCP protocols, from many clients to a single server, using a simplified rendition of the integrated Python Socket package.

Project description

OmlaxTCP

https://img.shields.io/pypi/v/omlaxtcp.svg https://img.shields.io/travis/AadamAbrahams/omlaxtcp.svg Documentation Status

This Raspberry Pi-Python API provides functions for the configuration and operation of the Parallax 555-28027 PIR sensor and the Omron D6T-1A-02 temperature sensor. The data read from these modules may then be relayed via TCP protocols, from many clients to a single server, using a simplified rendition of the integrated Python Socket package.

Features

Basic configuration and operation of:
  • The Parallax 555-28027 PIR motion sensor.

  • The Omron D6T-1A-02 temperature sensor using I2C communication protocols.

  • TCP network protocols using a simplified rendition of the integrated Python Socket package.

Additional functionality includes:
  • Speed detection through the use of two PIR motion sensors seperated by a specified distance.

  • Direction detection through the use of two PIR motion sensors opposing one another, such that one is triggered prior to the other.

  • Fever detection through the use of a single temperature sensor and a given maximum temperature boundary. (Can be used to determine if anything produces a temperature above a given maximum, not specifically human temperatures.)

Hardware and Software Prerequisites

A majority of the functions contained within this API may require a certain hardware module attached and/or a specific set of python libraries installed to operate as intended. However, in all instances that a hardware module is required, a Raspberry Pi (Any version) is necessary.

To make use of any of the functions contained in motionSensor.py, a Parallax 555-28027 PIR motion sensor is required and may be connected to a GPIO pin of choice. However, it would be possible to use any PIR motion sensor that has a single output pin, and that outputs 1 when triggered and 0 while untriggered. Note: Functions direc_detect_with_BuzzandTemp(motion_out, motion_in) and def init_trig_with_BuzzandTemp(motion) require that an Omron D6T-1A-02 temperature sensor is connected as well as a buzzer.

To make use of any of the functions contained in tempSensor.py, an Omron D6T-1A-02 temperature sensor is required and must be connected to the relevant I2C specific pins to allow for complete communication. The python packages pigpio, smbus2 and crcmod are essential and needed to be installed as follows:

pip install pigpio smbus2 crcmod

It is also required, on Linux-based machines, that when a program that makes use of these functions is executed for the first time, the following line is asserted in the command line:

sudo pigpiod

The functions defined in TCP.py do not require any additional hardware modules, it merely requires that the device implementing the subpackage be connected to a router. Such that, at a minimum, devices may communicate over the Local Area Network. If the user wishes to exchange data between devices over the internet, the device acting as the server is required to have its router port forwarding, on the relevant socket port, to the device in question.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2020-10-30)

  • First release on PyPI.

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

omlaxtcp.tar.gz (12.9 kB view details)

Uploaded Source

File details

Details for the file omlaxtcp.tar.gz.

File metadata

  • Download URL: omlaxtcp.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for omlaxtcp.tar.gz
Algorithm Hash digest
SHA256 ca6cc3ae8f6d098f1e1090896271e7992154fa40ad9b5e0dc0a59eb627816897
MD5 c7e16c7f1b5b213ead6f0800e8e02e2c
BLAKE2b-256 6eb4e1c2acd9aabfde68a0102bf39b45f7232aab7e429f51b32e243799a1db19

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