[APP][Pro] Support for ONVIF compatible cameras (Release 2.0.60, Test 2.0.60)

I have had a look at the code and that should be the correct setting as it looks for the RuleEngine/FieldDetector/ObjectsInside and then IsInside to be true or false.
If you send the log I will try to find out why it’s not working.

Here is the log … cheers

+9:0:0.044: Push Event found correct Device: 
+9:0:0.011: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.037: 
--  Event detected (192.168.0.20)  --
+9:0:0.020: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.024: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = true (7466)

+9:0:0.034: Ignoring unchanged event (192.168.0.20) IsInside = true
+9:0:0.024: Push event: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header><wsa5:To>http://192.168.0.100:9998/onvif/events/192.168.0.20</wsa5:To><wsa5:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa5:Action></s:Header><s:Body><wsnt:Notify><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa5:Address>http://192.168.0.20/onvif/Subscription?Idx=3</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2021-03-10T10:24:03Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Key><tt:SimpleItem Name="ObjectId" Value="7466"/></tt:Key><tt:Data><tt:SimpleItem Name="IsInside" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify></s:Body></s:Envelope>
+9:0:0.064: Push Event found correct Device: 
+9:0:0.027: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.015: 
--  Event detected (192.168.0.20)  --
+9:0:0.028: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.017: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = true (7466)

+9:0:0.100: Ignoring unchanged event (192.168.0.20) IsInside = true
+9:0:0.043: Push event: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header><wsa5:To>http://192.168.0.100:9998/onvif/events/192.168.0.20</wsa5:To><wsa5:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa5:Action></s:Header><s:Body><wsnt:Notify><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa5:Address>http://192.168.0.20/onvif/Subscription?Idx=3</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2021-03-10T10:24:03Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Key><tt:SimpleItem Name="ObjectId" Value="7466"/></tt:Key><tt:Data><tt:SimpleItem Name="IsInside" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify></s:Body></s:Envelope>
+9:0:0.023: Push Event found correct Device: 
+9:0:0.027: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.012: 
--  Event detected (192.168.0.20)  --
+9:0:0.031: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.015: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = true (7466)

+9:0:0.026: Ignoring unchanged event (192.168.0.20) IsInside = true
+9:0:0.039: Push event: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header><wsa5:To>http://192.168.0.100:9998/onvif/events/192.168.0.20</wsa5:To><wsa5:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa5:Action></s:Header><s:Body><wsnt:Notify><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa5:Address>http://192.168.0.20/onvif/Subscription?Idx=3</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2021-03-10T10:24:03Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Key><tt:SimpleItem Name="ObjectId" Value="7466"/></tt:Key><tt:Data><tt:SimpleItem Name="IsInside" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify></s:Body></s:Envelope>
+9:0:0.026: Push Event found correct Device: 
+9:0:0.013: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.030: 
--  Event detected (192.168.0.20)  --
+9:0:0.017: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.019: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = true (7466)

+9:0:0.030: Ignoring unchanged event (192.168.0.20) IsInside = true
+9:0:0.017: Push event: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header><wsa5:To>http://192.168.0.100:9998/onvif/events/192.168.0.20</wsa5:To><wsa5:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa5:Action></s:Header><s:Body><wsnt:Notify><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa5:Address>http://192.168.0.20/onvif/Subscription?Idx=3</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2021-03-10T10:24:03Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Key><tt:SimpleItem Name="ObjectId" Value="7466"/></tt:Key><tt:Data><tt:SimpleItem Name="IsInside" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify></s:Body></s:Envelope>
+9:0:0.050: Push Event found correct Device: 
+9:0:0.017: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.022: 
--  Event detected (192.168.0.20)  --
+9:0:0.026: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.034: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = true (7466)

+9:0:0.024: Ignoring unchanged event (192.168.0.20) IsInside = true
+9:0:0.052: Push event: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header><wsa5:To>http://192.168.0.100:9998/onvif/events/192.168.0.20</wsa5:To><wsa5:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa5:Action></s:Header><s:Body><wsnt:Notify><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa5:Address>http://192.168.0.20/onvif/Subscription?Idx=3</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2021-03-10T10:24:03Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Key><tt:SimpleItem Name="ObjectId" Value="7466"/></tt:Key><tt:Data><tt:SimpleItem Name="IsInside" Value="true"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify></s:Body></s:Envelope>
+9:0:0.028: Push Event found correct Device: 
+9:0:0.036: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.019: 
--  Event detected (192.168.0.20)  --
+9:0:0.016: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:24:03.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": true
          }
        }
      }
    }
  }
}
+9:0:0.021: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = true (7466)

+9:0:0.035: Ignoring unchanged event (192.168.0.20) IsInside = true
+9:0:0.024: Push event: <?xml version="1.0" encoding="utf-8" standalone="yes" ?><s:Envelope xmlns:sc="http://www.w3.org/2003/05/soap-encoding" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tns1="http://www.onvif.org/ver10/topics"><s:Header><wsa5:To>http://192.168.0.100:9998/onvif/events/192.168.0.20</wsa5:To><wsa5:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa5:Action></s:Header><s:Body><wsnt:Notify><wsnt:NotificationMessage><wsnt:SubscriptionReference><wsa5:Address>http://192.168.0.20/onvif/Subscription?Idx=3</wsa5:Address></wsnt:SubscriptionReference><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/FieldDetector/ObjectsInside</wsnt:Topic><wsnt:Message><tt:Message UtcTime="2021-03-10T10:25:12Z" PropertyOperation="Changed"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="00000"/><tt:SimpleItem Name="VideoAnalyticsConfigurationToken" Value="00000"/><tt:SimpleItem Name="Rule" Value="00000"/></tt:Source><tt:Key><tt:SimpleItem Name="ObjectId" Value="7466"/></tt:Key><tt:Data><tt:SimpleItem Name="IsInside" Value="false"/></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></wsnt:Notify></s:Body></s:Envelope>
+9:0:0.016: Push Event found correct Device: 
+9:0:0.025: Push Event process: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:25:12.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": false
          }
        }
      }
    }
  }
}
+9:0:0.032: 
--  Event detected (192.168.0.20)  --
+9:0:0.028: {
  "subscriptionReference": {
    "address": "http://192.168.0.20/onvif/Subscription?Idx=3"
  },
  "topic": {
    "_": "tns1:RuleEngine/FieldDetector/ObjectsInside",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2021-03-10T10:25:12.000Z",
        "PropertyOperation": "Changed"
      },
      "source": {
        "simpleItem": [
          {
            "$": {
              "Name": "VideoSourceConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "VideoAnalyticsConfigurationToken",
              "Value": "00000"
            }
          },
          {
            "$": {
              "Name": "Rule",
              "Value": "00000"
            }
          }
        ]
      },
      "key": {
        "simpleItem": {
          "$": {
            "Name": "ObjectId",
            "Value": 7466
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "IsInside",
            "Value": false
          }
        }
      }
    }
  }
}
+9:0:0.023: Event data: (192.168.0.20) RuleEngine/FieldDetector/ObjectsInside: IsInside = false (7466)

+9:0:0.025: Event Processing (192.168.0.20):IsInside = false
+9:0:0.642: Event Image Updated (192.168.0.20)
+9:0:48.912: Sending log
+9:0:5.706: Message sent: <626d793c-b311-3e28-c467-89ca1dcfc7d2@ady.duckdns.org>

The event detection appears to working, but the anomaly I need to look into is the right at the end where it shows the event image being updated when the detection is false. It could be that as all those events happen in very quick succession (only ms between them) that the capture delay is greater than the total time between detection starting and finishing.

Thanks. If it’s fixable that would be great. They are a very popular camera. As the Homey Dahua App appears to be dead your my only hope :grin:.

What bit is not working?
As far as I can see everything looks OK. The app is detecting events and updating the event image.

I tried re-installing the app and did a power cycle… This seems to have worked :grinning: . I now see the motion icon light up when ever i walk past the camera…

I now have a new problem though. I cant get a flow to react to the motion event… What is the standard Flow setting’s for reacting to a motion event … Eg what options do i select for “When” + “And” … Ive got Homey to send me a Push a notification for “Then” … I wasn’t able to find and examples or instructions … cheers

Use the “Motion snapshot ready” trigger card. Nothing needed for the And

1 Like

I just tried it. No joy I’m afraid. :expressionless: Its strange. Every thing seems to be ok. It’s registering the motion ok, the motion icon goes red when i walk past. I can access the snapshots no prob. Flows just won’t react to the motion ?

Can you put a simple action card in just in case it’s the push that’s not working?
Check also that the push card that you have set up is using the Motion snapshot local tag.

Here’s the flow (below). I originally had a snapshot attached to the Push Notification which i had in the “Then” section …

I had “motion event snapshot” selected in the cameras’s own list of available tags. I thought this would be the logical choice.

I haven’t t tried “motion snap shot” in local tags yet. Im currently not a home right now to try it . Ive since removed the Image from the Push notification to simply things. Now just sends a push text …

How does this flow look to you … >

https://homey.app/f/41tUzw

This is what I have:
https://homey.app/f/ExMjBw/

So basically the same as mine …

It’s just the Push Notification that’s different in mine so you can see what it should be like when you add yours back in.

Thanks , but how does that explain why the flow isn’t registering or recognising the motion events that the app is “successfully” recognising. (Eg … the motion icon flashes red) when I go past the camera…

In theory it shouldn’t matter what actions are in the “then” part of the flow. Anything in the “then” part of the flow is just a secondary reaction to what triggers it…

In my previous example I mentioned that I had Homey set up to say a speech message , animate the LED ring and also send a push notification (with , and without a motion snap shot attached) … All of these work perfectly when I select “test flow” in Homey…

The “then” part of the flow seems to be perfectly fine. If one part of the “then” part isn’t functioning then the speech and LED ring should at least still work regardless…

The flow is just not getting triggered … I’ll try the latest test version of the app and post my results tomorrow…

Thanks again for your efforts. If I can get this to work I’ll likely donate some money as this will make a big difference for me … You seem to be one of the few developers on the Homey platform that is proactively developing your App and cares. You respond quickly , are always refining and improving your code and give a shit. I see so many apps on the Homey platform that were started around a year ago but were then abandoned by their creator’s and then basically turn into what I call “Zombie Apps”… You can install them no prob but they are bloody useless and don’t work properly. Why are they there Athom ??? mmm

The event is triggered as soon as the image is capture and is working fine on all my cameras. The only thing I can think of is the image capture is failing, but I think you said you can see the image in the device?
Also in the last log that you sent, the last line is:
+9:0:0.642: Event Image Updated (192.168.0.20)
and that is emitted just before the actual card is triggered:

        Homey.app.updateLog("Event Image Updated (" + this.name + ")", 1);

        let tokens = {
            'eventImage': this.eventImage
        };

        this.eventShotReadyTrigger
            .trigger(this, tokens)
            .catch(err =>
            {
                Homey.app.updateLog("Snapshot error (" + this.name + "): " + Homey.app.varToString(err), 0);
                return reject(err);
            })
            .then(() =>
            {
                return resolve(true);
            });

I’m not sure where to look after that.

Maybe you could send the log again but set it to Basic Information and wait just a bit longer to make sure there are no errors reported after the Event Image Updated (192.168.0.20) entry.

What version of Homey firmware are you on?

I finally figured it out.

My apologies. I goofed up :disappointed:. About 6 months ago I was using this flow to test a generic Chinese PTZ camera I purchased from AliExpress. I forgot I had disabled it after I had finished fooling around with the camera… I didn’t even realise until I went back through the settings…

Sorry about that :woozy_face:

It seems to be working well now, Triggers quickly. Hasn’t missed an event yet. I’ll test it for about a week and let you know how it goes.

How do you accept donations ?

Haha, it’s often those little things that trip us up :wink:
I’m happy it’s working now so thank you for letting me know.

There are links at the bottom of each app page in the store and if the dev as provided the information there will be one for Donate.

The store only supports PayPal links so it will take you to there with the developers account information required to make a donation.

Hi Adrian,
Thank you so much for this app.
I was thinking, my camera also has a microphone
Would it be possible to have a sound alert as well? When the microphone detects a sound higher than level x, it set an alarm. This would be nice to watch over the grandchildren. Is that possible at all?
Kind regards,
Eric

If the alarm is part of the camera, where the camera monitors the microphone, and it sends a message via the ONVIF protocol, then yes it will be possible.
Maybe you could enable the Basic information log and trigger the microphone to see if it sends a notification.

Hi Adrian, thanks for your reply. Good idea, I will try that!!
Grtz Eric