We have a Raspberry Shake at our school and run RSUDP in a Raspberry Pi, which we access through VNC (only way to bypass the school’s firewall limitations).
We have a server (accessible anywhere since it’s outside the school’s network) which we’re using as an FTP Server, kind of like our own private Google Drive. From here we distribute images and files to our websites.
Is it possible to do the following using RSUDP:
- It senses a movement and sends the Alert message
- Once the plot module takes the screenshot:
a. Send the image to the FTP Server (using ftplib on python)
b. Register that image in our Database (I have created a function that registers every image uploaded to the FTP Server and its path to make it easier to work with in the website)
I found the part in the RSUDP code that takes the screenshot (savefig) and sends its information to the other modules (Telegram, Twitter, etc) but don’t know if it’s possible for me to connect an external function I create in that part. I was thinking of doing a sync program that synced the rsudp/screenshots folder with the FTP folder and running it with CRON, but then figured it would be best to just upload each image as soon as they are created.
Could I perhaps import our own Python module into the RSUDP Plot module and call the FTP upload function in that part? Or is it better to develop the module and receive the image just as the Telegram and Twitter modules do?
I appreciate any advice.