Extracting Data from Pop3 Email
-
Hi all,
I am attempting to use a pop3 email as a data source but am having issues successfully extracting the data. I have a Sigfox device sending kWh readings every 15 mins from 3 modbus devices. There is one email sent per modbus slave device. It was working well with just one device but since adding 2 more devices it is having trouble extracting data.
The email format is:**Modbus Slave 1:** Subject: 209start 15398 end Body:209start 15398 end **Modbus Slave 2:** Subject: 210start 2043 end **Modbus Slave 3:**211start 2113 end.
^ formatting modified by Phil
**Modbus Slave 1:** Subject: 209start 15398 end Body:209start 15398 end, **Modbus Slave 2:** Subject: 210start 2043 end & **Modbus Slave 3:**211start 2113 end.
^ original formatting but inside ``` for not getting italics from the stars
The format for the emails sent from the sigfox backend is configurable but it will be the same for each modbus device. The only thing to differentiate each slave device is the message no. (209, 210 & 211). I have RegEx set up for each data point in this format -
209start (.*?) end
,210start (.*?) end
,211start (.*?) end
respectively. The emails are being received by Mango and deleted from the inbox but its not extracting the data correctly. Is there anything else I can do here? Thanks. -
Hi Robmalone,
I'm not sure exactly where the message formatting of the sample data would be from. It seems like Slave 3 is missing the subject / body distinctions and slave 2 is missing the body. So, is that copied from somewhere or spitballed?
Assuming that is whole message is the body of the email, I would have expected your regex to match on that one. But, if that's an example of three different messages then you'll need to be sure to "Ignore if missing" is checked on all the points.
Something like,
Have you checked the events page to see if there are any related events?
-
Thanks for getting back Phildunlap. The email subject and body are the same for each only the message no. and kwh reading are different. That was my poor copying not different emails. All of the emails read (message no.)start (dataIwant) end, without the brackets. I can change that to something else if you think it would help. The only messages were "no match found" type, not sure of the exact wording. I'll make sure "ignore if missing" is ticked on all points and let you know.
Thanks again. -
Thanks Phil. Looks like selecting the points to ignore if missing did the trick.