[APP][Pro] Support for ONVIF compatible cameras (Release 2.0.41)

I am going to make a change to turn off the periodic gettime calls when the logging is enabled as they just flood the log.
I will do that tomorrow and post a test version for you to try.

I’m sorry, I misunderstood. Thank you for the explanation and especially for your time

I received a LOOC IMOU DAHUA IPC-C26EP-V2 today thinking it was compleetly compatible. I used the IMOU Life app too install te camera and this works. When i try to connect trough the ONVIF app i get the error: Wrong ONVIF SOAP response. When i try to use OnVif device manager i cannot log-in? I get a error for wrong username and password. I cannot set the username and password anywhere in the IMOU app also not during install. Only the password for my wifi is requested. I use the standard user: admin and password empty. Also admin:admin or Admin:Admin does not work.

Cannot find any info about changing the password or loging in trough any thing else than the app.
Ideas?
Runnning the latest firmware V2.680.R.20201024

My log:

+0:0:0.024: Connection Failed for 192.168.2.146 Port: 80 Username: admin
+0:0:0.018: Failed: Wrong ONVIF SOAP response
Error: Wrong ONVIF SOAP response
at /lib/onvif/lib/utils.js:77:15
at Parser. (/node_modules/xml2js/lib/parser.js:304:18)
at Parser.emit (events.js:311:20)
at Parser.exports.Parser.Parser.parseString (/node_modules/xml2js/lib/parser.js:314:16)
at Parser.parseString (/node_modules/xml2js/lib/parser.js:5:59)
at Object.exports.parseString (/node_modules/xml2js/lib/parser.js:369:19)
at parseSOAPString (/lib/onvif/lib/utils.js:61:10)
at IncomingMessage. (/lib/onvif/lib/cam.js:304:5)
at IncomingMessage.emit (events.js:323:22)
at endReadableNT (_stream_readable.js:1204:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
+0:0:0.041: !!! parseSOAPString error 1:
------ Original xml:
------ Filtered xml:

-For this camera usually you are prompt to set up your own password during first installation, so you should use “admin” as user, and in “password” the one that you have created on your initial set-up with the Imou app.

-Also check it here: On Imou app open the camera you want to connect with Homey/ click small gear top right corner (settings)/ click first tab from top (one with name of your camera and image) / click device label.

If it shows you a password in here, than this is the one to use.
If it does not show you a password, only a serial number.
Then you have manually set your own password, soo you have to remember it to be able to add it on homey.
There is a second menu bellow device label called device password, this is where you can set your password.

2 Likes

Username is: admin

My password for the Camera wars printed on the sticker on the camera next to the QR Code. It was an 8 digit code.

1 Like

yes thanks got it working. added to homey now. I do not see the motion in homey yet

Hello Ricardo, So you motion is working in homey with the IPC-G26E? I have the IPC-G26E-V2 and it does not. We both run the same firmware 2.680.0000000.22.R Build 2020-10-24? All the other parameters are the same?
’

Hi @wesley_w
Snapshots are working?
When you enable motion on your camera in homey what do you want to achieve?
The way i see it in my own case, motion events are not reliable on homey cause i believe it triggers every time there is a slight change in the image, in Imou app it filters those events with the pir sensor, if the pir sensor triggers then Imou app notifies you about movement, but with it connected to homey with motion alarm active it triggers motion alarm on every frame change i believe.
But try to explain me better what you entend to achieve maybe that way i can be more helpful.

Could you install the latest test version, turn off motion, turn on logging, turn on motion, trigger motion on the camera and then send me the log after about a minute.

It is down to the camera to send a notification when it detects motion. The Homey app then grabs an image.
On 4 of my cameras (H.View) I can set zones and sensitivity which is very good at filtering out false alarms. On another camera (HikVision) I can set line crossing detection amongst other things.
Whatever options are configured in those cameras generate the event.
Of course you are probably right about Imou cameras as it could possibly just trigger on image changes but it seems strange that it wouldn’t use the PIR if that is what it does in the Imou app.
Just out of interest, what event types do the cameras report in the advanced settings?
Maybe it has a different event type that would be better to use. It can’t be changed at the moment but I could add the feature.

Why it is so long but here is log...   

 "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "InputToken",
        "Value": "00000"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "LogicalState",
        "Value": false
      }
    }
  }
}
+0:0:0.008: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "InputToken",
        "Value": "00000"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "LogicalState",
        "Value": false
      }
    }
  }
}
+0:0:0.009: Getting message token source: {
  "simpleItem": {
    "$": {
      "Name": "InputToken",
      "Value": "00000"
    }
  }
}
+0:0:0.009: Getting message token simpleItem: undefined
+0:0:0.013: Push Event Message Token: null
+0:0:0.008: Push Event looking for: 192.168.2.146
+0:0:0.009: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.009: Push Event found Device: 192.168.2.146
+0:0:0.013: Push Event found correct Device: 
+0:0:0.009: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.010: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:Device/Trigger/DigitalInput",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "source": {
        "simpleItem": {
          "$": {
            "Name": "InputToken",
            "Value": "00000"
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "LogicalState",
            "Value": false
          }
        }
      }
    }
  }
}`Preformatted text`
+0:0:0.016: Event data: (bc:32:5f:47:50:6d) Device/Trigger/DigitalInput: LogicalState = false
+0:0:0.040: Ignoring event type (bc:32:5f:47:50:6d) Device/Trigger/DigitalInput: LogicalState = false
+0:0:0.016: Push Event detected: [
  "/onvif/events",
  "deviceId",
  "192.168.2.146"
]
+0:0:0.011: Push Event data: {
  "notificationMessage": {
    "subscriptionReference": {
      "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
    },
    "topic": {
      "_": "tns1:Monitoring/ProcessorUsage",
      "$": {
        "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
      }
    },
    "message": {
      "message": {
        "$": {
          "UtcTime": "2020-11-29T20:56:01.000Z",
          "PropertyOperation": "Initialized"
        },
        "source": {
          "simpleItem": {
            "$": {
              "Name": "Token",
              "Value": "000"
            }
          }
        },
        "data": {
          "simpleItem": {
            "$": {
              "Name": "Value",
              "Value": 0.42
            }
          }
        }
      }
    }
  }
}
+0:0:0.003: Push Event token message: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "Token",
        "Value": "000"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Value",
        "Value": 0.42
      }
    }
  }
}
+0:0:0.009: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "Token",
        "Value": "000"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Value",
        "Value": 0.42
      }
    }
  }
}
+0:0:0.004: Getting message token source: {
  "simpleItem": {
    "$": {
      "Name": "Token",
      "Value": "000"
    }
  }
}
+0:0:0.006: Getting message token simpleItem: undefined
+0:0:0.008: Push Event Message Token: null
+0:0:0.003: Push Event looking for: 192.168.2.146
+0:0:0.005: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.004: Push Event found Device: 192.168.2.146
+0:0:0.009: Push Event found correct Device: 
+0:0:0.103: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.006: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:Monitoring/ProcessorUsage",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "source": {
        "simpleItem": {
          "$": {
            "Name": "Token",
            "Value": "000"
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "Value",
            "Value": 0.42
          }
        }
      }
    }
  }
}
+0:0:0.005: Event data: (bc:32:5f:47:50:6d) Monitoring/ProcessorUsage: Value = 0.42
+0:0:0.003: Ignoring event type (bc:32:5f:47:50:6d) Monitoring/ProcessorUsage: Value = 0.42
+0:0:0.026: Push Event detected: [
  "/onvif/events",
  "deviceId",
  "192.168.2.146"
]
+0:0:0.025: Push Event data: {
  "notificationMessage": {
    "subscriptionReference": {
      "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
    },
    "topic": {
      "_": "tns1:Monitoring/OperatingTime/LastReboot",
      "$": {
        "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
      }
    },
    "message": {
      "message": {
        "$": {
          "UtcTime": "2020-11-29T20:56:01.000Z",
          "PropertyOperation": "Initialized"
        },
        "data": {
          "simpleItem": {
            "$": {
              "Name": "Status",
              "Value": "2020-11-29T20:54:18.000Z"
            }
          }
        }
      }
    }
  }
}
+0:0:0.008: Push Event token message: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Status",
        "Value": "2020-11-29T20:54:18.000Z"
      }
    }
  }
}
+0:0:0.009: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Status",
        "Value": "2020-11-29T20:54:18.000Z"
      }
    }
  }
}
+0:0:0.016: Getting message token source: undefined
+0:0:0.009: Push Event Message Token: null
+0:0:0.003: Push Event looking for: 192.168.2.146
+0:0:0.005: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.004: Push Event found Device: 192.168.2.146
+0:0:0.004: Push Event found correct Device: 
+0:0:0.004: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.005: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:Monitoring/OperatingTime/LastReboot",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "Status",
            "Value": "2020-11-29T20:54:18.000Z"
          }
        }
      }
    }
  }
}
+0:0:0.004: Event data: (bc:32:5f:47:50:6d) Monitoring/OperatingTime/LastReboot: Status = Sun Nov 29 2020 21:54:18 GMT+0100 (Central European Standard Time)
+0:0:0.005: Ignoring event type (bc:32:5f:47:50:6d) Monitoring/OperatingTime/LastReboot: Status = Sun Nov 29 2020 21:54:18 GMT+0100 (Central European Standard Time)
+0:0:0.006: Push Event detected: [
  "/onvif/events",
  "deviceId",
  "192.168.2.146"
]
+0:0:0.009: Push Event data: {
  "notificationMessage": {
    "subscriptionReference": {
      "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
    },
    "topic": {
      "_": "tns1:Monitoring/OperatingTime/LastReset",
      "$": {
        "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
      }
    },
    "message": {
      "message": {
        "$": {
          "UtcTime": "2020-11-29T20:56:01.000Z",
          "PropertyOperation": "Initialized"
        },
        "data": {
          "simpleItem": {
            "$": {
              "Name": "Status",
              "Value": "1970-01-01T00:00:00.000Z"
            }
          }
        }
      }
    }
  }
}
+0:0:0.003: Push Event token message: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Status",
        "Value": "1970-01-01T00:00:00.000Z"
      }
    }
  }
}
+0:0:0.007: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Status",
        "Value": "1970-01-01T00:00:00.000Z"
      }
    }
  }
}
+0:0:0.003: Getting message token source: undefined
+0:0:0.006: Push Event Message Token: null
+0:0:0.003: Push Event looking for: 192.168.2.146
+0:0:0.006: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.003: Push Event found Device: 192.168.2.146
+0:0:0.005: Push Event found correct Device: 
+0:0:0.004: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.006: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:Monitoring/OperatingTime/LastReset",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "Status",
            "Value": "1970-01-01T00:00:00.000Z"
          }
        }
      }
    }
  }
}
+0:0:0.004: Event data: (bc:32:5f:47:50:6d) Monitoring/OperatingTime/LastReset: Status = Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
+0:0:0.005: Ignoring event type (bc:32:5f:47:50:6d) Monitoring/OperatingTime/LastReset: Status = Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
+0:0:0.007: Push Event detected: [
  "/onvif/events",
  "deviceId",
  "192.168.2.146"
]
+0:0:0.008: Push Event data: {
  "notificationMessage": {
    "subscriptionReference": {
      "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
    },
    "topic": {
      "_": "tns1:Monitoring/OperatingTime/LastClockSynchronization",
      "$": {
        "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
      }
    },
    "message": {
      "message": {
        "$": {
          "UtcTime": "2020-11-29T20:56:01.000Z",
          "PropertyOperation": "Initialized"
        },
        "data": {
          "simpleItem": {
            "$": {
              "Name": "Status",
              "Value": "1970-01-01T00:00:00.000Z"
            }
          }
        }
      }
    }
  }
}
+0:0:0.005: Push Event token message: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Status",
        "Value": "1970-01-01T00:00:00.000Z"
      }
    }
  }
}
+0:0:0.006: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "Status",
        "Value": "1970-01-01T00:00:00.000Z"
      }
    }
  }
}
+0:0:0.005: Getting message token source: undefined
+0:0:0.005: Push Event Message Token: null
+0:0:0.004: Push Event looking for: 192.168.2.146
+0:0:0.005: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.005: Push Event found Device: 192.168.2.146
+0:0:0.006: Push Event found correct Device: 
+0:0:0.004: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.006: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:Monitoring/OperatingTime/LastClockSynchronization",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "Status",
            "Value": "1970-01-01T00:00:00.000Z"
          }
        }
      }
    }
  }
}
+0:0:0.004: Event data: (bc:32:5f:47:50:6d) Monitoring/OperatingTime/LastClockSynchronization: Status = Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
+0:0:0.006: Ignoring event type (bc:32:5f:47:50:6d) Monitoring/OperatingTime/LastClockSynchronization: Status = Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
+0:0:0.007: Push Event detected: [
  "/onvif/events",
  "deviceId",
  "192.168.2.146"
]
+0:0:0.014: Push Event data: {
  "notificationMessage": {
    "subscriptionReference": {
      "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
    },
    "topic": {
      "_": "tns1:RecordingConfig/JobState",
      "$": {
        "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
      }
    },
    "message": {
      "message": {
        "$": {
          "UtcTime": "2020-11-29T20:56:01.000Z",
          "PropertyOperation": "Initialized"
        },
        "source": {
          "simpleItem": {
            "$": {
              "Name": "RecordingJobToken",
              "Value": "RecordJobMediaProfile00000"
            }
          }
        },
        "data": {
          "simpleItem": {
            "$": {
              "Name": "State",
              "Value": "Active"
            }
          },
          "elementItem": {
            "$": {
              "Name": "Information"
            },
            "recordingJobStateInformation": {
              "recordingToken": "RecordMediaProfile00000",
              "state": "Active",
              "sources": {
                "sourceToken": {
                  "$": {
                    "Type": "http://www.onvif.org/ver10/schema/Profile"
                  },
                  "token": "MediaProfile00000"
                },
                "state": "Active",
                "tracks": {
                  "track": [
                    {
                      "sourceTag": "VIDEO001",
                      "destination": "VIDEO001",
                      "state": "Active"
                    },
                    {
                      "sourceTag": "AUDIO001",
                      "destination": "AUDIO001",
                      "state": "Active"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
+0:0:0.008: Push Event token message: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "RecordingJobToken",
        "Value": "RecordJobMediaProfile00000"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "State",
        "Value": "Active"
      }
    },
    "elementItem": {
      "$": {
        "Name": "Information"
      },
      "recordingJobStateInformation": {
        "recordingToken": "RecordMediaProfile00000",
        "state": "Active",
        "sources": {
          "sourceToken": {
            "$": {
              "Type": "http://www.onvif.org/ver10/schema/Profile"
            },
            "token": "MediaProfile00000"
          },
          "state": "Active",
          "tracks": {
            "track": [
              {
                "sourceTag": "VIDEO001",
                "destination": "VIDEO001",
                "state": "Active"
              },
              {
                "sourceTag": "AUDIO001",
                "destination": "AUDIO001",
                "state": "Active"
              }
            ]
          }
        }
      }
    }
  }
}
+0:0:0.005: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "RecordingJobToken",
        "Value": "RecordJobMediaProfile00000"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "State",
        "Value": "Active"
      }
    },
    "elementItem": {
      "$": {
        "Name": "Information"
      },
      "recordingJobStateInformation": {
        "recordingToken": "RecordMediaProfile00000",
        "state": "Active",
        "sources": {
          "sourceToken": {
            "$": {
              "Type": "http://www.onvif.org/ver10/schema/Profile"
            },
            "token": "MediaProfile00000"
          },
          "state": "Active",
          "tracks": {
            "track": [
              {
                "sourceTag": "VIDEO001",
                "destination": "VIDEO001",
                "state": "Active"
              },
              {
                "sourceTag": "AUDIO001",
                "destination": "AUDIO001",
                "state": "Active"
              }
            ]
          }
        }
      }
    }
  }
}
+0:0:0.006: Getting message token source: {
  "simpleItem": {
    "$": {
      "Name": "RecordingJobToken",
      "Value": "RecordJobMediaProfile00000"
    }
  }
}
+0:0:0.006: Getting message token simpleItem: undefined
+0:0:0.005: Push Event Message Token: null
+0:0:0.005: Push Event looking for: 192.168.2.146
+0:0:0.006: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.005: Push Event found Device: 192.168.2.146
+0:0:0.005: Push Event found correct Device: 
+0:0:0.005: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.006: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:RecordingConfig/JobState",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "source": {
        "simpleItem": {
          "$": {
            "Name": "RecordingJobToken",
            "Value": "RecordJobMediaProfile00000"
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "State",
            "Value": "Active"
          }
        },
        "elementItem": {
          "$": {
            "Name": "Information"
          },
          "recordingJobStateInformation": {
            "recordingToken": "RecordMediaProfile00000",
            "state": "Active",
            "sources": {
              "sourceToken": {
                "$": {
                  "Type": "http://www.onvif.org/ver10/schema/Profile"
                },
                "token": "MediaProfile00000"
              },
              "state": "Active",
              "tracks": {
                "track": [
                  {
                    "sourceTag": "VIDEO001",
                    "destination": "VIDEO001",
                    "state": "Active"
                  },
                  {
                    "sourceTag": "AUDIO001",
                    "destination": "AUDIO001",
                    "state": "Active"
                  }
                ]
              }
            }
          }
        }
      }
    }
  }
}
+0:0:0.005: Event data: (bc:32:5f:47:50:6d) RecordingConfig/JobState: State = Active
+0:0:0.007: Ignoring event type (bc:32:5f:47:50:6d) RecordingConfig/JobState: State = Active
+0:0:0.008: Push Event detected: [
  "/onvif/events",
  "deviceId",
  "192.168.2.146"
]
+0:0:0.011: Push Event data: {
  "notificationMessage": {
    "subscriptionReference": {
      "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
    },
    "topic": {
      "_": "tns1:RecordingConfig/JobState",
      "$": {
        "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
      }
    },
    "message": {
      "message": {
        "$": {
          "UtcTime": "2020-11-29T20:56:01.000Z",
          "PropertyOperation": "Initialized"
        },
        "source": {
          "simpleItem": {
            "$": {
              "Name": "RecordingJobToken",
              "Value": "RecordJobMediaProfile00001"
            }
          }
        },
        "data": {
          "simpleItem": {
            "$": {
              "Name": "State",
              "Value": "Active"
            }
          },
          "elementItem": {
            "$": {
              "Name": "Information"
            },
            "recordingJobStateInformation": {
              "recordingToken": "RecordMediaProfile00001",
              "state": "Active",
              "sources": {
                "sourceToken": {
                  "$": {
                    "Type": "http://www.onvif.org/ver10/schema/Profile"
                  },
                  "token": "MediaProfile00001"
                },
                "state": "Active",
                "tracks": {
                  "track": [
                    {
                      "sourceTag": "VIDEO001",
                      "destination": "VIDEO001",
                      "state": "Active"
                    },
                    {
                      "sourceTag": "AUDIO001",
                      "destination": "AUDIO001",
                      "state": "Active"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}
+0:0:0.007: Push Event token message: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "RecordingJobToken",
        "Value": "RecordJobMediaProfile00001"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "State",
        "Value": "Active"
      }
    },
    "elementItem": {
      "$": {
        "Name": "Information"
      },
      "recordingJobStateInformation": {
        "recordingToken": "RecordMediaProfile00001",
        "state": "Active",
        "sources": {
          "sourceToken": {
            "$": {
              "Type": "http://www.onvif.org/ver10/schema/Profile"
            },
            "token": "MediaProfile00001"
          },
          "state": "Active",
          "tracks": {
            "track": [
              {
                "sourceTag": "VIDEO001",
                "destination": "VIDEO001",
                "state": "Active"
              },
              {
                "sourceTag": "AUDIO001",
                "destination": "AUDIO001",
                "state": "Active"
              }
            ]
          }
        }
      }
    }
  }
}
+0:0:0.006: Getting message token: {
  "$": {
    "UtcTime": "2020-11-29T20:56:01.000Z",
    "PropertyOperation": "Initialized"
  },
  "source": {
    "simpleItem": {
      "$": {
        "Name": "RecordingJobToken",
        "Value": "RecordJobMediaProfile00001"
      }
    }
  },
  "data": {
    "simpleItem": {
      "$": {
        "Name": "State",
        "Value": "Active"
      }
    },
    "elementItem": {
      "$": {
        "Name": "Information"
      },
      "recordingJobStateInformation": {
        "recordingToken": "RecordMediaProfile00001",
        "state": "Active",
        "sources": {
          "sourceToken": {
            "$": {
              "Type": "http://www.onvif.org/ver10/schema/Profile"
            },
            "token": "MediaProfile00001"
          },
          "state": "Active",
          "tracks": {
            "track": [
              {
                "sourceTag": "VIDEO001",
                "destination": "VIDEO001",
                "state": "Active"
              },
              {
                "sourceTag": "AUDIO001",
                "destination": "AUDIO001",
                "state": "Active"
              }
            ]
          }
        }
      }
    }
  }
}
+0:0:0.007: Getting message token source: {
  "simpleItem": {
    "$": {
      "Name": "RecordingJobToken",
      "Value": "RecordJobMediaProfile00001"
    }
  }
}
+0:0:0.005: Getting message token simpleItem: undefined
+0:0:0.006: Push Event Message Token: null
+0:0:0.005: Push Event looking for: 192.168.2.146
+0:0:0.006: Push Event comparing with ip: 192.168.2.146 Message Token: 
+0:0:0.005: Push Event found Device: 192.168.2.146
+0:0:0.006: Push Event found correct Device: 
+0:0:0.005: 
--  Event detected (bc:32:5f:47:50:6d)  --
+0:0:0.007: {
  "subscriptionReference": {
    "address": "http://192.168.2.146/onvif/Subscription?Idx=63"
  },
  "topic": {
    "_": "tns1:RecordingConfig/JobState",
    "$": {
      "Dialect": "http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet"
    }
  },
  "message": {
    "message": {
      "$": {
        "UtcTime": "2020-11-29T20:56:01.000Z",
        "PropertyOperation": "Initialized"
      },
      "source": {
        "simpleItem": {
          "$": {
            "Name": "RecordingJobToken",
            "Value": "RecordJobMediaProfile00001"
          }
        }
      },
      "data": {
        "simpleItem": {
          "$": {
            "Name": "State",
            "Value": "Active"
          }
        },
        "elementItem": {
          "$": {
            "Name": "Information"
          },
          "recordingJobStateInformation": {
            "recordingToken": "RecordMediaProfile00001",
            "state": "Active",
            "sources": {
              "sourceToken": {
                "$": {
                  "Type": "http://www.onvif.org/ver10/schema/Profile"
                },
                "token": "MediaProfile00001"
              },
              "state": "Active",
              "tracks": {
                "track": [
                  {
                    "sourceTag": "VIDEO001",
                    "destination": "VIDEO001",
                    "state": "Active"
                  },
                  {
                    "sourceTag": "AUDIO001",
                    "destination": "AUDIO001",
                    "state": "Active"
                  }
                ]
              }
            }
          }
        }
      }
    }
  }
}

This can be done with imou cameras as well.

I say this cause my imou app doesn’t send me a single motion alarm if there is no one passing in front of the camera, but on homey it reports motion like every 2/3 or 5 minutes it’s random.

@wesley_w best select all txt and hit the </> button.

1 Like

I would like trigger a snap shot when there is motion in front of the cam. preferably when it is triggerd by the PIR sensor? But this action is not supported by the ONVIF protocol? I don’t know honesly.

I can see events coming in from a digital input so maybe that is the one we need.
At the moment the app only reacts to MOTION and MOTION_ALARM. I will look into adding an option to select the events that trigger motion in the app.

1 Like

I need a better way to display that as with so many events that type of field just can’t cope.
Could you go to the developers page Homey Developer (athom.com)
Find the camera in the list (the search field helps) and locate the notificationTypes entry. From there you should be able to copy the complete list and post it back.

Adrian, your dedication to this app and thread is incredible. Been lurking in this thread since you started it. Big shout out to you man and thank you for every second you put in to this app.

2 Likes
"DIGITALINPUT,MOTION,TAMPER,FACE,SCENETEMPERATURE,FIREALARM,MOTIONALARM,ANALYTICSSERVICE,JOBSTATE,RECORDINGCONFIGURATION,TRACKCONFIGURATION,RECORDINGJOBCONFIGURATION,CREATERECORDING,DELETERECORDING,CREATETRACK,DELETETRACK,STATE,STATE,IPCONFLICT,DETECTEDSOUND,PROFILECHANGED,CONFIGURATIONCHANGED"
1 Like

This is from my developer page
“DIGITALINPUT,MOTION,TAMPER,FACE,SCENETEMPERATURE,FIREALARM,MOTIONALARM,ANALYTICSSERVICE,JOBSTATE,RECORDINGCONFIGURATION,TRACKCONFIGURATION,RECORDINGJOBCONFIGURATION,CREATERECORDING,DELETERECORDING,CREATETRACK,DELETETRACK,STATE,STATE,IPCONFLICT,DETECTEDSOUND,PROFILECHANGED,CONFIGURATIONCHANGED”

That’s the one that looks exiting, but there are a few others that look interesting as well.
I will have think about how I can make use of those. I will try to get something posted tomorrow.

1 Like