Go to advanced search

by eccentricdyslexic
Wed Jan 08, 2020 5:39 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Ok, i got this to work (hopefully...will be sure tomorrow!) if testmode == "yes" or sunrise <= ephem.localtime(ephem.now()) - timedelta(hours=0, minutes=60):#if its an hour before sunrise or test mode Turns out sunrise is a datetime object after beeing converted by the localtime function. Thanks for...
by eccentricdyslexic
Mon Jan 06, 2020 7:46 am
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Thanks, will delve more into it and let you know how I get on.
Cheers
Steve
by eccentricdyslexic
Sun Jan 05, 2020 9:43 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Ok had a play and the error is this - Traceback (most recent call last): File "timelapseV3.py", line 22, in <module> print "ephem time plus hour = %s" %ephem.localtime(ephem.now() + ephem.hour) File "/usr/local/lib/python2.7/dist-packages/ephem/__init__.py", line 467, in localtime timetuple = time.l...
by eccentricdyslexic
Sun Jan 05, 2020 9:09 am
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Ok, script runs from crontab at reboot at 4 am everyday. Woke this morning and found the script is not working as i used too. Seems to hanging on the add hour bit - Date & time program started = 2020/1/5 04:00:15 Next sunrise = 2020/1/5 08:38:33 Next sunset = 2020/1/5 17:31:53 Minutes between next s...
by eccentricdyslexic
Sat Jan 04, 2020 9:48 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Ok, I’ve added the extra code and it should log now, so will ssh in tommorow and see what’s reported:-)
Thanks for your help mate
Steve
by eccentricdyslexic
Sat Jan 04, 2020 5:39 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

this triggers it -

Code: Select all

while ephem.localtime(ephem.now()) <= ephem.localtime(home.next_rising(sun)):
                time.sleep(1)
                dostuff()


by eccentricdyslexic
Fri Jan 03, 2020 9:30 am
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

I must have missed something, here’s the first half of the code- import sys import os import time import ephem from datetime import datetime from datetime import timedelta #find local time of sun rise and sunset sun = ephem.Sun() home = ephem.Observer() home.lat, home.lon = '45.226691', '0.013133' #...
by eccentricdyslexic
Thu Jan 02, 2020 10:53 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Hi David. I did as you suggested, But the code didnt trigger. It worked fine in the original quoted code- if testmode == "yes" or sunrise <= ephem.localtime(ephem.now()): But this is not triggering an hour earlier as hoped- if testmode == "yes" or ephem.localtime(ephem.now()) >= sunrise - datetime.t...
by eccentricdyslexic
Wed Jan 01, 2020 9:46 am
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Thanks David. You are right, woke up this NY morning and the script had not triggered.
Will amend as you suggest and see if we are back up and running.
Cheers
Steve
by eccentricdyslexic
Tue Dec 31, 2019 9:19 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Re: Simple python question

Yes I believe so.
Many thanks
Steve
by eccentricdyslexic
Tue Dec 31, 2019 7:12 pm
Forum: Python
Topic: Simple python question
Replies: 17
Views: 833

Simple python question

I do t want to get this wrong, but how do 8 minus off 60mins of this sunrise calc- if testmode == "yes" or sunrise <= ephem.localtime(ephem.now()): It triggers some code at sunrise, but I want it to trigger an hour early. Do i do it like this? if testmode == "yes" or sunrise <= ( ephem.localtime(eph...
by eccentricdyslexic
Tue Nov 26, 2019 11:36 am
Forum: Python
Topic: ImgMagick error
Replies: 0
Views: 105

ImgMagick error

All of a sudden my python timelpase pi is not working. I've not made any changes but im getting this error - [crop @ 0x1268340] w:1440 h:1080 -> w:2592 h:1458 [crop @ 0x1268340] Invalid too big or non positive size for width '2592' or heig ht '1458' Error opening filters! I've uninstalled and reinst...
by eccentricdyslexic
Fri Nov 08, 2019 11:26 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Before I go js I am trying convert -resize 1000x700
Will let you know tomorrow if it works:-)
by eccentricdyslexic
Wed Nov 06, 2019 8:41 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

So.... I need to install java on the pi and replace string...args with “latest image.jpg”, 1200x740 ?
by eccentricdyslexic
Tue Nov 05, 2019 8:04 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Yes I’d like to keep the hi res for the timelapse so your idea sounds good, what js did you use?
Steve
by eccentricdyslexic
Tue Nov 05, 2019 2:33 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Thanks all, I have it working fine, but my internet connection is very very slow, the Hd pictures from raspistill take ages to upload. Can I still take the picture hd then scale it down before sending it to the folder where apache picks it up from?
Cheers
Steve
by eccentricdyslexic
Sun Oct 06, 2019 6:24 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Cool, will look into it,

Steve
by eccentricdyslexic
Sat Oct 05, 2019 10:37 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Great, I e got it working, crontab mv the img from home to var/www/html every minute.
Now, I want to share it with others, how to secure my pi?
by eccentricdyslexic
Sat Oct 05, 2019 9:14 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

ok peeps, i have upgraded to Jessie and installed Apache. I have changed my dawn to dusk time lapse script to always keep the latest image on the home/pi. I have followed Neil's instructions and created index.html with the suggested code. I can view the standard Apache web page when i point my pc to...
by eccentricdyslexic
Sun Sep 22, 2019 7:58 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Could I transfer the most recently taken pic to a pc (always on) on the local network and use that to host the webpage for exterior viewing?
by eccentricdyslexic
Wed Sep 18, 2019 9:14 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Well, I'm in France, the pi is watching the going's on a rented house of mine...(the mother in laws!) in the Uk.
by eccentricdyslexic
Wed Sep 18, 2019 7:45 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Problem is it's gonna be a ball ache to retrieve it from its current remote position to swap cards, not to mention the rigmarole of setting up the static id and stuff. If I could upgrade from ssh, to a recent enough rasbian so I can run Apache, that would be a better solution for me. I don't want th...
by eccentricdyslexic
Wed Sep 18, 2019 5:58 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Is it pretty straight forward...and will I have to reinstall everything?
by eccentricdyslexic
Wed Sep 18, 2019 2:42 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

Looks like i have to upgrade to Jessie...hope it doesn't break things... either that or skip hosting and upload the pic every minute..
by eccentricdyslexic
Wed Sep 18, 2019 12:11 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 45
Views: 3055

Re: Upload a pic every minute

yes, apt-get you mean? i get - After this operation, 4,631 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap apache2.2-bin apache2-utils apache2.2-common apache2-mpm-worker apache2 ssl-cert ...

Go to advanced search