Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.



  • Content Count

  • Joined

  • Last visited

Community Reputation

23 Excellent

About Pete6

  • Rank

Profile Information

  • Location
    Charlotte NC
  1. webcam uses Civil Dawn and Dusk times to switch modes. The camera seemed happier with this. You can select whichever Dawn / Dusk set you wish in lines 218 - 230 in the webcam file. Currently this is set to Civil but it can be changed to Nautical or Astronomical. I display these last two Dawn . Duck times only for information. They do not do anything inside the code. It's an astronomer's tool so I display all the Dawn / Dusk daily timings. Only the Civil times are currently used to switch camera modes and videos.. Hence the Midnight sun text is just informational. I changed one thing in your file. At line 136 twiSetVid=-00:15 # Offset advance or delay for the Video Day / Night switch. I did this to give a 6 minute interval between the camera switching to night mode and the night video start. This is how my system runs currently. There is a text file in /home/allsky named daily_times.txt This is a copy of the table that webcam puts out. It is there purely for reference so that times are accessibly without re-running webcam. Please try this as this is how my Pi Zero W is currently working. Please let me know what happens. Pete Jason-webcam
  2. Jason, None of this should be happening. Could you please either post here or PM me the /home/pi/webcam file. I have no idea what has happened but I will find out. Actually if you need to post it on Dropbox or Google Drive let me have the link. Thanks
  3. Hi Sam, This sounds pretty exciting to me. I have no experience using the HQ camera although I have read all about it. It seems a mighty camera. It should work with AllSky Camera but given the foregoing, I ain't tested it so you are a (the?) pioneer here. I will give you all the help I can which may turn out to be worth exactly what you pay for it... One thing has emerged from testing and that is the Pi (even a 4) seems to take a fair while to completely clear itself after processing an image. This is why we have had so much discussion about how often a Pi Zero can take an image at night. This was also why I limited my image size to 800 x 600 pixels. I hate wasting pixels but It just took too long. There is a utility on the Pi called htop and that will show multiple instances of raspistill if it starts to run into trouble. If this happens just increase the variables shotD (Day) or shotN (Night) which determine how often - in minutes - the Pi takes an image. In general, more frequent images = less time to process them, bigger images = more processing time needed. Pretty obvious. The HQ camera has a larger sensor and higher resolution with more pixels. However it seems to be able to do at least some processing within the device so maybe it will all even out. The Raspberry Pi forum is your friend here and member jamesh is the Raspberry Pi employee who seems to be the oracle of the cameras. Please stay in touch here as this looks to be very interesting. Kind regards Pete
  4. No this is not doing narrow band. In fact I only just got the Raspberry Pi Cam V2 with its Sony IMX 219 sensor to gather enough light down the M12 mount to its 1/4 (I think()" sensor. There us also not IR filter so in fact this is about as wide a band as I can make it. My goal was to make a very cheap but usable AllSky Camera. Using a Pi Zero W you can make a working setup for well under £40 not including the case. Jiberjaber has used a drinks bottle for that. So not too expensive. If you skip using the temperature prob you can assemble the whole device with zero soldering and standard Raspberry Pi parts.. Shortly (within the next couple of weeks) I shall be installing one at my dark sky astronomy club site in (nearly) darkest South Carolina http://charlotteastronomers.org/ Hopefully I shall have a link that I can access from home that I can post here. The club already has an AllSky Cam so if you look at the site you'll find it but that is not narrow band either. This is not really a narrow band game. The idea is to see the whole sky regardless of the weather. Pete
  5. If you want to run a job every 2 minutes, open up webcam and find the part where I write out the crontab file and stick a line or two in there. There are plenty of examples in that code . echo "*/2 * * * * $HOME/myjob> /dev/null 2>&1">>$HOME/webcamcron should do the trick. That way it will get written to the crontab file each day when webcam runs itself and writes a new crontab file.
  6. Good. I am glad it is working now. I thought you would have done the mods but I really wanted to publish my findings so that in the future people do not have to go down the same hole. It is clear that the Pi Zero W has a lot less computing power than the Pi 4 but it also generates a lot less heat and is far, far cheaper so you can build my little box for less than £40. Of course it has to work and perhaps I was a little premature in publishing. I thought it worked. Mine did, well pretty much... It was just a few tweaks to the Pi Zero W version that were needed. I shall update the README.MD to reflect the new settings on Github and it should be good to go. You have given me a lot of help so thank you Jason. I could have had a far worse early implementer than you. Please let me know how it works in the longer term. Pete
  7. @Jason, I am going to try Install UV4L and WebRTC when I get some free time. That was a nice find. Thanks. I like the weather station integration. Editing the webcam.php is just fiddly, not hard and it looks perfect. It looks as if you are making real progress here. I too have been testing. As I said a few days ago, I have increased the gap between switching the camera from night to day and the start of the night video to 6 minutes. Combined with a 5 minute shot interval this has performed flawlessly the last 3 nights. I reccomend that you try these timing as well. # Shifts camera mode time at Day / Evening Twilight 121 # For the dusk camera mode 122 # HH:MM Not used anymore 123 SSet=-00:00 # Advance or delay when the camera switches from night to day. 124 SSetP=00:00 # Camera switch time. Needs to be at least 1 minute EARLIER than the Video switch time. 125 SSetVid=-00:00 # Offset advance or delay for the Video Day / Night switch. 126 127 # Shifts camera mode time at Evening Twilight / NIght 128 # For the night camera mode 129 # HH:MM 130 twiSet=-00:00 # Advance or delay when the camera switches from day to night. 131 twiSetP=-00:09 # Camera switch time. Needs to be at least 1 minute EARLIER than the Video switch time. 132 twiSetVid=-00:15 # Offset advance or delay for the Video Day / Night switch. 133 134 # Number of minutes between movie frame concatenation. Default here is 10 [minutes] 135 concat=10 136 137 # Minutes between movie image copies. Default is 3. 138 # raspistill can take up to 1 minute 45 seconds to process a night time image. 139 cap=3 140 141 # Interval for raspistill to take shots. Night time needs to be longer since raspistill needs longer at night to complete. 142 shotD=2 # Daytime shot interval. Default is 2 [minutes] 143 shotN=5 # Night time shot interval. It can take raspistill up to 1 minute 45 seconds to process a night time image. Default is 4 I also edited /home/allsky/pics/newnightmovei.sh and removed the comment s at lines 39 and 40 that perform the 2nd check for the presence of a webcam-*jpg file with which to start a new night video. Last nigh this worked well too. I really want to let this run for a few days to make sure but felt that I needed to continue to contribute to my own project. 35 # Check the essential presence of raspistill webcam-*.jpg file(s). If none, wait for one to be created. 36 while [ ! -f /home/allsky/pics/webcam-*.jpg ]; do sleep 1; done 37 /bin/sleep 5 38 # Do it again just in case concatxxx ran meanwhile. 39 while [ ! -f /home/allsky/pics/webcam-*.jpg ]; do sleep 1; done 40 /bin/sleep 5 Pete
  8. root@0W-AllSky:/home/allsky/pics# ls -l total 10808 drwxr-xr-x 2 root root 4096 Apr 29 18:16 b -rwxr-xr-x 1 root root 1329 Apr 19 20:47 concatday.sh -rwxr-xr-x 1 root root 1341 Apr 19 20:47 concatnight.sh -rwxr-xr-x 1 root root 299 Apr 30 08:24 copypic.sh drwxr-xr-x 2 root root 20480 May 18 20:50 day -rw-r--r-- 1 root root 9476568 May 18 21:05 movieday.mp4 -rw-r--r-- 1 root root 624245 May 18 21:35 movienight.mp4 -rwxr-xr-x 1 root root 150 Apr 4 19:52 movie.sh -rwxr-xr-x 1 root root 2528 May 14 22:54 newdaymovie.sh -rwxr-xr-x 1 root root 2515 May 15 21:04 newnightmovie.sh drwxr-xr-x 2 root root 12288 May 18 21:35 night -rw-r--r-- 1 root root 447810 May 18 21:35 webcam-1589852161.jpg -rw-r--r-- 1 root root 447810 May 18 21:35 webcam-1589852342.jpg I can post the code for any/all my files as you wish. If you PM me I can set up a temporary remote SSH for you. That way you can copy them directly. I'll just change the passwords for your session. I really want your system to work. This AllSky Camera is really frustrating to fiddle with because you only get one sunset per day. Did you see the little trick I posted for focusing. You MUST have the console connected for this to work 'cuz that's were the images will be displayed. service cron stop raspistill -k service cron start
  9. Well maybe your camera is delivering images of a different size to mine. As downloaded and with a Pi Cam V2 it should work. The 110Kb file limit was set up for and is stopping all white image files on my Pi Zero W system. Could it be that your system is producing files that are smaller? If so the 110Kb limit certainly needs to be changed. Here is a ls - l dump from my Pi Zero W system
  10. What you are experiencing is exactly what happened to me. Once it works, it just goes on ticking. I am seeing about 22 second night videos and over a minute for daytime. This agrees with the other 3 Pi 3 and 4 systems running alongside.
  11. Thank you. You are right it is err, voluble. I am pretty sure after testing this device for some months that the problem is that raspistill does not clean up after itself very well. SInce I am launching a new instance every 4-5 minutes and I know the image takes approx 1m 40s from prompt to prompt I am forced to conclude tha it is doing other things that take longer after the image is complete. What I do not know but htop shows numerous instances of raspistill if I reduce the shot time. On a Pi 3 or 4 a safe [removed word] time is 4 minutes but it seems that on a Pi Zero W, 5 minute intervals are needed. Once the intervals are set correctly, the AllSky camera works fine. I have 4 of them running here and one is a Pi Zero all the others have been running flawlessly for over a week. SO I just need to fix the Pi Zero timing and we have a very cheap AllSky Camera. Pete
  12. My Pi Zero W system just switched flawlessly from day to night. I have a 6 minute difference between the camera switching modes and the night video starting. This has worked two days in a row. The 3 Pi 3 and 4 systems have never had a problem with this change so It is like most things with my little project here, just a question of tweaking it until it does what you want. I am going to leave this running like this for another couple of days until I change newnightmovie.sh and remove the comment I referred to earlier. This is really getting close now to where I think it is reliable with a Pi Zero W. This makes for a really cheap AllSky Camera. The waterproofing on the objective is for sure a concern. Water ingress at the edges is not what you need.
  13. Love the pics. This is the way to do it on the cheap. I have seen one AllSKy Cam https://interactiveastronomy.com/skyeye.html that costs over a 1000 quid.
  14. Sorry for the delay. Life got in the way again. I need to answer your questions. Yes that is the bit of code to comment out. I have found that just re-running /home/allsky/webcam often causes problems. I believe this to be due to cron running one job, usually raspistill and then being told to run another again, usually raspistill again and it does not seem to like that. This goes double at night because of the longer processing time. This is puzzling to me since the CPU load is always low. However the Pi 3 and Pi 4 systems are a lot more forgiving than the Pi Zero, I now have a 2nd Pi Zero W and I'll build that up on my bench to see how quickly I can break it. Good news now. The changes I made this morning (or was it yesterday) of commenting out the code in newnightmovie.sh and in webcam seem to have worked tonight for the Pi Zero. The night video just (15 mins ago here) changed over flawlessly. I intend leaving it like this for a couple of days and then I shall try uncommenting the line in newnightmovie.sh as logic says I need that line to make it foolproof when creating the video each night. My feeling is that the increased time between the camera mode switch and the creation of the night video. We shall see. Time will reveal all. Hehe
  15. I am making some headway with the Pi Zero W not starting the night video. As you know the night still shot interval is 5 minutes and there is only 3 minutes between switching the camerat to night mode and starting the night video so, that needs to change. Worst case this interval would be 2 + 5 = 7. minutes. Also I need a still image to make a video with and I need that to be only a night time shot so initially what I did was to just wait. That did not work due to the 2, 5, 10 minute cycle of shot and concatenate. This was complicated by the asynchronous nature of Mother Nature changing sun times daily. Finally I opted to wait for a new still pic to arrive, concatenate that to the DAY video, wait for another (since a regular concatenate event may have occurred) and use that as the start of the NIGHT video. I did the same in reverse for the day video. What I did last night was to remove the 2nd wait period. I now attend night time today with anticipation. I hope it works. If it does not then it is just one more thing not to try. If you look at /home/allsky/pics/newnightmovie.sh and newdaymovie.sh you can see where this may need changing. It is commented so should be findable. Here is what I changed in /homw/allsky/webcam Lines 127 - 132 # Shifts camera mode time at Evening Twilight / NIght # For the night camera mode # HH:MM twiSet=-00:00 # Advance or delay when the camera switches from day to night. twiSetP=-00:09 # Camera switch time. Needs to be at least 1 minute EARLIER tha$ twiSetVid=-00:16 # Offset advance or delay for the Video Day / Night switch.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.