PDA

View Full Version : Fishbone Email plugin



rbl
2006-12-10, 04:44
I am running the email plug v1.42 in and SS 6.5.0 - 9916.

I put cmd.pm, email.mp3 and pop3.pm in server\cpan\net
I put email.pm and email.mp3 (to be sure) in server\plugins

If on the SB3 I go to plugins/email pop3 then the first time it takes a couple of sconds to check for email and finds it. After that I can not get it to check for new emails. I have also never been able to get it to notify me automatically of a new email either on the display or via playing email.mp3. I have tried various checking times/alert times, and it is currently set to 2mins/60secs. Audible Email Alerts is selected.

Any thougths why it isnt working properly? It is probably irrelevant, but my SS directory is unusally c:\program files\slimserver1.

kdf
2006-12-10, 14:20
On 10-Dec-06, at 3:44 AM, rbl wrote:
>
> Any thougths why it isnt working properly? It is probably irrelevant,
> but my SS directory is unusally c:\program files\slimserver1.
>
The check is very simplistic, so if you are deleting emails from your
email application, it might cause a problem. The check only tracks the
number of emails retrieved, and when there is more, it calls them new.

Also, if you are using gmail, it only allows downloads of email once
then they are gone.

i had planned to improve things at some point, but then I switched to
IMAP and have no POP3 accounts with which to test (gmail doesn't count
as they appear to be deliberately making it annoying to work with)

--kdf

rbl
2006-12-11, 02:04
Thanks for the help. I am not using gmail and I am not deleting emails during this testing phase. Also it only ever finds one email, even if there are several in the account.

The thing is when I go nioto the POP3 Email menu on the SB it only appears to try and update the first time (you can tell because it takes a second or two). After that it never updates, it just goes straight to the that menu level. Every time I go to the next level to check the email contents it does take a second or two to update.

And finally it never notifies me with a message / sound. I even tried setting the check/display times to 1 min/600 secs to make sure I didn't miss the message, but I still never got a message or audbible notification.

Any other ideas?

kdf
2006-12-11, 11:02
I believe that the server no longer allows the simple playback of tracks outside of the music folder, it might require moving the email.mp3 file into your music library and edit the $mailAlert line in the plugin to give the full pathname of the file. using d_command and d_source debugging might show more of what it going on there.

Also, I think you may not have the version that you expect. I just checked my site to find that the link for 1.42 is grabbing the 1.44 version which is for 7.0 builds. I've attached the Email.pm for 1.42 just in case. I'll have to fix the website later.

-kdf

rbl
2006-12-11, 12:59
I checked the version and it is the correct one. I ran it with debugging as suggested, and searched for "mail" and "error" in the log. I found the following lines of interest:

- "Couldn't push into new mode: [PLUGIN.Email] !: Undefined subroutine &Slim::Display::Animation::showBriefly called at C:\Program Files\SlimServer1\server/Plugins/Email.pm line 246."

- "ERROR: Request: Error when trying to run function coderef [Slim::Control::Commands::buttonCommand]: [Undefined subroutine &Slim::Display::Animation::bumpRight called at C:\Program Files\SlimServer1\server/Plugins/Email.pm line 362."

There are a lot of "deprecated" warnings for getCurrentDataStore, setExecuteCallback throughout the log.

I also tried changing the mailAlert line to the following which didn't seem to help:
- "my $mailAlert = Slim::Utils::Misc::fileURLFromPath('J:\My Music\Original (flac)\email.mp3');"

Once again many thanks for your help!

kdf
2006-12-11, 13:48
right. well, I hate to have to say it, but I suspect this isn't going to work.

The plugin as it stands is basically garbage. I inherited it as an orphan, and have ended up letting it rot. 1.43 is targetted for 7.0 builds, and even with that is still suffering from a large amount of legacy code that either wont work or really needs to be updated. I am currently spending some time to convert all of my plugins to 7.0 compatibility. I'm looking into the possibility of rewriting the email plugin essentially from scratch at this point using Mail::POP3Client instead of Net::POP3 and I think it might not be too hard to implement proper message id checking. What remains to be seen is how much effort it will be to backport it to be 6.5 compatible.

Essentially rather difficult at the moment, due to my aforementioned inability to test. However, a quick search/replace on the known command changes results in the attached.

-kdf

rbl
2006-12-11, 14:35
ok - it sounds like I should move over to 7.0. There isn't really much point in you spending a lot of time on a version that will be obsolete soon anyway. Will try 7.0 ....

Once again, many thanks for your help

kdf
2006-12-11, 14:50
Quoting rbl <rbl.2io7wn1165873201 (AT) no-mx (DOT) forums.slimdevices.com>:

>
> ok - it sounds like I should move over to 7.0. There isn't really much
> point in you spending a lot of time on a version that will be obsolete
> soon anyway. Will try 7.0 ....

not a good plan. 7.0 is VERY experimental. 6.5.1 isn't going obsolete
any time soon. There is a very long development schedule for 7.0 as
there is a lot of rewriting planned.

-kdf

rbl
2006-12-11, 14:57
ok - thanks for the tip. I'll try 6.5.1 but I don't suppose that'll make much difference to this.

kdf
2006-12-11, 15:08
Quoting rbl <rbl.2io8tz1165874401 (AT) no-mx (DOT) forums.slimdevices.com>:

>
> ok - thanks for the tip. I'll try 6.5.1 but I don't suppose that'll make
> much difference to this.

i wouldn't hold out much hope for the audible alarm but the code
updates from the last attachement should get you a lot further than
you were.

you can use d_plugins debugging to look for the repeated checking.

-kdf

rbl
2006-12-11, 16:01
Using d__plugins I get the following displayed every minute (presumably this is the plugin looking for new emails)

2006-12-11 22:56:12.1014 Warning: Slim::Music::Info::getCurrentDataStore() is deprecated. Please use Slim::Schema directly.
2006-12-11 22:56:28.0001 Prevent Standby plugin: client 192.168.1.101 in playmode play
2006-12-11 22:56:28.0007 Prevent Standby plugin: setting thread execution state
2006-12-11 22:56:28.0008 Prevent Standby plugin: starting timer
2006-12-11 22:57:28.0084 Prevent Standby plugin: client 192.168.1.101 in playmode play
2006-12-11 22:57:28.0087 Prevent Standby plugin: setting thread execution state
2006-12-11 22:57:28.0088 Prevent Standby plugin: starting timer
2006-12-11 22:58:24.1850 Warning: Slim::Music::Info::getCurrentDataStore() is deprecated. Please use Slim::Schema directly.
2006-12-11 22:58:28.0147 Prevent Standby plugin: client 192.168.1.101 in playmode playout-play
2006-12-11 22:58:28.0150 Prevent Standby plugin: setting thread execution state
2006-12-11 22:58:28.0151 Prevent Standby plugin: starting timer
2006-12-11 22:58:34.0937 Warning: Slim::Music::Info::getCurrentDataStore() is deprecated. Please use Slim::Schema directly.


Using the rmote to go into the POP3 Menu on the SB3 doen't seem to provoke anything to be written to the log.

kdf
2006-12-11, 16:28
Quoting rbl <rbl.2iobub1165878301 (AT) no-mx (DOT) forums.slimdevices.com>:

>
> Using d__plugins I get the following displayed every minute (presumably
> this is the plugin looking for new emails)
>
> 2006-12-11 22:56:12.1014 Warning:
> Slim::Music::Info::getCurrentDataStore() is deprecated. Please use
> Slim::Schema directly.

actually, that would be the attempt to play the audio notification.
Oddly, you should see a log message just before that if d_plugins is
checked.

to fix this warning, change the line:
my $ds = Slim::Music::Info::getCurrentDataStore();

to
my $ds = 'Slim::Schema';

you can do that with any text editor and save the file.

-kdf

kdf
2006-12-11, 20:55
I've managed to fix it up to something that works on my system with my wife's email addy. the initial entry into the plugin is a bit flakey but it does check and it does the audible alert using the Email.mp3 file in the Plugins folder. After any server startup, you'll have to enter the plugin at least once in order to start the automatic email checks.

See the website for v1.44 for 6.5

-kdf

rbl
2006-12-13, 07:41
Great - that is a big step forward. Basically I get the audible notification now when the email comes in and I can see all the emails in the SB3 menu. However when an email comes in the SB3 palys the alert and then stops alogether at the beginning of the next track. Also the visual alert is not shown. Neither of these problems are exactly the end of the world. Thanks very much for getting me this far!