I'm working on a personal project that involves deploying internet-connected Arduino devices around my city. I'm planning on having them send a regular heartbeat to a PHP script that will log the last received heartbeat for every device in a MySQL database.

This sounds all fine & dandy in my head, but I'm more of a hardware hacker so this is waay out of my usual forest. Where I start to break down is....without having to regularly check the database manually, how can I get notified if a particular device doesn't successfully send a heartbeat within a given timeframe?

So far I've considered a constantly re-running Python script, or a PHP script, that will scan the database comparing the current time to the time the last hearbeat was received. If it's in excess of what I specify, then I'd get a notification via email or similar. This solution sounds...clunky.....to me and it would be wonderful if someone could shed light on a better solution, or advise if this is 'how its done'!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.