#!/bin/bash

   DOMO_IP="localhost"             # Domoticz IP Address
   DOMO_PORT="81"                    # Domoticz Port
   IDX=1148

movies=`find /media/WDBlue/motion/CAM1/*.avi -mmin -2|wc -l`
echo $movies
curl -y 1 -s "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$IDX&nvalue=0&svalue=$movies" &

exit 0
