Daily Log/E-Mail Aircraft Report directly on your RaspberryPi

What is the category column for?

emitter category:

1 Like

How do you get around gmail rejecting the emails from sendmail?

Hi @TomMuc, the output of the file has comma’s in place of decimal places, apparently a European standard, and I notice the grouping is only on the transponder code whereas it might be more useful (but a larger file) to have flight grouped as well. I noticed when I ran the script first off I got the transponder code with the first flight followed by first seen, last seen etc. but the flight didn’t fly for the best part of the day! All the other flights flown by the same aircraft don’t show!

Cheers,
Mike

nope - flight is not unique and moreover not every aircraft uses a flight number. that was btw. the reason flightaware changed their aircraft-seen from flights to hex. this script is simply about aircrafts - not flights - your site receives over the day. if you want all/different/more detailed data use the database script - there you can get up to 20,000,000 table-rows a day (at least at my site). comma remains because excel starts crazy formatting when period is used. but the great thing with opensource is you can adapt the script in every way you want if you think it then would better meet your needs.

edit: ac_counter == aircraft_counter != flight_counter

edit2: here is a sample what you can get from the other script

i get my email every day - maybe look into your spamfolder - if it is there setup a rule that this in not spam …

It doesn’t make it as far as the spam folder.
<<< 550-5.7.1 this message does not meet IPv6 sending guidelines regarding PTR records and authentication

I spent days googling and trying supposed ‘fixes’ but nothing worked. I could send test emails using other methods (e.g postfix) but not sendmail. Tried on RPi3 and zero.

It has something to do with IPv4 vs IPv6, but I don’t really know what this means. I also think it might have something to do with my isp, but again, I’m guessing.

I also tried setting up DKIM but I hit a wall in my understanding following the instructions.

** I see you’ve updated the OP, I haven’t tried your newest version.

hmmm - sorry no idea about that - maybe related to your network setup? did you try to use a fresh raspbian stretch image and then install sendmail without any kind of personal settings? the thing is there are ways to send authenticated emails from the pi but then one would have to install additional mail classes etc. - and i wanted to keep the setup for the user as easy as possible. i’d give a fresh install a chance - if it then still does not work for you the new version of the script has the option to save the excel/csv-file zipped onto your raspberrys sd-card in user pis home directory. don’t worry about much sd-card writing - the script only once a day writes then about 0.1mb - what is about just 50mb a year :slight_smile:

edit: what do you mean with ‘DKIM’? go for the latest version here Daily Log/E-Mail Aircraft Report directly on your RaspberryPi - #60 by TomMuc

Yea, tried a fresh install. Same result.
I might just have to go with copying the csv.

“Additional guidelines for IPv6
The sending IP must have a PTR record (i.e., a reverse DNS of the sending IP) and it should match the IP obtained via the forward DNS resolution of the hostname specified in the PTR record. Otherwise, mail will be marked as spam or possibly rejected.
The sending domain should pass either SPF check or DKIM check. Otherwise, mail might be marked as spam.”

Is there a way to set your smtp in sendmail? I have set up a dedicated gmail address for my pi to use to send to my ‘real’ email but I can find any info on how to get sendmail to use it.

the script uses sendmail as client not server and gmails open relay not smtp. setting up a mail server and maintain mta etc fills books and is way out of scope of this little script here. i’d really think then this relates to a not so good ipv6 implementation of your isp? but hey - the new ‘log-option’ should perfectly meet your needs :slight_smile:

i did not run the script 24/7 over the last days - because i had to check the additions i made - but you see that i get the mails without any problem …

p.s. maybe the setup of your home-network with ipv6 messes up things?

How do you open the zipped log file?

When I used Remote Desktop Connection and attempted to extract files it says I don’t have the right permissions to extract the files.

I tried plugging in an additional SD card using a external card reader and copying it across. It says pasted with errors because it’s a read-only file system, but doesn’t actually copy the file to the SD card.

you can extract, copy and move those files without any problem via ssh or sftp. i don’t really understand the question?

I’ve done it now using FileZilla.

I was trying to move the zipped log file using Windows Remote Desktop Connection using the GUI on my Raspberry Pi 3.

aah - ok - understand. i don’t have the gui installed yet - but should work via gui user pi too. maybe try real vnc on windows instead of the really poor rdc. but the solution with filezilla gui sftp client i think is more straight-forward than overcomplicating with using a gui on pi via vnc or similar …

Yea, something is messing it up somewhere. I think I’ll give up on it for now. Never thought your script didn’t work, I just thought I must’ve been missing something obvious.

but you always give up - there is no need for! as i said the script in actual version email is switched off by default and you can run it 24/7 and every days new excel-file you’ll find in /home/pi/ac_counter_log directory. so even if there are internal problems in your network the script will work for you …

GIve up? I’ve been researching this problem this whole time! Many hours. Don’t forget, my knowledge of coding can be written on a postage stamp using a whiteboard marker.
Give up on the email I mean, I’ll set it up again and get the csv instead. I’ll just transfer them with filezilla every now and then.

perfect - the data in log directory is exactly the same you’d get via email! so you won’t miss anything …

A little feedback:

  • don’t make people install Sendmail, use package “ssmtp”. Simple to config, also for non-Unix folks. See SSMTP - ArchWiki.

  • your arrays for “email” and “log” are on one line (line 11). Should be 2 lines.

  • the logfile is GZip compressed data but written as “.xls.zip”. This should be “.xls.gz” instead (line 87):

    pi@rpi3:~ $ file ac_counter_log/ac_2017_10_21_21.xls.zip ac_counter_log/ac_2017_10_21_21.xls.zip: gzip compressed data, from Unix

Instead of “hosting” the code here, a GitHub-repo seems a better fit IMHO.
Anyway, keep up the good work! :smiley:

cheers
tom

p.s. cool avatar - like it :slight_smile:
btw. same with csv-file extension ‘.xls’ - this way one isn’t forced to go through the boring, lame and stupid microsoft import dialog - instead the file directly opens in excel despite it is a plain csv-file