MarkGrimwood / Mognet-All-Sky-Camera-install

Software for a simple Raspberry Pi based all sky camera
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

error main.zip #1

Closed jmrp12345 closed 2 years ago

jmrp12345 commented 3 years ago

unzip main.zip Error "end of central directory signature not found"

MarkGrimwood commented 3 years ago

Hi,

Try the download and unzip again. Tried it on several machines here and I have not been able to duplicate the problem. The zip file is generated by GitHub rather than me, so could be a temporary problem their side.

Let me know if it happens again and I'll write up some alternative instructions too as files can also be placed on the Pi from a Windows machine using WinScp or using SCP from another Linux machine

jmrp12345 commented 3 years ago

Mark - thanks for the quick reply - I have repeated the download as instructed in your CN post:

https://stargazerslounge.com/topic/376932-another-all-sky-camera/ https://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install

wget https://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/archive/refs/heads/main.zip unzip main.zip

I get the same error - I am using the latest Raspberry Pi OS on a RasPi4


From: MarkGrimwood @.> Sent: May 8, 2021 5:49 AM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Hi,

Try the download and unzip again. Tried it on several machines here and I have not been able to duplicate the problem. The zip file is generated by GitHub rather than me, so could be a temporary problem their side.

Let me know if it happens again and I'll write up some alternative instructions too as files can also be placed on the Pi from a Windows machine using WinScp or using SCP from another Linux machine

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-835322592, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFKHWTFTS2V74O6JC5TTMUQN7ANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hmmm...I tried it with two Pi Zeros, a 400, and a clean install of Raspbian on a Model B. And also double checked the file via Windows 10 and can't get that error. My suspicion is that you might have a corrupted version of the unzip utility.

So we'll go for Plan B instead. I'm assuming that you are using Windows to get to your Pi4 via ssh. If so, then download the zip file onto your Windows PC and unzip it there, then download WinScp https://winscp.net/eng/index.php and create a connection to your Pi4 that way. Then you can copy and paste the unzipped folders onto the Pi. Once they are copied across go back to your ssh connection, navigate to where you put the folder, and continue from the chmod instruction

Fingers crossed for this attempt :)

jmrp12345 commented 3 years ago

Mark - I tried (for me) a simpler way to install your program - Win10(Windows 10) RasPi(Raspberry Pi OS RasPi4)

tried again download with Raspberry Pi OS on RasPi4 from internet cannot unzip main.zip

alternatively:

Win10:download file :https://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install Win10:Extract All Win10:copy "Mognet-All-Sky-Camera-install-main" to USB stick RasPi:copy from USB stick to Desktop chmod -R 755 Mognet-All-Sky-Camera-install-main cd Mognet-All-Sky-Camera-install-main ./autodeploy installation several minutes answer questions then reboot IP: 10.0.0.152 URL http://raspberrypi/

camera is Raspberry HQ

with both Win10 and RasPi connected to home network Win10: http://raspberrypi/ see Raspberry Pi All Sky Camera website with "Current View", Sunrise, About see images in Current View appears to be working

I am interested in using this program to take and archive images outside my window I am using my RasPi for other things also so would like ability to start and stop AllSkyCam

Comments/Questions:

not clear if "only" AllSkyCamera can be loaded onto SD not clear if AllSkyCamera starts automatically on Boot not clear if access to website is through SSH or just website or WiFi spot

how do I stop AllSkyCamera how do I start AllSkyCamera how do I tell if program running where are images saved to how to delete images


From: MarkGrimwood @.> Sent: May 8, 2021 12:37 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Hmmm...I tried it with two Pi Zeros, a 400, and a clean install of Raspbian on a Model B. And also double checked the file via Windows 10 and can't get that error. My suspicion is that you might have a corrupted version of the unzip utility.

So we'll go for Plan B instead. I'm assuming that you are using Windows to get to your Pi4 via ssh. If so, then download the zip file onto your Windows PC and unzip it there, then download WinScp https://winscp.net/eng/index.php and create a connection to your Pi4 that way. Then you can copy and paste the unzipped folders onto the Pi. Once they are copied across go back to your ssh connection, navigate to where you put the folder, and continue from the chmod instruction

Fingers crossed for this attempt :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-835464726, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFI26UBZCXPBKALODFDTMWAHPANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Good idea on using the USB stick to transfer the files and I'm glad you got it working

In answer to your questions: It doesn't have to be the only thing on the SD card. As you are using a Pi 4 then you should be able to run other things at the same time. Usually with an all sky camera it is mounted outside in a weatherproofed housing and dedicated just to taking images of the sky. But there is nothing to stop you using it as you want from indoors and turning it on and off when you want. I have mine indoors pointed out the window but running all the time.

It will start automatically on boot. It is set up as a cron job, so runs from the timing triggers in the Pi. To stop cron running use SSH and the command sudo service cron stop and to restart it use sudo service cron start

Viewing the images, etc is just through the website on the local network. It was designed to be as simple as possible so it could just be left running. For that reason I hadn't written in anything for manual removal of old images via the web pages. They can be removed manually via SSH. The current set of images and videos are saved to /var/www/html/day/ and /var/www/html/night/ The history is in /var/www/html/history/ The history folders have the Unix timestamp included in their name, so lowest number is the eldest. Don't forget to use sudo with the remove command

jmrp12345 commented 3 years ago

Mark - thanks for the info

excellent program - effortless installation - good www setup for viewing

FYI I forget to mention some errors displayed on install:

cannot open /home/pi/Mognet-All-Sky-Caera/back-end/websameday*.jpg could not find codec parm for stream 0 cannot remove /var/spool/cron/crontabs/root

Question:

how to focus - I use raspistill -t 0 is it safe to use sudo rm -f *.jpg to remove all files in a folder how many images saved before they are overwritten can one set limit to number of images

see Sun Times-Camera Video Mode how to change "night" times

see Raspberry Pi All Sky Camera how could one run a movie(MP4?) of all *.jpg in one session is this what Video does try to run Video get ERROR 404

what is default exposure time how to control exposure from day to night how to change time interval when images are taken

can files be saved directly to USB stick

what is time zone used what is time if no internet connection


From: MarkGrimwood @.> Sent: May 8, 2021 5:38 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Good idea on using the USB stick to transfer the files and I'm glad you got it working

In answer to your questions: It doesn't have to be the only thing on the SD card. As you are using a Pi 4 then you should be able to run other things at the same time. Usually with an all sky camera it is mounted outside in a weatherproofed housing and dedicated just to taking images of the sky. But there is nothing to stop you using it as you want from indoors and turning it on and off when you want. I have mine indoors pointed out the window but running all the time.

It will start automatically on boot. It is set up as a cron job, so runs from the timing triggers in the Pi. To stop cron running use SSH and the command sudo service cron stop and to restart it use sudo service cron start

Viewing the images, etc is just through the website on the local network. It was designed to be as simple as possible so it could just be left running. For that reason I hadn't written in anything for manual removal of old images via the web pages. They can be removed manually via SSH. The current set of images and videos are saved to /var/www/html/day/ and /var/www/html/night/ The history is in /var/www/html/history/ The history folders have the Unix timestamp included in their name, so lowest number is the eldest. Don't forget to use sudo with the remove command

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-835575535, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFNDK62OKLXIHYLYVSTTMXDQHANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Thanks.

The cannot find codec parm error I think comes from ffmpeg rather than my code. I'll do another clean install and check though, which means I can also check the 404 error when trying to view the video as I've not seen that, although it might happen if the camera is not connected on install. That might also account for the cannot open jpg error. The crontab error I think comes from the original project that I based this on and I suspect it should really have used the crontab -r command

As I use mine headless I used the instructions from https://medium.com/home-wireless/headless-streaming-video-with-the-raspberry-pi-zero-w-and-raspberry-pi-camera-38bef1968e1 under the section Install UV4L and WebRTC to stream video to my browser so I could set the camera focus

If you don't need to keep the images then it's fine to use sudo rm -f *.jpg. They are added to the video at each capture, and then put into the day or night folder once they're done with. There will then be two files left in the directory, the info file and the mp4

There isn't a set number of images or days preserved. The amount preserved depends on the remaining space left on the SD card. At the start of each day or night capture session there is a space check (using df -h) and if the remaining space falls below 2Gb then the oldest history folders are deleted until there is more that 2Gb of space remaining. This is done in newdaymovie.sh and newnightmovie.sh so increasing the values in there would leave more space (note: these two scripts are going to be amalgamated into one in a coming update)

The changeover between day and night videos is calculated from calls to sunwait. They are not set to be manually adjustable, but are recalculated each day so the times are based on sunrise/set for that day

The daytime exposure time is automatic, so the exposure there should always be good. The nighttime one is set to ten seconds (-ss 10000000 in the raspistill call) This is the maximum exposure time allowed by raspistill and works fine for the Pi V2 camera. I don't possess a Pi HQ camera yet, so I don't know if it's a good value to use there too. The exposure times are not varied for twilight times at the moment. Something might be done for those in a future update

The capture interval is controlled by the variables ShotD and ShotN in the script mgasc. Times are in minutes. The script mgasc is the one that gets called every day to set the cron job for image capture, so if you make any changes there you'll need to run that script so that they get picked up.

Timezone used is the one from the RPi, so whatever that is set to is what will trigger the cron jobs. I don't know what will happen if there is no outside internet connection for it to get the time from. I assume there is a way of setting the time manually on the Pi, but I've not looked for it yet.

I think that's it. I'm going to do a bunch of updates tomorrow, which will include a camera enablement on install check (using vcgencmd get_camera which I hope works for the HQ camera too), sorting some of the future improvement ideas, and writing a How It Works section

jmrp12345 commented 3 years ago

Mark - thanks for the detailed response - I appreciate that you address all of my questions I hope that I am not overstaying my welcome:) - my goal is to run your application on a standalone RasPi(battery powered) with TFT 3.5" touch screen and communicate with the RasPi through a RasPi Hotspot(no internet)


From: MarkGrimwood @.> Sent: May 9, 2021 5:37 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Thanks.

The cannot find codec parm error I think comes from ffmpeg rather than my code. I'll do another clean install and check though, which means I can also check the 404 error when trying to view the video as I've not seen that, although it might happen if the camera is not connected on install. That might also account for the cannot open jpg error. The crontab error I think comes from the original project that I based this on and I suspect it should really have used the crontab -r command

As I use mine headless I used the instructions from https://medium.com/home-wireless/headless-streaming-video-with-the-raspberry-pi-zero-w-and-raspberry-pi-camera-38bef1968e1 under the section Install UV4L and WebRTC to stream video to my browser so I could set the camera focus

If you don't need to keep the images then it's fine to use sudo rm -f *.jpg. They are added to the video at each capture, and then put into the day or night folder once they're done with. There will then be two files left in the directory, the info file and the mp4

There isn't a set number of images or days preserved. The amount preserved depends on the remaining space left on the SD card. At the start of each day or night capture session there is a space check (using df -h) and if the remaining space falls below 2Gb then the oldest history folders are deleted until there is more that 2Gb of space remaining. This is done in newdaymovie.sh and newnightmovie.sh so increasing the values in there would leave more space (note: these two scripts are going to be amalgamated into one in a coming update)

The changeover between day and night videos is calculated from calls to sunwait. They are not set to be manually adjustable, but are recalculated each day so the times are based on sunrise/set for that day

The daytime exposure time is automatic, so the exposure there should always be good. The nighttime one is set to ten seconds (-ss 10000000 in the raspistill call) This is the maximum exposure time allowed by raspistill and works fine for the Pi V2 camera. I don't possess a Pi HQ camera yet, so I don't know if it's a good value to use there too. The exposure times are not varied for twilight times at the moment. Something might be done for those in a future update

The capture interval is controlled by the variables ShotD and ShotN in the script mgasc. Times are in minutes. The script mgasc is the one that gets called every day to set the cron job for image capture, so if you make any changes there you'll need to run that script so that they get picked up.

Timezone used is the one from the RPi, so whatever that is set to is what will trigger the cron jobs. I don't know what will happen if there is no outside internet connection for it to get the time from. I assume there is a way of setting the time manually on the Pi, but I've not looked for it yet.

I think that's it. I'm going to do a bunch of updates tomorrow, which will include a camera enablement on install check (using vcgencmd get_camera which I hope works for the HQ camera too), sorting some of the future improvement ideas, and writing a How It Works section

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-835942049, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFLJ2BDS56VQOBXM6S3TM4MD7ANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

That's ok. Questions mean that I need to think about things and push me to add or fix things. And it shows that at least one person has tested it out too 😀

Setting the Pi up as a hot spot sounds interesting. I know it's possible but haven't looked into it fully yet. It was a consideration for another project that never got started

jmrp12345 commented 3 years ago

Mark

why are image and videos saved in /var/www/html/day, night "and" in /history

lost raspistill after installing software to switch to 3.5" LCD display recovered by reinstalling AllSkyCamera

does AllSkyCam reinstallation after a problem create program conflicts?

3.5" LCD does not display raspistill - LCD display problem not AllSkyCam - looking into this for RGB(non HDMI) LCD display

however I noticed that even though raspistill was not working I could record video as *.h264 which can be converted to MP4 and viewed

This gave me an idea :) since you already have infrastucture: can one record 1 up to 10s video time lapse and view/process as for jpeg images as an alternative viewing option - possible? would be informative to view short video time lapse

HQ camera 2028x1080 jpeg images at full resolution 9MB h264 1s video at full resolution 1.5MB

AllSkyCam jpeg images 1MB - is this compressed?

Bob


From: MarkGrimwood @.> Sent: May 10, 2021 11:00 AM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

That's ok. Questions mean that I need to think about things and push me to add or fix things. And it shows that at least one person has tested it out too 😀

Setting the Pi up as a hot spot sounds interesting. I know it's possible but haven't looked into it fully yet. It was a consideration for another project that never got started

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-836969100, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFOVZMC3HCPWN743ULTTNAGKNANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hi Bob

Sorry for the delay. Got caught up in real life, job hunting and doing lots of updates

MarkGrimwood commented 3 years ago

OK, lots of updates done including camera checks on start of autodeploy

Next thing is to do a wiki for more explicit instructions, descriptions, etc

Had an oddity happen when doing a clean install this time - ffmpeg didn't install first time and couldn't see an error message relating. Not sure why. Install fine when I ran the autodeploy again

jmrp12345 commented 3 years ago

Mark hope your job hunting goes well - its been many moons since I had to do any of that but I still remember :) - thanks for the Github update and the acknowledgement

I have been running your program and have found that I can capture images remotely for a 9hr evening through a spare room window with the HQ camera/Canon 18mm lens,RasPi4 (no monitor),4MB RAM and 64GB SD card using less than half of the Anker 20Ahr/2.5 amp power bank - I connect to RasPi WiFi HotSpot from Windows 10Pro computer by Remote Desktop

I have attached one JPG image as an example - you can see that the setting of 10sec works well for night time - even though I can run the MP4 movie file on RasPi - after I transfer with USB stick to Windows 10 and run with VLC I only see a black screen?

I have a Canon 8mm wide angle lens that I will try next

I understand that day time exposures are automatic and that night time images are taken every 2min with exposures of 10sec - the HQ camera limit is ss=200 sec

I have a Tracking mount that I would like to try with longer exposures of 100-200sec

BTW would you prefer that I post on Stargazers Lounge DIY Astronomy forum ? Bob


From: MarkGrimwood @.> Sent: May 13, 2021 1:16 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

OK, lots of updates done including camera checks on start of autodeploy

Next thing is to do a wiki for more explicit instructions, descriptions, etc

Had an oddity happen when doing a clean install this time - ffmpeg didn't install first time and couldn't see an error message relating. Not sure why. Install fine when I ran the autodeploy again

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-840775225, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFJXZGWDQ7TIK7KODOTTNQQPXANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hi Bob

Thanks. It's been a few years (actually fifteen) since I last had to job hunt

Sounds like you are doing well with it now I've made the fixes. Not sure what's happening with the movie file once it's transferred. I did a quick check with VLC v3.0.14 and it plays ok for me. Although to get mine I just did a straight download from the Pi to my laptop via the browser. The JPG attachment doesn't seem to have been attached, unless GitHub has hidden it (I'm new to GitHub having only used BitBucket and Jira for work before)

The wiki is almost done apart from example images. There are descriptions of all the back end scripts and what they do, including which ones to adjust for capture interval and exposure times. To adjust for longer times you'll need to modify capture.sh and newmovie.sh, and adjust the shot times in mgasc.sh

Posting on here is fine while we're refining things. A bit of promotion on SGL wouldn't go amiss though!

jmrp12345 commented 3 years ago

Mark

All the tests I have done so far were from your previous version(May07)

re: image - I have resized the jpeg image and will try to resend as attachment

re: movie I tried transferring from RasPi to Windows using both USB stick from RasPi and email from RasPi file transferred but still only showed as black run on Windows PC

"Houston we've had a problem" I have tried your latest update(2days) from GitHub download to Windows10 - extracted - transferred to RasPi with USB stick chmod -R 755 Mognet-All-Sky-Camera-install cd Mognet-All-Sky-Camera-install sudo ./autodeploy

I noticed that install updates RasPi does it matter what current RasPi version user has currently installed is reboot required after install waited 5min no jpegs in day folder does not work

reinstalled Ver1 (previous version) install very different begins jpegs in folder right away works as before

have I made a mistake installing the new version let me know if there is more that I can do Bob


From: MarkGrimwood @.> Sent: May 15, 2021 12:25 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Hi Bob

Thanks. It's been a few years (actually fifteen) since I last had to job hunt

Sounds like you are doing well with it now I've made the fixes. Not sure what's happening with the movie file once it's transferred. I did a quick check with VLC v3.0.14 and it plays ok for me. Although to get mine I just did a straight download from the Pi to my laptop via the browser. The JPG attachment doesn't seem to have been attached, unless GitHub has hidden it (I'm new to GitHub having only used BitBucket and Jira for work before)

The wiki is almost done apart from example images. There are descriptions of all the back end scripts and what they do, including which ones to adjust for capture interval and exposure times. To adjust for longer times you'll need to modify capture.sh and newmovie.sh, and adjust the shot times in mgasc.sh

Posting on here is fine while we're refining things. A bit of promotion on SGL wouldn't go amiss though!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-841704805, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFMJPEJICZ72EOKZ5ADTN24B7ANCNFSM44MC4YUA.

jmrp12345 commented 3 years ago

Mark Hold the press! I have downloaded the main.zip file directly from your GitHub site to RasPi4 - followed your instructions and everything works fine!

my previous message referred to my attempts to install main.zip as I had done before by downloading to Windows and transferring the files to RasPi using a USB stick - which did not work that time?

did you receive the resized image that I sent to you Bob


From: MarkGrimwood @.> Sent: May 15, 2021 12:25 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Hi Bob

Thanks. It's been a few years (actually fifteen) since I last had to job hunt

Sounds like you are doing well with it now I've made the fixes. Not sure what's happening with the movie file once it's transferred. I did a quick check with VLC v3.0.14 and it plays ok for me. Although to get mine I just did a straight download from the Pi to my laptop via the browser. The JPG attachment doesn't seem to have been attached, unless GitHub has hidden it (I'm new to GitHub having only used BitBucket and Jira for work before)

The wiki is almost done apart from example images. There are descriptions of all the back end scripts and what they do, including which ones to adjust for capture interval and exposure times. To adjust for longer times you'll need to modify capture.sh and newmovie.sh, and adjust the shot times in mgasc.sh

Posting on here is fine while we're refining things. A bit of promotion on SGL wouldn't go amiss though!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-841704805, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFMJPEJICZ72EOKZ5ADTN24B7ANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hi Bob,

Just came on to say I was investigating the problems, and was going to set my spare Pi up as a hotspot so I could test it that way. Good news that you've got it working

Have just been doing a few updates. Removed the bits of script that do the bug fix and security updates in case that was the cause of the problem. According to the official documentation those updates should really be monitored when they are run

I still can't see attachments. Maybe send it via a message on SGL instead

Mark

jmrp12345 commented 3 years ago

Mark

All-Sky-Camera working well

testing latest updates trying different DC power supplies using CanonEFS18-55mm, Rokinon 8mm

Issue: occasionally I get an error: mmal-vc-component-enable:fail ENOSPC

Questions: can I rename Mognet-All-Sky-Camera folder to shorter name how to disable auto start can I shut down in middle of session how to show which version installed is there an error log recorded

Comments: delay in auto start would be usefull: to allow - sudo service cron stop to focus camera before starting a session

will continue testing Bob


From: MarkGrimwood @.> Sent: May 16, 2021 3:09 PM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Hi Bob,

Just came on to say I was investigating the problems, and was going to set my spare Pi up as a hotspot so I could test it that way. Good news that you've got it working

Have just been doing a few updates. Removed the bits of script that do the bug fix and security updates in case that was the cause of the problem. According to the official documentation those updates should really be monitored when they are run

I still can't see attachments. Maybe send it via a message on SGL instead

Mark

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-841878072, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFIWKRGHSQYJYATL5HLTOAYCDANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hi Bob

Not sure of the cause of the mmal-vc-component-enable fail, but from a quick internet search it looks like it could be from two applications trying to use the camera at once. My code is written to check that there isn't an existing capture script running before attempting to run another instance. It's possible that it interferes with something that you are running if it's already running

You can rename the folder, but there will need to be corresponding changes in all of the scripts in the back-end/ folder. Fortunately the folder name is usually in a parameter unless it's a very short script, and there are only four scripts that need to be changed. If you're doing that then stop the cron job then after the changes have been made regenerate the timings (instructions for both below) I did look at making it more flexible but couldn't see an immediate solution when I was writing it. The problem is with the cron job and its choice of working directory and it needs to be told explicitly where to look

The autostart is from the cron job as the setup for that is preserved when power cycling. It can be stopped and removed with the following commands, and then it won't run on start up. It's also fine to shut it down in the middle of a session. This mean that you will be able to sort out focus before the start of a session too sudo service cron stop sudo crontab -r

When you want to restart it after that then head into the back-end/ directory and enter the following command to regenerate the timings and restart the cron job sudo ./mgasc.sh

There's nothing for versioning at the moment, but this will be added later as I have a small bug fix to do. And nothing for an error log so far, but will have a think about it

Mark

jmrp12345 commented 3 years ago

Mark FYI - it has been night cloudy here for 2 weeks - so I have been tinkering with the raspistill options

using the RPi4 and HQ camera I have confirmed that your settings for 10 sec exposures result in an imaging time of 70-75 sec - however I can get imaging times of 12 sec using the following:

raspistill -t 100 -md 3 -bm -ex off -ag 9.0 -ss 10000000 -st -o img.jpg

the values of -ex and -st appear to be important -I find no references to using these settings on forums are you already aware of this - I may post this on raspistill forum if you don't either

could you see if your RPi zero gives similar results - if so would this be useful to you Bob


From: MarkGrimwood @.> Sent: May 24, 2021 8:17 AM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

Hi Bob

Not sure of the cause of the mmal-vc-component-enable fail, but from a quick internet search it looks like it could be from two applications trying to use the camera at once. My code is written to check that there isn't an existing capture script running before attempting to run another instance. It's possible that it interferes with something that you are running if it's already running

You can rename the folder, but there will need to be corresponding changes in all of the scripts in the back-end/ folder. Fortunately the folder name is usually in a parameter unless it's a very short script, and there are only four scripts that need to be changed. If you're doing that then stop the cron job then after the changes have been made regenerate the timings (instructions for both below) I did look at making it more flexible but couldn't see an immediate solution when I was writing it. The problem is with the cron job and its choice of working directory and it needs to be told explicitly where to look

The autostart is from the cron job as the setup for that is preserved when power cycling. It can be stopped and removed with the following commands, and then it won't run on start up. It's also fine to shut it down in the middle of a session. This mean that you will be able to sort out focus before the start of a session too sudo service cron stop sudo crontab -r

When you want to restart it after that then head into the back-end/ directory and enter the following command to regenerate the timings and restart the cron job sudo ./mgasc.sh

There's nothing for versioning at the moment, but this will be added later as I have a small bug fix to do. And nothing for an error log so far, but will have a think about it

Mark

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-847073921, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFPJKP32NAYP2V2RZ53TPJNYNANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hi Bob,

Thanks for that. I'd worked with the code that was there before under the assumption that Pete had already done the research, and l;ooked at the documentation on https://www.raspberrypi.org/documentation/raspbian/applications/camera.md It does look like I should play with the options some more. I need to look closer at things that might be on by default, like --burst, --exposure and --stats as these do look like the source of that additional delay. There doesn't seem to be much information on what happens by default

It's possible that one of them might also account for the oddity I spotted this morning where stars in the very early dawn light seemed to be more visible than in the darkness 10 minutes before

And I know that cloudy night skies problem too! On the rare night when it's not cloudy here the sky also seems to be afflicted with a fine haze. I haven't bothered getting the telescope out in months because of it

Mark

MarkGrimwood commented 3 years ago

OK, so it looks like --exposure off and --stats are the required settings, otherwise the colours come out odd on the NoIR camera. And with the official Pi cameras it should work. It does with both my Pi V2.1 NoIR camera modules, and the WaveShare camera. There is a note under --exposure to say that it depends on camera tuning as to whether the settings are implemented. Given that the HQ camera is an official Pi one then it should work on there too

I've now updated the GitHub code with those changes

jmrp12345 commented 3 years ago

Mark FYI again :) - I am trying to make sense of some results I have been getting - I now understand why your script takes 70s for a 10s exposure - however if you take a timelapse using the same script the first image takes 70sec - looking at the exif data each subsequent image takes 20sec ! - so with your AllSkyCamera set up - because each image is a new image - raspistill has to set up the initial conditions each time - whereas in a timelapse only the first few images are required to initialize - then subsequent images use this setup so that a timelapse session averages out to 20sec for each image - so at the beginning of each night session if the first two-three images are discarded then the rest of the evening will have 20sec exposures using your current raspistill script - is this something you might consider

(using -bm and -ex off and -stats) raspistill must bypass this initial setup since all conditions are already defined so that all images are 10-12sec - exif data gives ISO=6 and brightness=0 - this may be an error? there are things happening in the background with raspistill I have yet to look at

I do not understand yet what "-stats" means looking at raspistill documentation

I am under the impression that your script even though gives longer image times may adjust for sky conditions in the transition to darker skies - your original script might give brighter images under dark skies - I will not be able to test this since I still do not have any clear nights yet !!!

My current setup: RPi4B,RPi HQ camera, Rokinon 8mm wide angle lens Bob


From: MarkGrimwood @.> Sent: June 5, 2021 9:21 AM To: MarkGrimwood/Mognet-All-Sky-Camera-install @.> Cc: jmrp12345 @.>; Author @.> Subject: Re: [MarkGrimwood/Mognet-All-Sky-Camera-install] error main.zip (#1)

OK, so it looks like --exposure off and --stats are the required settings, otherwise the colours come out odd on the NoIR camera. And with the official Pi cameras it should work. It does with both my Pi V2.1 NoIR camera modules, but not the WaveShare camera. That one will only capture every other minute. There is a note under --exposure to say that it depends on camera tuning as to whether the settings are implemented. Given that the HQ camera is an official Pi one then it should work on there too

I've now updated the GitHub code with those changes

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/MarkGrimwood/Mognet-All-Sky-Camera-install/issues/1#issuecomment-855254771, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADCEIFJDAZVFNSEHG7UYY5TTRI6GLANCNFSM44MC4YUA.

MarkGrimwood commented 3 years ago

Hi Bob

I've seen the --timelapse option. Looks interesting, but I don't think I'll use it for my code. I can see that it keeps the raspistill command running so would bypass some of the timing issues.

I've looked at some of the other options too

My current night capture settings are: raspistill -ISO auto -awb greyworld --nopreview --exposure off --stats -w 1440 -h 1080 --contrast 20 -ag 12.0 -dg 2.0 -ss 10000000 -o "$STANDARDCAPTURE" I've upped the analogue gain and dropped the contrast, and this seems to help bring out the stars at night better. A lack of decent clear nights and astro darkness are not helping with testing at the moment, but it's helped with the stars only appearing in the dawn problem I'd mentioned before

Mark

MarkGrimwood commented 2 years ago

As there have been no updates to this issue for six months I think it's safe to close now