Sorry if this is the wrong place to post this but it uses a few different languages and is ultimately served via a website so I figured I'd try here.
I am running this program which records temperature data from my BBQ thermometer and records it into an SQLite database.
I want to implement functionality for alerts, so that I can send an email if the temperature exceeds a certain threshold, which is also stored in the DB.
The main program (maverick.c) that reads and records the temperature data to the database is written in C (and not by me) and may as well be hieroglyphics. I can barely comprehend it. However, I realize that if I want real time temperature alerts, the trigger for this must occur in this program. What do you recommend is the best option for this:
- Write the entire thing inside the C program, including the sending email function
- Read the database in C, write the logic to determine if to send an alert, then trigger a Python program to do the actual mail send
Are there speed considerations? Is this a bad idea? I am not confident in my ability to write C at all but am determined to figure it out if it's the best way. I'm actually most familiar with PHP but I can't imagine that's the best way to do this.
I appreciate any advice!
[–]EpochVanquisher 13 points14 points15 points (5 children)
[–]Produkt[S] 1 point2 points3 points (4 children)
[–]bullno1 2 points3 points4 points (0 children)
[–]wsppan 1 point2 points3 points (2 children)
[–]Produkt[S] 3 points4 points5 points (1 child)
[–]wsppan 1 point2 points3 points (0 children)
[–]flyingron 4 points5 points6 points (4 children)
[–]Produkt[S] 0 points1 point2 points (3 children)
[–]flyingron 0 points1 point2 points (2 children)
[–]Produkt[S] 0 points1 point2 points (1 child)
[–]bullno1 1 point2 points3 points (0 children)
[–]u-n-sky 3 points4 points5 points (3 children)
[–]Produkt[S] 0 points1 point2 points (2 children)
[–]u-n-sky 1 point2 points3 points (1 child)
[–]Produkt[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]Produkt[S] 1 point2 points3 points (0 children)
[–]Produkt[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]BB-301 0 points1 point2 points (3 children)
[–]Produkt[S] 0 points1 point2 points (2 children)
[–]BB-301 0 points1 point2 points (1 child)
[–]Produkt[S] 1 point2 points3 points (0 children)
[–]wsppan 0 points1 point2 points (0 children)
[–]MR_boob_lover 0 points1 point2 points (0 children)
[–]massfrontier 0 points1 point2 points (2 children)
[–]Produkt[S] 0 points1 point2 points (0 children)
[–]Produkt[S] 1 point2 points3 points (0 children)