Send Data on email using GPRS

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

User avatar
AbhijitR
Posts: 300
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 283 times
Been thanked: 80 times

Send Data on email using GPRS

Post by AbhijitR »

Hello!
good afternoon

May i request to help me understand or suggest a starting point, i want to work on a project where i can transmit data (it could be status of any sensor or any analog value) using data connection from SIM card or mobile service provider. I want to transmit data to some email address or web page over certain period of time, unfortunately clueless for the moment where to start.

I search for a while on the forum but did not got any clue, can someone show me the first step.

Thank you.

Abhi

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Hello AbhijitR

I am working on similar project with GSM SIM7600CE module.
What module do you plan to use?

User avatar
AbhijitR
Posts: 300
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 283 times
Been thanked: 80 times

Re: Send Data on email using GPRS

Post by AbhijitR »

Hello! Viktor
Good afternoon

Many thanks for your reply.

I have 2 modules, one is SIM800A and another one is SIM800L EVB, mentioned as V2, to be honest I am not aware why mentioned as V2 for this module, probably some more functions are available.

When I purchased this modules in the past I thought of making a project to send and receive SMS, but unfortunately I did not worked on that too.

I hope the modules which I have for the moment will be useful, the one which you mentioned is Industrial grade, if I am not wrong and so expensive too.

Thank you again, hope to hear you soon.

Abhi
Attachments
20220510_103448.jpg
20220510_103448.jpg (82.21 KiB) Viewed 26910 times
20220510_103426.jpg
20220510_103426.jpg (111.35 KiB) Viewed 26910 times
20220510_103403.jpg
20220510_103403.jpg (87.26 KiB) Viewed 26910 times

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi Abhi

I think first off you need to decide what "data" you wish to send and also the format. This could possibly be dictated by the receive equipment (web page / database / microcontroller etc).

Many options available including various "push services", IFTT etc which could be of help in that you just send a "key" to their service and they do the rest so to speak. I've not done anything for a while and I think the last time I did do anything, possibly about seven years ago, I used "Post / Get" to a MySql database via a PHP interface.

I think there is a Flowcode GSM course you can download which may be of help.

Regards

User avatar
AbhijitR
Posts: 300
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 283 times
Been thanked: 80 times

Re: Send Data on email using GPRS

Post by AbhijitR »

Hello! Chipfryer27
good morning

Thanks for your post, now the ball is in my court, :)

I want to transmit analog value of one of the sensor which will indicate the level of water. As far as i know after reading few datasheets there are 3 different type of transmission modes SMS, Email and FTP, right?

So i think the third one can be used to transmit and display the data on a webpage, do i understand correct?

By the way what is easy to begin with the project sending email or data on webpage, i think email, is it? if so how can i start with that?, Is it also possible to attach a file (for example *.csv) along with this email?

One more doubt, if the data hast to be send on the webpage do i need to also know how to make a webpage which will display the vale or it is someone else's job, if so then what is the data format he need to process and display on the page, this sounds difficult for the moment to me as a beginner.
I used "Post / Get" to a MySql database via a PHP interface.
How does the above work?
I think there is a Flowcode GSM course you can download which may be of help.
Did you mean this document, CP2832, GSM Communications.

Thank you again for your time.

Abhi

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi Abhi

How do you intend to receive the data and how to process? It could be a web page or even a microcontroller and of course the processing of the data will be different depending on target.

You could send SMS to another GSM receiver and have a PIC / whatever process that data or you could create a connection to a web page and populate database field(s) using POST or the like depending on need, leaving the processing to the database application.

Creating a connection to whatever and then sending a string sounds a lot easier than Email / FTP which I don't think suited to just sending value(s) now and again, especially if only a few bytes or the like.

You really do have many options, based of course on how you will Rx / process.

The GSM course utiises the RS232 port to send AT commands etc and gives a nice entry to the subject.

Sorry to be brief, a little tied up just now.

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi Abhi / Victor

It's been ages since I used any GSM module but I think I still have a SIM800 kicking around so I might try and dig it out.

One way to potentially store remote data is to create a database on a PC and have the remote module populate directly, but first I need to figure out getting the SIM800 "online". Might try that this weekend :)

Regards

User avatar
AbhijitR
Posts: 300
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 283 times
Been thanked: 80 times

Re: Send Data on email using GPRS

Post by AbhijitR »

Hello! Chipfryer27

Your time is my time my friend, i wait eagerly for your post, by the time i will read as much as possible on internet.

Thank you again.

Regards
Abhi

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

Whilst I've not had time to dig out my module, I have had some thoughts.

The SIM800 is a 2G module (2nd gen GSM). This depending on country could be a quite short lived solution. Whilst 2G is supposed to be operational until 2033 major operators in the USA have already shutdown their 2G services and in the UK Vodafone and EE announced they will no longer offer 2G/3G service after 2023. No economic sense to continue with service. With that in mind I'll probably start looking for a different module.

For collecting your data for further processing there are a few "cloud" services, some free, and some Open Source you can deploy on your own server. Most online services do offer some form of free service, but this is usually quite limited in the number of devices that can connect and have data limits, or really just to test with.

Thinger.io is just one of many and they offer a limited free service with good examples of how to connect using ESP's and Arduino's etc using WiFi / GSM Modules etc. It really is a good starting point in my opinion even if only to illustrate what can be done. You could be up and running in no time at all.

SiteWhere.io is a more complicated offering that you host on your own server (or on AWS or such like) but maybe not really for beginners in such things. Totally free and your data is not held by a third-party.

Using any of the above means you just have to create a "gadget" to collect your data and send it, no need to construct any receive equipment (unless you want to). Connect to GPRS and send a packet, job done :)

Edit...
Just went on to Thinger and some of their example links are broken. The "free" version doesn't appear to allow the HTTP API to be installed which might limit how you connect.
Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Hello chipfryer

Thanks for raising point about 2g/3g.
In South Australia 3g is not used (as well) by Optus network (I am with it).
I looked (a few years back) at SIM800, but moved to Sim7600ce-T Arduino shield (retired product) and other Sim7600 modules.
What is important: there are some Sim7600 IDE Arduino libraries online (possible to convert to FC8 code).

Web services suggestion by chipfryer27.
Thank you again.

Thinger.io IoT platform
About the Thinger.io data (bucket).
One table row can have up to 99 values. Values can be a float, integer, etc.
If you use a float, the table data can be very 'heavy'. I am not sure about the sim-card (network service fees), but it will take some $$ to transmit that data.
One more point: you don't have direct access to Tinger.io database, (don't you? Correct me if I am wrong).
----------------------------------
For my project I want to use the GSM module to help me to monitor the home security by sending me the SMS only.

I thought about the next model:

Arduino Mega is a Modbus Master with up to 32 slaves/nodes. Modbus allow you to use the long wire/cable with good results.
Each slave (based on Nano/Uno) can have up to 8 (or more) coils. Each coil can represent the on/off state of one sensor (door, smoke alarm,window, etc. ) This slave or another one can collect the integers (floats if you want to) to tell user about the temperature, humidity, lux level, etc.
Mega Modbus Master will save data as .csv file (one file for one month). Each row in this file will be recorded only if node/slave coil will return to Modbus master value 1 (or if the value is changed).
If we design the .csv file with database table in mind the data will look like:
4MaySeptic.csv
4MayZoneCoils.csv
4MayZoneValues.csv

If coil returns 1 -> Mega will command SIM800 (etc module) to send to User the sms message.


Zones can be:

Home, Shed1, Front Gate, Green house, Shed2

If we use Raspberry Pi running Linux with Xampp webserve
r (xampp is free) with (as example) database table ZoneCoils, the rows in db table will be the same as .csv file:
Day, Time, Zone, ZoneTitle, Doors, Windows, Flood, Smoke, PIR
2May, 14-36, Zone1, Home, 1, 0, 0, 0, 1

Master is sending SMS via SIM module to user if any coil returns 1.
------------------------
Win10 webserver (on your own PC)
If you want to, you can run Xampp webserver on your PC (Win10).
By using some free graph bulding code (for PHP) you can get data from RPi and visualise this data. I think it is even possible for Win10 to collect data fromRPi3 if you don't want to do it manually (after receiving SMS).
------------------------
I have stopped working on that project right now as I don't have time.
However I think it can be done.
What is more important: you have 100% control of every stage of this project.
You can change the modbus modules, webserver on RPi3, webserver on Win10. You can change tables, use only bools, bytes if you want too and by doing that lower the data Tx time and load on the network and $$ as well.
-----------------------
Problems with above project:
- You need to know MySQL, PHP, Java.

Suggested Thinger.io IoT platform (and others) offer some 'free' service, but you have less control.

PS
I think it is very important (in case you develop the MySQL based project) to start with MySQL database tables and connections between them and only after move to FC8 programming.

Any suggestions welcome.

User avatar
AbhijitR
Posts: 300
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 283 times
Been thanked: 80 times

Re: Send Data on email using GPRS

Post by AbhijitR »

Hello! Chipfryer27
good evening

Precise answers, you are too good while answering the doubts.

Regarding the data collection and process, i think it is too early for me, as a beginner i shall first try to display the data on the webpage, if this task is achieved then i shall take the next step of storing or processing it.

As you mentioned i shall check the free websites first and see if i can send data to a webpage.

Thank you again for all your time and information.

Abhi

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi Viktor

Completely agree that in cases like these you are best to start at the receiver end as it defines how your data needs to be sent.

If needs are modest then it's quite feasible for most to build based on LAMP / WAMP installs and I did so a few years back. I wasn't populating by GSM, instead I used an ESP8266 connected to my WiFi router to send based on GET/PUT (if I remember correctly). It isn't too difficult and a relative beginner could probably get something running from scratch in a weekend, just by searching "how do I do blah in MySql" etc. Same for PHP.

If anyone reading this is a complete beginner then I would highly recommend the book "PHP & MySql in easy steps" as it will take you through everything you need to get up and running. It won't make you an expert, but you will understand how to build and manipulate a basic database and script.

In another scenario, using a PIC and the ESP, upon the PIC making a decision based on inputs (Tank-x Low Alert / Tank-x Clear etc) it sent a message to PushingBox. Depending on message received Pushingbox would send a predefined eMail or Push notification to phone. I used Flowcode-6 and it was very easy to create using components.

Have a look at PushingBox as it may be quite suited to your alarm. Set up a Service (e.g. eMail / Push / Tweet / Custom etc) and then set up Scenarios. In your alarm example they could be Home_Alert / Home_Clear / Shed-1_Alert / Shed-1_Clear etc.
Each scenario has a different ID. You would simply use your microcontroller to send a request with the relevant ID
(e.g. http://api.pushingbox.com/pushingbox?devid=ID-goes-here).
Upon receipt PB will send you an email / Push / whatever you defined. Free for 100 notifications per day then quite modest costs thereafter.

Due to chip shortages and costs, I don't think I'll be obtaining any of the more capable GSM modules any time soon. Prices seem a bit steep for something I don't need at present. I forget the name of the company but they were offering global access for your IOT device using their SIM card. I believe it ran on 2G and costs were very low indeed. You could create your gadget and send it to pretty much anywhere and it would work. Guess they will perhaps be in a bit of bother soon...

I'm going to look at some more cloud data services this week and I'll update with any I find of interest.

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

I'd forgotten about ThingSpeak, MathWorks and MatLab.

Took me about ten minutes to create an account and successfully post data :) Actually creating the account was the most trouble.

Free for certain limited uses.

You need to first create a MathWorks account and verify etc. Once done you can use the same credentials to login to ThingSpeak.

Once in ThingSpeak go to My Channels and Create a New Channel
Call this whatever you wish and Add Fields
I added a single field and called the field Sensor_1
Once you have decided what you want, scroll down and Save

You are pretty much there now.

When you Saved you will be taken to your Channel "dashboard" and from there you will see a row of TABs.
Click API and you will see your Write and Read API Keys (and examples of how to Read and Write).

To send a value of "7" to your Field you need to make the following request

https://api.thingspeak.com/update?api_key=xyz&field1=7 (where xyz is your API write key)

That's it. You will see a chart with a single value of 7 along with date and time.

In Flowcode you can make the above requests quite easily and instead of a fixed value of "7" you can have a variable (e.g. sensor value).

With it being MathWorks / MatLab you can imagine what you can do with the collected data. I'm sure though that a lot of the good stuff will be in the paid for versions but the free version will at least let you see what can be done.

The above whilst simple to implement isn't secure as everything is contained in the URL you create, however it will give you a starting point to explore further.

If I get time later in the week I'll try and post a Flowcode example of posting sensor data (or whatever) to ThingSpeak.

Edit....

This is how ThingSpeak displays your data, per field. You can export your data as CSV too.
Capture.JPG
Capture.JPG (24.76 KiB) Viewed 26696 times
Hope this helps,
Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

My situation is a bit different.
I don't have 24/7 internet connection and have to use my mobile to connect.
That is why my concern is the correct SIM-card plan and minimum (or only in case of alarm) connection.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

Telecom companies are not shy in charging for service and are slow to reduce costs. I still remember being charged a ridiculous amount when I exceeded my monthly 1GB broadband allowance. As for mobile charges, when 2G became widely available meaning you could roam, my bills were absurd due to constant travel.

Regarding the connection to PushingBox or ThingSpeak, the concept is pretty much the same irrespective of medium. Connect, send a string, disconnect. A relatively trivial amount of data is being transmitted (basically a URL) and in your scenario only when something "happens". I'd certainly consider letting PushingBox do the hard work for you by providing whatever notification over whatever medium you choose, upon receipt of a trigger. Your microcontroller can decide when it's appropriate to send a trigger (e.g. only when alarm is "set" not always).

I'm assuming it is to inform you of an alarm scenario when you are not at home, and that you live in a remote location with only cellular service, rather than to allow remote buildings to talk to house? If latter then LoRa may be a consideration as many modules are capable of LOS ranges of ~16Km.

Just a thought, how do you obtain broadband? I don't have any Telecom services other than cellular at my Unit, so in there I use a very cheap and cheerful 4G stand alone router. Cost about £20 to buy and provides me with WiFi. SIM card is of course dependent on data package but quite modest for my needs.

I'll try and give a Flowcode example of connecting to PushingBox / ThingSpeak later in the week.

Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Hi
I have to correct myself.
I don't have 24/7 land line internet to my holiday home 240 km from Adelaide.
However I can use my mobile phone network (Optus) to connect my PC (USB cable to mobile phone) to internet by using that mobile phone network.
I pay $180 / year for 60Gb of data. So I have to be very careful to use that data.
Can I ask you Chipfryer to explain a bit more about your 4G router.
What model is it? How do you connect it to (mobile?) internet?
What sim-card do you use? What module for sim-card?
---------------------------------------------------
I just bought a GSM Alarm system (Sundely, WiFi, LCD, 12v, 99 zones).
I want to see how it works before I finish my own design.
I need to know more about the SIM-card plans.
I think I can buy a special Alarm Sim-card.
Not sure what networks sell the best one.
-------------------------------------------------------
Thanks.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

Offhand I don't know the actual model, but it is probably manufactured by Huawei or such like and it is a small pocket size affair about the size of a deck of cards that runs on a rechargeable battery. I have it plugged in 24/7 though. The SIM I think is from EE and their plans are varied. You can get the modem and x-GB of data per month starting from around £10. My SIM actually belongs to a colleague and has unlimited data (he got tied into a 24 month contract during lockdown to get access at his country house, then shortly after BT brought fibre.... My gain, his pain :) ).

At home my Draytek router has 3/4G capabilities too simply by inserting a SIM. I have no need as I have reasonable broadband via landline.

Sounds like your data deal is slightly cheaper than here, going by EE prices.

It is quite handy. I just switch it on, it automatically connects to the cell network and provides me with a WiFi signal that I can connect phones/ laptops etc to. I can change SSID / Password to anything I want. It is quite stable and I can easily run Skype / Zoom video calls.

The GSM modules I used to fit to alarms here, until recently, were predominantly to allow you to get notifications and give modest control using SMS messages. Is that something you could incorporate into your design? Here even our basic SIM plans offer vast quantities / unlimited text's. In the Flowcode GSM training guide I believe it takes you through sending and receiving text messages.

Sorry to be brief, a bit tied up just now.
Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Hi
Would be great chipfryer if you tell me a bit more about the GSM module + alarm system + sms msgs.

About sim plans.
Is it any sim card for sale specially for alarm systems?

As I mentioned above I am looking to buy the SIM7600CE module (as I understood they are different for different countries).

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

Again, sorry to be brief.

The 7600 module(s) are a bit pricey here unless you have a specific need, being around £60 plus.... Modules are of course unlocked and will work with any network but I think I read something somewhere that they (depending on Network provider) can have issues with contract plans over PAYG.

If you do a search for "global SIM for iot" I'm sure you will be swamped with options for data SIMs at very reasonable prices. I could probably get an iot data SIM that works anywhere in Europe that provides 2MB per month for around a pound (£12 per year).

Obviously coverage, data required and number of SIMs deployed make a difference in cost. 2MB may not sound a lot to those that consume GBs on their phones but for IOT applications you may only need a few kilobytes per month and of course this is reflected in pricing.

If I had a sensor sending out 100 bytes every minute 24/7 (which really is a lot for hobbyist use) then that would only be about 4.5MB per month.

Trend nowadays seems to be that alarms have an "app" to control them and the SMS control option (which was manufacturer specific) is a bit out of favour. I'll have a look later to see what's available.

However if you are building your own alarm system then I think it could be relatively easy to incorporate SMS control using one of the GSM modules. The Flowcode GSM Training Course gives examples of sending and receiving text messages.

For example
If you received codeSET the alarm would set
If you received codeDISARM the alarm would disarm (code would be a secret password)

Upon receipt of an incoming message Flowcode could identify and act accordingly, and when the alarm triggered you could send predefined messages to a predefined number.

I think this would be relatively easy to implement.

Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Thank you.
That is exactly what I was looking for: the amount of data needed for a simple GSM home security system.
I found in Australia the AmaySim website with pay-as-you-go plan and diff.data plans.
I 'bought' today ($0) the 'free' sim-card (one month 7Gb data sim-card). Basically they let you to have a look how it works.
Would be interesting to see (when I get the sim-card) how much data would be Tx from one sensor (the on/off sensor) during one minute (by constantly sending SMS).

About global SIM for IOT ( M2M SIM Card (machine-to-machine).
Looks like it is a card for an international access to some devices. Is it good for some multi-national project?
M2M sim card plan can start from $2/month.
https://m2mone.com.au/m2m-data-plans/
Need to read more about it.
Thanks again for your help and directions.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

In UK data and SMS messages are treated as different commodities. I can have an unlimited SMS SIM, but it may only give a small amount of data (or pretty much any combination of voice / text / data). Even when I run out of data I can still send and receive messages.

IOT data SIMs are just that, no voice or SMS but cheap to deploy for sensors.

Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Good point.

SMS + MMS

One thing is the based on sms messages system.
Another system is based on M2M or IOT sim card system.
However I am still a bit confused about M2M/IOT sim cards.
-------------------------
After searching on Google and Youtube I can (wrongly?) say that M2M is more industrial system (can have many sim cards in one project connected to one network).
You wrote:
unlimited SMS SIM, but it may only give a small amount of data
Google:
The amount of data that can fit into a single SMS segment is limited -- typically 160 bytes, or 160 basic characters.
------------------------------
For home security 160 bytes are more than enough, however each alarm message will cost some money.
Probably in one month will be no alarms, meaning no sim card usage. In other month can be 10+ alarms.
If I buy a PayAsYouGo sim card I can be OK during one month and run out of money next month.
I can buy $100/year 60Gb sim card (and be able to bank the not used data for the next year).
This option can give me unlimited sms messages. Data wont' be used, unless I can (somehow) transfer some images.
Maybe this is a good option? Home security with unlimited SMS + MMS (multimedia messages)?
Not sure yet.
------------------------------
Links
M2M: similar to SCADA (FC8 supports SCADA),
https://www.youtube.com/watch?v=bqVPUQOTE_s - what is M2M sim card.
https://www.youtube.com/watch?v=UTTv9wesbao What is M2M? Vodafone.
https://www.youtube.com/watch?v=uaXP6AVBUkU webinar. Sep 18, 2012.
https://www.youtube.com/watch?v=_FInD2mKIyI May 5, 2020, Indian lady.
https://www.youtube.com/watch?v=fSCiL2ILTVs Aug 22, 2014, Short Concept.
m2m sim card
https://www.youtube.com/watch?v=k7lqXX1nXx8 SIM from Hamburg - world connection.
https://www.youtube.com/watch?v=bvvWsornTzs Jun 18, 2016, About network.
https://www.youtube.com/watch?v=pyX41wFiIVE Why mobile sim is not for IOT?

https://www.balena.io/blog/cellular-iot ... you-think/ RPi hat project
2G GPRS service gives you < 0.1 MB/second, which might be enough for reporting sensor data, but not necessarily enough speed for pushing code and updates to remote devices. By comparison, standard 4G can give you 15 MB/second and 5G can give you > 150 MB/second.

-------------------------------------------------------------------

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

Sorry for the confusion. What I meant was I can have a SIM that gives me unlimited SMS text messages (each message being limited to 160 characters). I can send as many messages as I like. In addition to that I can also have a data allowance which is considered a separate entity. The data typically could be upwards of 5GB per month depending on how much I care to spend. Currently here in the UK, EE offer unlimited SMS messages, 500 minutes and 5GB of data for £10. If I run out of data, my SMS / voice is unaffected.

I agree that the IOT SIMs are aimed at M2M commercial deployments and they fit the bill nicely as they can cater for all likelihoods. If I am deploying dozens or even hundreds of sensors that are only consuming a few MB every month (if that) what would I want with 5GB of mostly unused data? An unnecessary expense. Of course I can specify the connectivity, 2G upwards, but for a lot of applications 2G speeds are fine. Using the EE example I could deploy at least ten sensors using IOT SIMs for every EE SIM, and depending on whom I buy from I can have a nice dashboard to manage them too (group / allocate extra data / whatever). Not for every scenario I agree, but if you only need to transmit low amounts of data it could be cost effective.

In your alarm, you may only have a relatively limited number of scenarios to communicate. You may just want to send a text stating "21:09:45 Alarm Active" or such like or you may want to include the trigger event too. These could be preprogrammed or your uC could create a string including such upon event. Again, you would probably have a limited number of "instructions" to act upon, perhaps "On / Off / Status" etc. Flowcode can easily handle this. Rather than have your code look for every possible incoming message, it may be easier to just send a value to your alarm (e.g. "codeX" where code is your secret password and X is the command. X=1 means Set, X=2 means Disarm etc).

I looked at a SIM7600CE module online, mainly because I got bored searching for a maintenance manual for my dishwasher that stopped working when I was away. I found out this morning when I discovered the still unclean plates from last night's takeaway :( Of all appliances that is the one I cannot live without as I loathe doing "the dishes"... Anyway it seems to me that it is more or less compatible with the SIM800 as they share AT commands so you shouldn't have too much trouble in using it as you can look at any example using the "800" for guidance.

In Abhi's scenario it would be a good option to send his sensor values using data to ThingSpeak (or similar) for historical reference etc as his information is one-way. Perhaps his microcontroller will also decide locally an alarm event and using the same methodology send a trigger to PushingBox or the like that will then notify him by Push / email /whatever. The data requirements for this are very modest indeed.

However you need two-way interaction and by far the simplest and possibly most reliable way would be by using SMS as all you have to do is send messages from your phone. The modules are capable of MMS so you might be able to send the images using that feature. Although with all that data available, it's a shame to waste it. If you had a 4G router (providing WiFi) you could incorporate any number of sensors/gadgets to control/monitor your house and also CCTV.

I'm hoping to dig out my SIM800 this weekend to play, but not until I attack my dishwasher first :)

Regards

viktor_au
Posts: 350
Joined: Fri Jan 26, 2018 12:30 pm
Location: South Australia
Has thanked: 44 times
Been thanked: 61 times
Contact:

Re: Send Data on email using GPRS

Post by viktor_au »

Hi
Understood.
It is a good idea to use SMS and MMS for home security.
I found on internet a few examples of Arduino working with TTL cameras.
--------------
Say, if I use sim card with unlimited SMS and limited data, the system will be able to send alarm info via SMS but not a lot of MMS messages. Say, if I send the MMS messages only if intruder opens the home door/window the number of MMS messages will be smaller (compared to SMS). In this case I can send unlimited SMS and limited MMS.

Possible home security usage
Agree with you.
SMS can have: 21:09:45 Alarm Active
or (as you have mentioned: time+ trigger event info)
21:09:45, zone1,door opened.
-------------------------
Coded messages (from user to alarm system)
1=set, 2=disarm, 3=arm, etc
-------------------------
I am a bit far away from having /letting user to control the security system by some commands.
At that stage I think I can let the home security to send/inform user (by using SMS - in case of one of zones have been triggered). User can use the android mobile phone app to activate some lights, sound, etc.

SIM7600CE
Thanks for looking into it.
------------
Two way interaction (security to user and user to security)[/b]
I have to pass a few stages during this project.
One is to tune-up the home security: send sms/mms to user in case of an alarm.
2nd: use android mobile phone app to control some lights, etc in the house.
-----------------------
Thanks to you I can see my project more clear.

Good luck with your dishwasher job.

PS
I checked matrix/flowcode forum and found:
Search found 14 matches: SIM800

chipfryer27
Valued Contributor
Valued Contributor
Posts: 775
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 185 times
Been thanked: 204 times

Re: Send Data on email using GPRS

Post by chipfryer27 »

Hi

Thankfully I have an "evil lab" at my disposal as despite the dishwasher being a compact "worktop" version you need an area at least four times it's footprint to dismantle it, to say nothing of how wet you will get.... A lot of bother to discover a dodgy motor capacitor. Appliance spares people want a whopping £36 just for a 3uF capacitor..... Major component vendors will do it for a pound or two, but unless you are adding it to a bigger order, handling and such still brings it to "too expensive".... Amazon can get me two by tomorrow for under a tenner so hopefully only one more night with the dreaded marrigold's.. :)

I grabbed a SIM card when out. Cheapest I could find was with EE and for a fiver I get a few hundred texts, a few hours of voice and 250MB of data. This is more than enough for me to play with.

I dug out my SIM800 module. I need to attach the pins to it and then it will be ready to test with. I'm also intending to dig out my ESP8266's and revisit using them to send data to PushingBox / ThingSpeak as since Abhi started this thread it's piqued my interest in what ThingSpeak / PushingBox / IFTTT can do.

My plan is to first connect the modules to a PC running a terminal program such as PuTTY or the like. This way I can send in AT commands and see the responses. Once I figure out what to send etc I can then make a uC do it using Flowcode and I'll know exactly what the uC should expect to see too.

I also dug out my "Tank Monitor". This was a project in which I used a couple of LoRa modules to signal a low water alert in a couple of remote tanks. They signaled to a Receiver in the house and upon receipt, it used an ESP8266 to connect to the house WiFi and send an API Key to PushingBox (which then emailed out the alert etc). Looking at it now I realise I need to go study up why I needed the strings to contain what they do :)

Sounds a good plan to have your alarm interact with you via SMS, as it simplifies a lot and leaves your data for whatever use.

Quick question. You mention that you will get your phone to control your lights etc. How? Won't whatever "smart" switches in your house need internet access via WiFi? Also, depending on Smart device, you could get your alarm to send triggers to PushingBox / IFTTT etc to automatically switch on lights upon alarm.

I'll update on my progress with the 800/ESPs when I get a chance, after I rebuild my dishwasher of course :)

Regards

EDIT...
Looked at the ESP8266 examples in the Wiki (very helpful) and now have a better understanding of why my strings contain what they do. Brush up on HTML too methinks....... and I thought dishwashers were fun......

Post Reply