Giter VIP home page Giter VIP logo

project_aroundtheclock's Introduction

Project AroundTheClock: Praying on Time!



Build Status Code Coverage Maintainability Last Commit Issues Known Vulnerabilities License

Overview

AroundTheClock is a self-improvement project that is aimed to help muslims regulate praying on time by temporarily disabling internet connectivity at each prayer (e.g. disabling internet for 10 minutes by default during the start of Asr).

Above is a demo that illustrates it in action: The scenario is that it is approaching Asr prayer time and the internet needs to be 'paused' temporarily. The VM on the left is running the AroundTheClock script and on the VM on the right is a regular user on the same network. Once the time hits Asr (15:05:00), the internet is 'paused'. For the purposes of the demo, the the script and clock are manually controlled, however, in a real-world scenario is is fully automated.

This is achieved by calculating the prayer times for the geolocation specified in config/config.json then scheduling tasks in Python to disable the home internet.

The idea is to download this repository on an Raspberry Pi device (or any other machine), connect it to your home network, and leave it running.

How to Use

  1. Clone the repository, git clone https://github.com/OthmanEmpire/project_aroundtheclock
  2. Navigate to the root project directory, cd project_aroundtheclock
  3. Modify ./config/config.json to your geolocation, vi ./config/config.json
  4. Change permissions of the installation script, chmod u+x ./bin/install.sh
  5. Run the installation script from the root directory, sudo ./bin/install.sh.
  6. Verify "running" status of project, systemctl status aroundtheclock.service
  7. If you face any issue, please check the troubleshooting section.

Troubleshooting

  • Issue: How do check if aroundtheclock is running?
  • Solution: Check its daemon, systemctl status aroundtheclock.service.

  • Issue: I get the error 'Unit aroundtheclock.service could not be found'!
  • Solution: The installation process failed. Repeat steps 4-5.

  • Issue: I can see aroundtheclock service but its state isn't 'active'!
  • Solution A: Restart the service manually, systemctl restart aroundtheclock.service.
  • Solution B: Check the logs of the service, journalctl -u aroundtheclock.service.
  • Solution C: Check the logs of the application, output/log.txt.

Key Features

  • Calculates individual prayer times up to an accuracy of 1 minute.
  • Schedules jobs to block the internet temporarily for all prayers.
  • Configurable internet blocking duration via config.json.
  • Logs computed prayer times as well as scheduled jobs to blocking internet.
  • Source code is structured via a functional approach (thus can verify formulae).

Limitations

  • Works only on a single subnet. If your home network spans multiple subnets (most home setups don't), then only the subnet of the device running the script will have its internet connectivity disabled.
  • Some advanced configuration applied on a network device may prevent arp poisoning (e.g. static arp entries for default gateway). Most home setups don't fall under this category.
  • For now, the user needs to manually specify their geolocation coordinates in config.json. The longitude and latitude need to be accurate to 0.1 degree in otherwise it can cause prayer times to be shifted in some cases by up to 3 minutes. Note that clocks on mosques follow pre-defined coordinates, and this sometimes varies between clocks too unfortunately (not fully standardized). For now, config.json is configured for coordinates of AlKhobar, Saudi Arabia.

Authors

Name Email
Othman Alikhan [email protected]

Acknowledgements

Individals
  • AbdulAziz Almass: For inspiring me to take on this project.
Derivation of Astronomical and Prayer Formulae
Reference Code

project_aroundtheclock's People

Contributors

othmanalikhan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

abdulazizalmass

project_aroundtheclock's Issues

setup.py install for RPi.GPIO ... error

Based on a test of installation, the error of installation stops at wheel with install.sh. Your support is appreciated


>>> INSTALLING OS DEPENDENCIES...
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.9.2-3).
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (20.3.4-4+rpt1+deb11u1).
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-venv is already the newest version (3.9.2-3).
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dsniff is already the newest version (2.4b1+debian-30).
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

>>> CREATING A PYTHON VIRTUAL ENVIRONMENT AND INSTALLING ITS DEPENDENCIES...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting julian==0.14
  Using cached julian-0.14.zip (2.8 kB)
Requirement already satisfied: schedule==0.6.0 in ./virtual/lib/python3.9/site-packages (from -r requirements_python.txt (line 5)) (0.6.0)
Collecting RPi.GPIO==0.7.0
  Using cached RPi.GPIO-0.7.0.tar.gz (30 kB)
**Using legacy 'setup.py install' for julian, since package 'wheel' is not installed.
Using legacy 'setup.py install' for RPi.GPIO, since package 'wheel' is not installed.
Installing collected packages: RPi.GPIO, julian
    Running setup.py install for RPi.GPIO ... error
    ERROR: Command errored out with exit status 1:**
     command: /home/pi/project_aroundtheclock/virtual/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/setup.py'"'"'; __file__='"'"'/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rylf59g0/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/project_aroundtheclock/virtual/include/site/python3.9/RPi.GPIO
         cwd: /tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/
    Complete output (87 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.9
    creating build/lib.linux-armv7l-3.9/RPi
    copying RPi/__init__.py -> build/lib.linux-armv7l-3.9/RPi
    creating build/lib.linux-armv7l-3.9/RPi/GPIO
    copying RPi/GPIO/__init__.py -> build/lib.linux-armv7l-3.9/RPi/GPIO
    running build_ext
    building 'RPi._GPIO' extension
    creating build/temp.linux-armv7l-3.9
    creating build/temp.linux-armv7l-3.9/source
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/c_gpio.c -o build/temp.linux-armv7l-3.9/source/c_gpio.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/common.c -o build/temp.linux-armv7l-3.9/source/common.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/constants.c -o build/temp.linux-armv7l-3.9/source/constants.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/cpuinfo.c -o build/temp.linux-armv7l-3.9/source/cpuinfo.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/event_gpio.c -o build/temp.linux-armv7l-3.9/source/event_gpio.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/py_gpio.c -o build/temp.linux-armv7l-3.9/source/py_gpio.o
    source/py_gpio.c: In function ‘PyInit__GPIO’:
    source/py_gpio.c:1046:4: warning: ‘PyEval_ThreadsInitialized’ is deprecated [-Wdeprecated-declarations]
     1046 |    if (!PyEval_ThreadsInitialized())
          |    ^~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:23:
    /usr/include/python3.9/ceval.h:129:36: note: declared here
      129 | Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
          |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~
    source/py_gpio.c:1047:7: warning: ‘PyEval_InitThreads’ is deprecated [-Wdeprecated-declarations]
     1047 |       PyEval_InitThreads();
          |       ^~~~~~~~~~~~~~~~~~
    In file included from /usr/include/python3.9/Python.h:145,
                     from source/py_gpio.c:23:
    /usr/include/python3.9/ceval.h:130:37: note: declared here
      130 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/py_pwm.c -o build/temp.linux-armv7l-3.9/source/py_pwm.o
    arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/pi/project_aroundtheclock/virtual/include -I/usr/include/python3.9 -c source/soft_pwm.c -o build/temp.linux-armv7l-3.9/source/soft_pwm.o
    arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.9/source/c_gpio.o build/temp.linux-armv7l-3.9/source/common.o build/temp.linux-armv7l-3.9/source/constants.o build/temp.linux-armv7l-3.9/source/cpuinfo.o build/temp.linux-armv7l-3.9/source/event_gpio.o build/temp.linux-armv7l-3.9/source/py_gpio.o build/temp.linux-armv7l-3.9/source/py_pwm.o build/temp.linux-armv7l-3.9/source/soft_pwm.o -o build/lib.linux-armv7l-3.9/RPi/_GPIO.cpython-39-arm-linux-gnueabihf.so
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:42: multiple definition of `both_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:42: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:41: multiple definition of `falling_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:40: multiple definition of `rising_edge'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:39: multiple definition of `pud_down'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:38: multiple definition of `pud_up'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:37: multiple definition of `pud_off'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:36: multiple definition of `bcm'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:35: multiple definition of `board'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:34: multiple definition of `unknown'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:33: multiple definition of `spi'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:32: multiple definition of `i2c'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:32: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:31: multiple definition of `serial'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:31: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:30: multiple definition of `pwm'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:30: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:29: multiple definition of `output'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:29: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:28: multiple definition of `input'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:28: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:27: multiple definition of `low'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:27: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:26: multiple definition of `high'; build/temp.linux-armv7l-3.9/source/constants.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/constants.h:26: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:38: multiple definition of `gpio_direction'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:38: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/py_pwm.h:23: multiple definition of `PWMType'; build/temp.linux-armv7l-3.9/source/py_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/py_pwm.h:23: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:41: multiple definition of `module_setup'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:41: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:40: multiple definition of `setup_error'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:40: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:39: multiple definition of `rpiinfo'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:39: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:37: multiple definition of `pin_to_gpio'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:37: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:36: multiple definition of `pin_to_gpio_rev3'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:36: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:35: multiple definition of `pin_to_gpio_rev2'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:35: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:34: multiple definition of `pin_to_gpio_rev1'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:34: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/py_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:33: multiple definition of `gpio_mode'; build/temp.linux-armv7l-3.9/source/common.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/common.h:33: first defined here
    /usr/bin/ld: build/temp.linux-armv7l-3.9/source/soft_pwm.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/soft_pwm.c:28: multiple definition of `threads'; build/temp.linux-armv7l-3.9/source/event_gpio.o:/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/source/event_gpio.c:60: first defined here
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/arm-linux-gnueabihf-gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/pi/project_aroundtheclock/virtual/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/setup.py'"'"'; __file__='"'"'/tmp/pip-install-x_9o6gda/rpi-gpio_e8518224745645bbbbdb4784002bd3f7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rylf59g0/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/project_aroundtheclock/virtual/include/site/python3.9/RPi.GPIO Check the logs for full command output.

>>> CREATING AN AROUNDTHECLOCK DAEMON USER
useradd: user 'aroundtheclock' already exists

>>> INSTALLING AROUNDTHECLOCK AS A DAEMON...

>>> INSTALLING AROUNDTHECLOCK EXECUTABLE...

>>> CHANGING PERMISSIONS ON AROUNDTHECLOCK PROJECT...
chown: invalid group: 'aroundtheclock:aroundtheclock'

>>> GIVING AROUNDTHECLOCK DAEMON THE NEEDED PERMISSIONS...

The following entry already exists in /etc/sudoers:
'# Automatically generated by 'project_aroundtheclock''

The following entry already exists in /etc/sudoers:
'Cmnd_Alias AROUNDTHECLOCK_CMDS = /usr/local/bin/aroundtheclock'

The following entry already exists in /etc/sudoers:
'aroundtheclock ALL=(ALL) NOPASSWD: AROUNDTHECLOCK_CMDS'

>>> ENABLING AROUNDTHECLOCK DAEMON...

>>> DONE INSTALLING!

>>> CHECKING IF AROUNDTHECLOCK IS RUNNING...
● aroundtheclock.service - Project_AroundTheClock
     Loaded: loaded (/lib/systemd/system/aroundtheclock.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sat 2022-07-16 04:46:33 +03; 2s ago
    Process: 4059 ExecStart=/home/pi/project_aroundtheclock/bin/run.sh (code=exited, status=1/FAILURE)
   Main PID: 4059 (code=exited, status=1/FAILURE)
        CPU: 233ms
pi@nakedc```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.