项目作者: platofan23

项目描述 :
This programm is a Tuya-Door-Sensor workarround via python
高级语言: Python
项目地址: git://github.com/platofan23/python_tuya_doorsensor.git
创建时间: 2021-09-24T23:15:41Z
项目社区:https://github.com/platofan23/python_tuya_doorsensor

开源协议:Apache License 2.0

下载


python_tuya_doorsensor

Description of the project


This programm is a python workarround for a Tuya Door Sensor with the help of pushover!

The Sensor.py constantly pings the door sensor. If it is awake and the ping is successful, it starts the Notify.py!

Notify.py than sends a notification to pushover via pushover api

Project status


The project itself is complete and ready for use. I am open for improvments.

Requirements


Requirements for running the webui are:

  • python (3.x.x)
  • pip (v3) or any other packetmanager
  • pythonping
  • pushover
  • pushover account with a valid api token
  • pushover app on the smartphone

Installation

  1. Download and Install Python.

    For windows go to (https://www.python.org/downloads/)

    For linux use sudo apt-get install python3.x
  2. Download and install pip-packetmanager
  3. Install pythonping

    For Windows py -3 -m pip install pythonping

    For Linux pip3 install pythonping
  4. Install pushover

    For Windows py -3 -m pip install pushover

    For Linux pip3 install pushover
  5. Make an pushover account and generate your apitoken and copy your account id
  6. Insert your values in the Notify.py and also insert the ip of the motion sensor in the Sensor.py
  7. Now run the Sensor.py - File

    For Windows py -3 Sensor.py

    For Linux python3 Sensor.py
  8. Install and login in the pushover app.

Additional notes:

  • The tuya motion sensor needs to be connected to your homenetwork via the app
  • afterwards you can block the internet connection of the sensor via your router
  • In Sensor.py the ip needs to be inserted! In Notify.py the api-token for the set application needs to be inserted aswell the account id.
  • This can be done here https://pushover.net