Giter Club home page Giter Club logo

darton / rpims Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 5.0 3.39 MB

Raspberry Pi monitoring system offering: live video transmission recording the stream using UV4L, reading door, window, motion, temperature, humidity, pressure sensors, presentation of their values and sending their states to the Zabbix server. It also offers a weather station: wind speed and direction meter, rainfall meter

License: GNU General Public License v2.0

Python 31.73% Shell 7.14% PHP 40.16% JavaScript 6.67% CSS 14.29%
bme280 door-sensor ds18b20 humidity-monitoring iot raspberry raspberrypi raspicam raspicam-uv4l rpims temperature-monitoring video-recording video-streaming weather-station wind-direction-meter wind-speed-meter zabbix zabbix-sender

rpims's People

Contributors

darton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rpims's Issues

Incompatibles issues

Hello Dariusz, thanks for the nice job. I'm trying to compatible the package for Alpine Linux and getting some errors. I've listed the issues that I faced and couldn't solve so far. I hope to solve these error by your help.

Edit : Debian also shows the same errors.

The first one is below.

[root@appliance ~]# zabbix_get -s 10.10.10.5 -k rpims.dht[2]
Traceback (most recent call last):
  File "/root/scripts/RPiMS/redis-get-data.py", line 22, in <module>
    config = json.loads(redis_db.get('config'))
  File "/usr/lib/python3.9/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

The second one is below. I couldn't install the systemd python package for Alpine Linux, you may guess what was the problem which prevented the installation.

[root@RP4 RPiMS]# python3 rpims.py
/root/scripts/RPiMS/rpims.py:419: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 'yes':
/root/scripts/RPiMS/rpims.py:423: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 'yes':
/root/scripts/RPiMS/rpims.py:427: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 'yes':
/root/scripts/RPiMS/rpims.py:427: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if debug is 'yes':

# RPiMS is running #

Another instance of RPiMS is already running. RPiMS will now close. No module named 'systemd'

systemd error's output is given below.

[root@RP4 RPiMS]# pip install systemd
Collecting systemd
  Using cached systemd-0.16.1.tar.gz (173 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: systemd
  Building wheel for systemd (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-m6l84jr0
       cwd: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/
  Complete output (29 lines):
  [1/3] Cythonizing systemd/_daemon.pyx
  /usr/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/systemd/_daemon.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  [2/3] Cythonizing systemd/_journal.pyx
  /usr/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/systemd/_journal.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  [3/3] Cythonizing systemd/reader.pyx
  /usr/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/systemd/reader.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  /usr/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'build_requires'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.9
  creating build/lib.linux-armv7l-3.9/systemd
  copying systemd/journal.py -> build/lib.linux-armv7l-3.9/systemd
  copying systemd/__init__.py -> build/lib.linux-armv7l-3.9/systemd
  copying systemd/daemon.py -> build/lib.linux-armv7l-3.9/systemd
  running build_ext
  building 'systemd._daemon' extension
  creating build/temp.linux-armv7l-3.9
  creating build/temp.linux-armv7l-3.9/systemd
  gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.9 -c systemd/_daemon.c -o build/temp.linux-armv7l-3.9/systemd/_daemon.o
  gcc -shared -Wl,--as-needed,-O1,--sort-common -fno-semantic-interposition -Wl,--as-needed,-O1,--sort-common -fno-semantic-interposition build/temp.linux-armv7l-3.9/systemd/_daemon.o -L/usr/lib -lsystemd -o build/lib.linux-armv7l-3.9/systemd/_daemon.cpython-39-arm-linux-musleabihf.so
  /usr/lib/gcc/armv7-alpine-linux-musleabihf/10.3.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: cannot find -lsystemd
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for systemd
  Running setup.py clean for systemd
Failed to build systemd
Installing collected packages: systemd
    Running setup.py install for systemd ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5qozo0ru/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/systemd
         cwd: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/
    Complete output (31 lines):
    [1/3] Cythonizing systemd/_daemon.pyx
    /usr/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/systemd/_daemon.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    [2/3] Cythonizing systemd/_journal.pyx
    /usr/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/systemd/_journal.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    [3/3] Cythonizing systemd/reader.pyx
    /usr/lib/python3.9/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/systemd/reader.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    /usr/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'build_requires'
      warnings.warn(msg)
    running install
    /usr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.9
    creating build/lib.linux-armv7l-3.9/systemd
    copying systemd/journal.py -> build/lib.linux-armv7l-3.9/systemd
    copying systemd/__init__.py -> build/lib.linux-armv7l-3.9/systemd
    copying systemd/daemon.py -> build/lib.linux-armv7l-3.9/systemd
    running build_ext
    building 'systemd._daemon' extension
    creating build/temp.linux-armv7l-3.9
    creating build/temp.linux-armv7l-3.9/systemd
    gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python3.9 -c systemd/_daemon.c -o build/temp.linux-armv7l-3.9/systemd/_daemon.o
    gcc -shared -Wl,--as-needed,-O1,--sort-common -fno-semantic-interposition -Wl,--as-needed,-O1,--sort-common -fno-semantic-interposition build/temp.linux-armv7l-3.9/systemd/_daemon.o -L/usr/lib -lsystemd -o build/lib.linux-armv7l-3.9/systemd/_daemon.cpython-39-arm-linux-musleabihf.so
    /usr/lib/gcc/armv7-alpine-linux-musleabihf/10.3.1/../../../../armv7-alpine-linux-musleabihf/bin/ld: cannot find -lsystemd
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-609f_olx/systemd_1c62f33e593046258040f0de7f15e1c0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5qozo0ru/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.9/systemd Check the logs for full command output.
[root@RP4 RPiMS]#
[root@RP4 RPiMS]#

Thanks in advance.

About little changes

Hello Dariusz, I couldn't change the color of the motions. Is there a way to change the color of the text or use a simple picture for different status. For example when the door status is open yellow is okay, but I want to use a simple picture or change the color of the font when the door status ise close. By the way I also discovred a bug which is related to DS18B20 sensor. It doesn't show up at homepage when we enable it.

Door position

Good afternoon! First of all, I want to thank you for a wonderful project. Thank you for your hard work. The description says: "When any of the doors sensors opens or closed then a message will be sent to the Zabbix server." Can you please tell me how to implement this in Zabbix server? with DHT 22 , of course, specified the rpims.dht[2] and rpims.dht[4] keys separately, and it displays temperature and humidity separately in the graphs. How do you specify doors? through an agent or a trapper and with what key? and how to display each door separately, so that when the state of the door open or closed changes, it goes to the server itself?

About camera feature.

Have a good day. Thanks for the great project. I realized that there is two problem about camera. One of them is the rotation doesn't work, and the second one is when a door is opened the camera doesn't start recording. Thanks in advance.

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.