I needed a solution to check every x-minutes if my IP camera is still online.

I use the Pushingbox.com service to send a notification when a certain host is not available. Checkout Pushingbox.com to see which kinds of notification services they offer. At least a notification to email and Prowl! is possible.

I’ve combined the python script from the French blog site: GuiguiAbloc with another script to regularly check if a specific service is available and when not, to send a notification via Pushingbox.

The script expects the URL to check as an argument, i.e.:
python hostnotify.py

I have not tried all kind of services, but for HTTP services it works. I use this script to check every x-minutes if my IP camera is still online. When the build in webservice of the camera is not available, I receive a notification via Pushingbox. This script is more reliable then doing a PING to a network address.
To check regularly, add the script to the crontab of your system and execute the script every x-minutes. The crontab should be something like this for every 5 minutes:

*/5 * * * * /home/Python/hostnotify.py

Make sure you setup a scenario on Pushingbox.com and add the DEVID of the scenario to the source code.

Actually, in my setup I’ve included source code that besides sending a notification, it also sends a command to my Domotica Gateway which switches the camera off and on to do a reset.

[fusion_builder_container hundred_percent=”yes” overflow=”visible”][fusion_builder_row][fusion_builder_column type=”1_1″ background_position=”left top” background_color=”” border_size=”” border_color=”” border_style=”solid” spacing=”yes” background_image=”” background_repeat=”no-repeat” padding=”” margin_top=”0px” margin_bottom=”0px” class=”” id=”” animation_type=”” animation_speed=”0.3″ animation_direction=”left” hide_on_mobile=”no” center_content=”no” min_height=”none”][wpdm_file id=2]