theyosh / TerrariumPI

Home automated terrarium/aquarium or other enclosed environment with a Raspberry Pi
https://terrarium.theyosh.nl
GNU General Public License v3.0
402 stars 97 forks source link

[BUG]: Camera and Relays not working after Upgrade and Titles of Sensors erased #924

Open Konrad84 opened 2 weeks ago

Konrad84 commented 2 weeks ago

Hi there now after you solved my issue with telegram after the upgrade Camera isn´t working and there are no relais found anymore. Titles of sensores are erased. I upgraded again to 4.9.3 but still doesnt work. Have you got any solution or hint where to search ? Here ist the log ...

              |_   _|        | | | |     | ___ \_   _|
                 | |_   _ _ __| |_| | ___ | |_/ / | |
                 | | | | | '__| __| |/ _ \|  __/  | |
                 | | |_| | |  | |_| |  __/| |    _| |_
                 \_/\__,_|_|   \__|_|\___|\_|    \___/

                                            Version: 4.9.3

Durchschnitt temperatur: 25.12 C Betriebszeit: 11 days, 9:13:27 Systemauslastung: 0.47, 0.53, 0.48 CPU Temperatur: 60.148 C Speicher: 7.1 GiB(24.60%) used of total 29.0 GiB RAM: 247.5 MiB(28.42%) used of total 870.8 MiB

Aktuelle Tätigkeit (0/0) 0/0.00 Watt, 0/0.00 L/m

  Letztes update: Thursday, 20-06-2024 22:02:43

Linux raspberrypi 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Thu Jun 20 21:15:05 2024 from 192.168.178.24 pi@raspberrypi:~ $ sudo service terrariumpi stop pi@raspberrypi:~ $ cd TerrariumPI pi@raspberrypi:~/TerrariumPI $ source venv/bin/activate (venv) pi@raspberrypi:~/TerrariumPI $ python terrariumPI.py 2024-06-20 22:04:41,737 - INFO - terrariumEngine - Starting up TerrariumPI 4.9.3 on a Raspberry Pi 3 Model B Rev 1.2 ... 2024-06-20 22:04:41,773 - INFO - terrariumEngine - Loaded 32 settings in 0.03 seconds. 2024-06-20 22:04:42,916 - INFO - terrariumEngine - Start loading total power and water usage 2024-06-20 22:04:43,954 - INFO - terrariumEngine - Loaded total power and water usage in 1.04 seconds. 2024-06-20 22:04:43,955 - INFO - terrariumEngine - Loading existing sensors from database. 2024-06-20 22:04:44,984 - INFO - terrariumSensor - Loaded sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3c01f09637c2' with value 25.50C in 1.00 seconds. 2024-06-20 22:04:45,910 - INFO - terrariumSensor - Loaded sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3c01f096b371' with value 24.69C in 0.92 seconds. 2024-06-20 22:04:46,867 - INFO - terrariumSensor - Loaded sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3c01f096fb7e' with value 24.88C in 0.96 seconds. 2024-06-20 22:04:47,827 - INFO - terrariumSensor - Loaded sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de104572f5c' with value 24.81C in 0.96 seconds. 2024-06-20 22:04:48,787 - INFO - terrariumSensor - Loaded sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5' with value 25.25C in 0.96 seconds. 2024-06-20 22:04:48,791 - INFO - terrariumEngine - Scanning for new sensors ... 2024-06-20 22:05:02,887 - INFO - terrariumEngine - Loaded 5 sensors in 18.93 seconds. 2024-06-20 22:05:02,889 - INFO - terrariumEngine - Loading existing relays from database. 2024-06-20 22:05:02,912 - INFO - terrariumEngine - Scanning for new relays ... No GEMBIRD SiS-PM found. Check USB connections, please! 2024-06-20 22:05:19,886 - INFO - terrariumEngine - Loaded 0 relays in 17.00 seconds. 2024-06-20 22:05:19,888 - INFO - terrariumEngine - Loading existing buttons from database. 2024-06-20 22:05:19,910 - INFO - terrariumEngine - Loaded 0 buttons in 0.02 seconds. 2024-06-20 22:05:19,911 - INFO - terrariumEngine - Loading existing webcams from database. 2024-06-20 22:05:30,300 - INFO - terrariumWebcam - Loaded rpicam webcam 'Schildkröten Haus' at address 'rpicam' in 10.36 seconds. 2024-06-20 22:05:30,302 - INFO - terrariumEngine - Loaded 1 webcams in 10.39 seconds. 2024-06-20 22:05:30,303 - INFO - terrariumEngine - Loading existing enclosures from database. 2024-06-20 22:05:30,311 - INFO - terrariumEngine - Loaded 0 enclosures in 0.01 seconds. 2024-06-20 22:05:30,468 - INFO - terrariumEngine - Message of the Day generated in 0.16 seconds 2024-06-20 22:05:30,475 - INFO - terrariumEngine - TerrariumPI 4.9.3 is up and running at address: http://0.0.0.0:8090 in 50.31 seconds. 2024-06-20 22:05:30,000 - INFO - terrariumWebserver - Running webserver at 0.0.0.0:8090 2024-06-20 22:05:35,033 - WARNING - hardware.sensor - Error getting new data from sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5': no data, retrying in 0.5 seconds... 2024-06-20 22:06:35,056 - WARNING - hardware.sensor - Error getting new data from sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5': no data, retrying in 0.5 seconds... 2024-06-20 22:07:35,047 - WARNING - hardware.sensor - Error getting new data from sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5': no data, retrying in 0.5 seconds... 2024-06-20 22:08:35,053 - WARNING - hardware.sensor - Error getting new data from sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5': no data, retrying in 0.5 seconds... 2024-06-20 22:09:35,047 - WARNING - hardware.sensor - Error getting new data from sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5': no data, retrying in 0.5 seconds... 2024-06-20 22:10:35,056 - WARNING - hardware.sensor - Error getting new data from sensor 1-Wire sensor temperature named '1-Wire sensor measuring temperature' at address '28-3de10457f6b5': no data, retrying in 0.5 seconds...

Now there is a Error from 1-Wire too but this worked and i changed nothing only updated ... hmm

greets Konrad

Thank You

theyosh commented 1 week ago

Hi sorry for the slow response. But this is strange, and hard to debug/fix. But it looks like only 1 sensor is complaining: '28-3de10457f6b5'

I have seen this also with my setup. That 1 1-wire sensor is broken. This is probably due to a bad connection. In my case. I know that I made a bad solder joint between two cables, and that joint is now laying on the bottom of my terrarium, probably in water. So for me, that means, 1 sensor just does not work, due to a broken cable. And I can't fix it, as I need to rebuild my terrarium.

About the 1-wire sensors, I am depending on OS support / integration. So I guess that there are some messages from the 1-wire system. You can check this by running: grep w1 /var/log/kern.log This will probably produce some output. Paste it here.

And you should see some directories at '/sys/bus/w1/devices/' So when you list the contents of that folder what do you see?: ls -l /sys/bus/w1/devices/ What kind of list do you get?

It can also be, that somehow the Pi is overloaded, and therefore dropping some power resources. As I have seen that Bluetooth become a bit more unstable when the CPU is doing a lot of stuff.

And if the sensor is broken for what ever reason, you can put it on the ignore list in TerrariumPI, and that sensor will not be used anymore. You will lose a sensor, but the system will just continue without errors.

About the camera issues, I see nothing wrong in the log file. There it looks like the camera is working.

Konrad84 commented 1 week ago

Hi there thank you for the help. I set up a new Raspian Legacy and new SD Card now it all works :)

Can you just help with the rtsp stream? I got an Onvif camera, an rtsp camera and an usb camera.

i tried few links but no response like :

rtsp://[ipadress:port]/stream rtsp://[ipadress:port]/onvif/stream rtsp://[ipadress]/stream

and how do i get the adress of de usb camera ?

Soon i will do some pictures of the turtles :)

theyosh commented 1 week ago

I am not familiar with Onvif camera's. I see some information here about getting an RTSP url, but that is rather complicated when you are not that experienced on Linux: https://superuser.com/a/1711576 Also, I see this app: https://www.ipcent.com/mobile/onvifer Maybe that can show your camera in your network, and can give an RTSP url back. Not sure. If you have found the RTSP stream, you can test it by using VLC https://www.thewindowsclub.com/how-to-play-rtsp-stream-in-vlc-media-player

For the USB camera, there should be something like /dev/videoX where X is a number. You can list them with ls -l /dev/video* /dev/video0 is the Raspberry PI camera when added. Else I expect that you only have /dev/video1X devices, which are not camera devices TP can use. So the usb address should be something like: /dev/video0 or /dev/video1 I guess.