agaede2
Member
Does anybody know how to FTP from pi to a desktop automatically? Im trying to send the audio files to my desktop where i have all the calls archived and from there im hosting them so people can go back and listen.
Finally got it figured out. TTD on reboot kept hanging up and would not start, most of the time pulseaudio wouldnt start, most of the time my sound card would not be seen.
To fix this, I made a script that issued the "arecord -l" command to make the pi look for the card. Then i delayed for 10 sec, and then issued "pulseaudio --start". and put that script in crontab -e. Also i have TTD waiting 20 sec to start, then another 20 seconds later darkice starts. So for this has worked for multiple reboots.
Does anybody know how to FTP from pi to a desktop automatically? Im trying to send the audio files to my desktop where i have all the calls archived and from there im hosting them so people can go back and listen.
Well another 24hrs, still getting good detection's. Had to tweak some of the long tones to correct from what I am assuming is the audio card I am using is different from my Windows PC. I also had to tweak my crontab restart command. But haven't had any other issues.
DC31 I ran that status check command and got the same warning [warn] PulseAudio configured for per-user sessions ... (warning)..... I remember reading here that running PulseAudio in System mode is not recommended WhatIsWrongWithSystemWide
here are links to the two python scripts that will upload the audio files created by TTD.
Audioboo upload:
https://drive.google.com/file/d/0B9sLdBjMInCVaThCc0ZOVE9sc1U/view?usp=sharing
FTP upload:
https://drive.google.com/file/d/0B9sLdBjMInCVblR3NmN0bUI5bEk/view?usp=sharing
Then in your tones.cfg section:
post_email_command = ftpupload.py [mp3]
Make sure that the file name matches that of the script. The script needs to be saved in the same directory as the TTD program file. Same for the audioboo script.
You will need to put in all your email and ftp server credentials in the scripts to make them work. In Linux on the pi use the nano text editor or you can sometimes use the plain text editor on your computer to make the changes before putting the files on the pi.
You will need to have an FTP server set up to receive the files from the ftpupload script.
You will need to set up and audioboo.com account and get your special email address to set up the audioboo upload. Then from audioboo, you can autopost to Twitter if you are so inclined.
Jim
here are links to the two python scripts that will upload the audio files created by TTD.
Audioboo upload:
https://drive.google.com/file/d/0B9sLdBjMInCVaThCc0ZOVE9sc1U/view?usp=sharing
FTP upload:
https://drive.google.com/file/d/0B9sLdBjMInCVblR3NmN0bUI5bEk/view?usp=sharing
Then in your tones.cfg section:
post_email_command = ftpupload.py [mp3]
Make sure that the file name matches that of the script. The script needs to be saved in the same directory as the TTD program file. Same for the audioboo script.
You will need to put in all your email and ftp server credentials in the scripts to make them work. In Linux on the pi use the nano text editor or you can sometimes use the plain text editor on your computer to make the changes before putting the files on the pi.
You will need to have an FTP server set up to receive the files from the ftpupload script.
You will need to set up and audioboo.com account and get your special email address to set up the audioboo upload. Then from audioboo, you can autopost to Twitter if you are so inclined.
Jim
so i had a hard time with the python script, but i know shell script. So i got the ftp working, but want i want is if the file DID copy to my server then i want it to delete the file on the pi. Do you know a way to do that?
I use a crontab job to delete the audio files daily. Would that work for you?
That would but if the server goes down and the files dont get copied then i dont want them to be deleted.
You can set up a script to only delete files that are more than X days old. That way they'd stay on the Pi for a few days to increase the odds that they got copied.
Andy
im starting to play with TTD Redundant.cfg. What happends if one or both TTD's cant find the common text file?
Still the same thing, power up the pi and i get a solid green light for 1 sec then nothing.
Ken, How did you get it up and running on the Pi2? Did you simply follow the instructions that Andy has posted on setting it up on a Pi? Or did you download an image and go from there? I have been running a test setup on a Pi2 for a week or so now. It runs fine but I have an awful time getting pulseaudio loaded if I reboot the pi. As long as I stop and restart only TTD, not a problem, it is when I do a full reboot. I haven't really figured out what it is that I do the times that I do get it to load.
I have noticed the audio processes quite a bit quicker with the Pi2. The conversion to .mp3 or .amr used to be 6-7 seconds. now it is more like 2-3 seconds. I am also streaming audio but from the same sound card as TTD uses.
What type of maintenance scripts are you looking for? A daily reboot?
Jim