A client commissioned me once to create a system that could detect when one of their cameras was offline, and if so, send them a message with Twilio (a cloud messaging service) to alert them. So my basic plan was to use their API to get a JSON file that included the camera name and the status. Then using twilio I would send them a message saying ‘[camera name] is offline!’.

I hosted the script on a Raspberry Pi 4B and used SSH in vscode to remotely edit code on the raspberry pi. So let’s focus on my script. I used the Beautiful soup Module in python to make a request to the api web address and retrieve a json file that can be read to see all the camera statuses. Then if one was offline I used twilio to send a SMS alerting the client of the camera that is offline.

Leave a comment