FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14257 questions

16893 answers

27806 comments

54564 members

0 votes
149 views 2 comments
by
Hello,

Can we send, automatically, once a day, the "mobile traffic" statistics by email?

Best regards

2 Answers

0 votes
by
Shure. Might need some custom script, though.
by
thanks you very much

i tired
0 votes
by

Hello,

 

Thank you for your question.

 

Unfortunately, setting up this functionality from WebUI would require additional development.

 

Otherwise, you could try setting up an email transfer using the msmtp package and custom scripting. Usually, custom scripts are beyond the scope of the technical assistance that we provide, however, here are some suggestions on what you could try doing.

 

To install msmtp package, log into devices CLI, then in the command line write these commands: opkg update, after it executes write opkg install msmtp. By doing this you have installed the msmtp package into the device. How to set up and use msmtp could be found here: https://wiki.archlinux.org/title/msmtp

 

To get traffic data and write it to a file you could use this command in devices CLI:

ifconfig -a wwan0 | grep bytes >> examplemail.txt

 

To send an email with the data from this file you could use this command (use destination email address instead of [email protected]): cat examplemail.txt | msmtp -a default [email protected]

 

If you would like to automate this task you could use crontabs. More information about crontabs could be found here: https://wiki.teltonika-networks.com/view/Crontabs

 

In addition, to reset transmitted traffic data device should be rebooted, or you could look into the end of the examplemail.txt file and subtract the data amount from the last day‘s amount.

 

As mentioned previously, if a fully functional solution that would be built into the firmware is required, this would require additional development and you would need to contact us directly at:

https://teltonika-networks.com/about-us/contacts/

 

Best regards,

Justas C.

by
Thanks for your help Justas.

I'm going to try.

I will also ask our commercial contact at your place, if we can integrate it.

Best regards