I’ve created a Blynk project that monitors my security alarm and allows remote arming and disarming along with providing alarm status. A email is sent when the alarm is armed or an alarm is trigger. My monitoring company charges $10 / month for this remote service. So this was my justification.
I have also implemented a local Blynk server running on a Rasberry Pi 3B. With the capability to access it from anywhere.
But my app still requires the following features / questions:
Capability to save an activity log to a CSV file automatically on the server or have it emailed every 30 days. This will provide a activity log for my insurance company that show monitoring activity. I have looked at the History Widget but is lacks the automatic feature.
Provide a private IOS / Android APP to those authorized. So is there a way to “privately” publish my App?
Customize UI interface so user know they have the right APP. Running an APP call Blynk doesn’t work for me.
Also does the Blynk local server have the 15 second limitation for sending emails and SMS messages too? I already developed the code to handle this limitation but wanted to know if it was needed?
Now for the bad news. This is a private app and not for resale. But I would be willing to help others that have a DMP security system to implement the same.
All thoughts and ideas welcome. Thank you for Blynk.
It depends how much data you have to send. If it’s minimal you could automatically email it via the app every 30 days. If there is a lot of data the app could email you every 30 days with the url for the automatic pin data history download in csv format. I believe the csv contains 3 months data so it wouldn’t matter if you didn’t click the url in the email for a few days after receiving the email.
It would depend on the scale of your operation. The normal process is for the app to go on the Google and Apple stores. Technically they could be private (not published on the store) but this is likely to cost you more because it’s not the normal procedure for apps. The apps will only work with tokens / hardware so I’m not sure why a public app would be a problem.
Do be aware though that service providers have their own limits, so if you have a 1s trigger that is constantly activated that could be 86,400 emails per day. Well above Gmail’s maximum of 500 per day.
You say you don’t have much data yet you want to reduce the 15s minimum notification period.
Can you elaborate on the amount of data you are working with.
Is it as low as a single 0 or 1 every day for the month (or potentially even less if data only occurs when an alarm triggers etc) or dozens of pins with associated Strings etc.
I’m only looking to capture alarm activity so it would be minimal. Date, time and the text string that was emailed when the activity occurred and any actual alarm triggers. My guess would be less than 10 per day most likely less. So the new History Widget features you’re implementing would probably work just fine.
I would be happy test them for you. .I’ve always believe in paying it forward and your team has been so responsive and helpful. So let me know if I can help.
Wish I knew about the notification limit feature. I think I spent more time coding the email timing function to only send one email every 15secs than the rest of the app. You see, when an alarm is triggered multiple emails are needed to be sent. I was a learning experience.
It looks like I’ll miss many of the new features you are implementing in Blynk because I don’t think I’ll ever be more the a newbie developer.
If so it would be better to have an email forwarding system, received by 1 and forwarded to 10 others.[quote=“5310, post:7, topic:16143”]
My guess would be less than 10 per day most likely less.
Good one about the area. The emails are sent went the system is armed or disarmed. So some days there’ll be none and others more. Email forwarding was an idea but I’d need multiple emails because based on the type of alarm they are sent to different individuals. The arming / disarm are sent only those that have access. Others get real fire or burglary alarms so they can call the appropriate authorities.
I’ve tested by email code and is works for sending the needed emails every 15 seconds. So if there is a burglary alarm, four emails are sent in just over 1 minute. Two end up as SMS message and the other regular emails. So I think I’m good on this one.
But how do I turn the virtual writes of date, time and text into a CSV file and then email the file on a set number of days timetable? If the App can’t, I was thinking of using the local server to email it. How is the file named and is it placed in the dataFolder as I suspect? Do you have a code snippet to share?
@5310 a screenshot of an email you can code up in your Blynk project to be automatically sent to you every 30 days.
Add RTC widget, add 1 to a counter when time is 00:01:00, virtualWrite counter to Blynk server, sync counter pin in BLYNK_CONNECTED() in case your MCU reboots during the 30 days. When counter equals 30, reset the counter and call emailReminder().
char auth = "1234567890abcdefghij098765432101";
char blynk_server = "blynk-cloud.com";
String emailbody = "Please click the following url to obtain pin data for the last 3 months<br>";
emailbody += "http://" + String(blynk_server) + "/" + String(auth) + "/data/V25<br>";
emailbody += "Thanks for using My Smartphone Alarm App";
Blynk.email("firstname.lastname@example.org", "My Alarm Smartphone App", emailbody);
Just a temporary hack for now. Ensure pin data is only updated at 1 minute intervals or longer. If you don’t you will see average data in the csv not actual data.
Make a value widget, say vpin 4, and write each action to that vpin with a timestamp associated with it. Make a webhook to write the value of that vpin to an mqtt online service like io.adafruit.com, make an IFTTT to record the value of your io.adafruit.com feed to a google sheets file.
Ah, I guess the best answer is that I don’t know how to do it that way! I didn’t know there was a google sheets web api, although I guess that makes sense that they have one. I agree, your way is better.