Author Topic: Message Handler  (Read 9011 times)

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #45 on: June 19, 2019, 08:40:01 AM »
Archie;

I am in the field today. I will look at it tomorrow.

Thanks,
Dave

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #46 on: June 21, 2019, 07:57:07 AM »
Dear Sirs;

Funny I was able to do this before? I am stuck on your instructions of how to install the new message handler.

Right Click on AdvancedHMI project click add existing.

I can't seem to find it.

Thanks,
Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #47 on: June 21, 2019, 08:34:50 AM »
You can also click once on the AdvancedHMI project in Solution Explorer and Ctrl-Alt-A

If the current MessageHandlers are in a sub-folder, be sure to click on the folder. Otherwise you will get 2 copies and generated a slew of errors.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #48 on: June 21, 2019, 09:16:07 AM »
Archie;

On the email form I have messagehandler1 and 2 these 2 where developed with the old messagehandler. After adding existing from the messagehandler download. (It did ask me to replace files). I added messagehandler4 I will send a pic of the properties window to your phone.

Attached is the error and event files. The 8:04 email was sent and received! This was using the old message handler. The others where not received, maybe not sent using the new message handler.

Thanks,
Dave

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #49 on: June 21, 2019, 09:49:01 AM »
Archie;

Ok I erased messagehandler 1 and 2 from the form. I did the add to existing and loaded the six files unzipped in the folder. Added messagehandler1 to the form and tried it. It worked! No error log 1 message sent in the event log and 1 message received.

I am now at my 5 email limit, so I will have to wait 4 hours before I can test it more.

You talked about a multi thread emailer. Right now I am setting 1 to value, I assume setting it to two will now send the email to what is in the emailer file 2nd on the list. If it was at 1 and I change it to two will it finish out the emails from one? And does acknowledge still interrupt it? If so how does it know to interrupt 1 or 2?

Thanks,
Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #50 on: June 21, 2019, 10:00:33 AM »
You talked about a multi thread emailer. Right now I am setting 1 to value, I assume setting it to two will now send the email to what is in the emailer file 2nd on the list. If it was at 1 and I change it to two will it finish out the emails from one? And does acknowledge still interrupt it? If so how does it know to interrupt 1 or 2?
Yes, it will send to the recipient for message 2 while continuing to send for message 1. Setting Acknowledge will stop all messages from sending further emails.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #51 on: June 21, 2019, 02:41:49 PM »
Archie;

I setup a button that increments the value of Messaghandler1.Value by 1.

When I run the program, I press the button wait 15 seconds, press it again, wait another 15 seconds press it again.

I should get emails from alarm1, then alarm 2, then alarm 3, then alarm 1, then alarm2, then alarm3, then alarm1, then alarm2, then alarm3.

It seems the last alarm turns off the others as I get an email from alarm1, then alarm2, then alarm3, then alarm3, then alarm3.

Thanks,
Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #52 on: June 21, 2019, 03:09:25 PM »
Can you post your AlarmToEmail.txt file so I can test with the same thing.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Message Handler
« Reply #53 on: June 21, 2019, 03:12:54 PM »
Archie;

Here it is.

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #54 on: June 21, 2019, 03:47:15 PM »
I did find one minor bug:

- In Solution Explorer right click MessageHandler.vb and select View Code
- Go to Line 306 and change m_Value to mm.Subject
Code: [Select]
sw.WriteLine(Now() & " : (1.1)Email attempt for alarm " & mm.Subject & ", to : " & mm.To.ToString)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Message Handler
« Reply #55 on: June 21, 2019, 03:58:33 PM »
After I made the correction to make the EventLog.txt report correctly, I ran a similar test. I set Value to 1, wait 10 seconds, set Value to 2, wait 10 seconds and set Value to 3

This is my event log:

6/21/2019 3:53:18 PM : (1.1)Email attempt for alarm Machine : Alarm =1 - 6/21/2019 3:53:15 PM, to :
6/21/2019 3:53:31 PM : (1.1)Email attempt for alarm Machine : Alarm =2 - 6/21/2019 3:53:24 PM, to :
6/21/2019 3:53:37 PM : (1.1)Email attempt for alarm Machine : Alarm =3 - 6/21/2019 3:53:34 PM, to :
6/21/2019 3:54:18 PM : (1.1)Email attempt for alarm Machine : Alarm =1 - 6/21/2019 3:54:15 PM, to :
6/21/2019 3:54:27 PM : (1.1)Email attempt for alarm Machine : Alarm =2 - 6/21/2019 3:54:24 PM, to :
6/21/2019 3:54:37 PM : (1.1)Email attempt for alarm Machine : Alarm =3 - 6/21/2019 3:54:34 PM, to :
6/21/2019 3:55:18 PM : (1.1)Email attempt for alarm Machine : Alarm =1 - 6/21/2019 3:55:15 PM, to :
6/21/2019 3:55:31 PM : (1.1)Email attempt for alarm Machine : Alarm =2 - 6/21/2019 3:55:24 PM, to :
6/21/2019 3:55:37 PM : (1.1)Email attempt for alarm Machine : Alarm =3 - 6/21/2019 3:55:34 PM, to :

Taka_Y

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Message Handler
« Reply #56 on: October 09, 2019, 01:09:06 AM »
Hello,
I would like to make error log file data by "MessageListByItem".
Can it be used for this MessageHandler.vb?

Best regards,
Taka