SKBIIDI AIJAIOEGEAIGHEAIO

This commit is contained in:
Raspi
2025-04-27 18:15:54 +02:00
parent bebfb8adb3
commit 08693f1397
9 changed files with 29 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ class Server:
self.dic["maintenance"] = camera_status["maintenance"] self.dic["maintenance"] = camera_status["maintenance"]
self.dic["timelapse"] = camera_status["interval"] self.dic["timelapse"] = camera_status["interval"]
self.dic["conf nb_images"] = camera_status["nb_images"] self.dic["conf nb_images"] = camera_status["nb_images"]
self.dic["set_config"] = camera_status["idle"] self.dic["set_config"] = not camera_status["idle"]
self.dic["stop current config"] = camera_status["stop_flag"] self.dic["stop current config"] = camera_status["stop_flag"]
else: else:
print("mauvais code") print("mauvais code")

View File

@@ -1 +1 @@
{"set_config": false, "maintenance": false, "stop current config": false, "timelapse": 3, "conf nb_images": 1, "nb_images restantes": 1} {"set_config": true, "maintenance": false, "stop current config": false, "timelapse": 3, "conf nb_images": 10, "nb_images restantes": 1}

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -0,0 +1 @@
{"timestamp": "2025-04-27 18:00:56", "temperature": 38.14068818188754, "humidity": 22.47333485923552}

View File

@@ -54,10 +54,10 @@ class Send_data_stocked:
'image': (image_path, open(image_path, 'rb'), 'image/jpeg') 'image': (image_path, open(image_path, 'rb'), 'image/jpeg')
} }
try: try:
#print(data) print("Datas are : ",data)
#print(files) #print(files)
response = requests.post(self.url, headers=self.headers, data=data, files=files) response = requests.post(self.url, headers=self.headers, data=data, files=files)
print(response) print("Answer from server is : ",response)
response.raise_for_status() response.raise_for_status()
response_data = response.json() response_data = response.json()
return response_data return response_data

View File

@@ -12,4 +12,4 @@ else
echo "pas connecté à internet" echo "pas connecté à internet"
python Time_Lapse_NoConnection.py python Time_Lapse_NoConnection.py
fi fi
python Automate.py python Automate.py

23
timelapse-service.log Normal file
View File

@@ -0,0 +1,23 @@
Erreur : Insufficient privileges.
Connecté à internet
[0:13:07.775780345] [3774]  INFO Camera camera_manager.cpp:327 libcamera v0.4.0+53-29156679
[0:13:07.806936514] [3777]  WARN RPiSdn sdn.cpp:40 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise
[0:13:07.809437125] [3777]  INFO RPI vc4.cpp:447 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media1 and ISP device /dev/media3
[0:13:07.809535588] [3777]  INFO RPI pipeline_base.cpp:1121 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:13:07.816878221] [3774]  INFO Camera camera.cpp:1202 configuring streams: (0) 800x600-XBGR8888 (1) 1296x972-SGBRG10_CSI2P
[0:13:07.817365292] [3777]  INFO RPI vc4.cpp:622 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 1296x972-SGBRG10_1X10 - Selected unicam format: 1296x972-pGAA
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
/home/timelapse/Documents/Time_Lapse/script.sh : ligne 14 : 3774 Abandon python Time_Lapse_Connection.py
Noms des dossiers : []
Here is the answer from the server : {'id': 1, 'interval': 5, 'nb_images': 10, 'maintenance': False, 'stop_flag': True, 'idle': False}
Here are the datas loaded : {'set_config': True, 'maintenance': False, 'stop current config': True, 'timelapse': 5, 'conf nb_images': 10, 'nb_images restantes': 1}
- No Maintenance
- Stopping current config
- New Config
- Shut Down
TimeLapse sent is : 5