Closed sracing closed 1 year ago
Hi,
the webhook external URL is the URL the cam will invoke when a motion event is detected, so it's a URL pointing to the cam2mqtt port 8080. Usually it will be http://IP:8080
where IP
is the host where cam2mqtt is running.
Reolink cameras work OK with pull-point subscription mode, so this is the recommended mode as it is more efficient than webhook subscriptions. To set this mode: prefer_webhook_subscriptions: false
(this is the default mode).
In this mode you can ignore the webhook
config parameters and docker port redirection as they are not needed for pull-point subscriptions.
ATM, AI detection is only done while motion is detected, so events like cam2mqtt/camera/{cameraId}/event/reolink/aidetection/people/detected on/off
will only be sent between cam2mqtt/camera/{cameraId}/event/onvif/motion on
and cam2mqtt/camera/{cameraId}/event/onvif/motion off
Continuous AI detection is a planned feature. See #3
Thanks, that clarifies the 'config.yml' and 'docker-compose.yml' settings pretty much.
Seems I still have a issue with the Reolink Module part. I do not see any MQTT messages for AI detection at the time cam2mqtt/camera/{cameraId}/event/onvif/motion = on. Other expected Reolink module state messages like ..../state/reolink/record are not received or send.
I noticed, the status message in cam2mqtt reports:
cam2mqtt_1 | [INFO ] 2022-06-12 10:20:14,373 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(einfahrt,192.168.xxx.xx,8000,smarthome,redacted,List(OnvifCameraModuleConfig(true,false), ReolinkCameraModuleConfig(None,None,None,None,false)))
Is the 'ReolinkCameraModuleConfig(None,None,None,None,false)' in that status directing to a issue, that might cause not to be able to receive /send Reolink Module messages?
Hi,
I am having the same problem with RLC-810A (firmware v3.1.0.956_22041503). The Reolink module does not show any capabilities, and the only mqtt topic is "status".
Regards, Patrice
I just realized that in the latest firmwares, by default the HTTP port is disabled so this requires a config change that is not well documented. Try one of these:
reolink:
port: 443
use_ssl: true
I'll try to improve docs to avoid these kinds of problems. Thank you for your reports.
Hmmm... Seems that did not solve it completely on my side.
My camera´s port settings are:
- Media Port: 9000
- RTMP: (disabled)
- HTTP: 80
- HTTPS: 443
- RTSP: 554
- ONVIF: 8000
I did edit the config.yml, here is a cutout of the 'cameras' section:
cameras:
einfahrt:
host: 192.168.xxx.xx
port: 8000
username: xxxxx
password: yyyyy
modules:
onvif:
monitor_events: true
prefer_webhook_subscription: false
reolink:
port: 443
use_ssl: true
sync_datetime: false
That changed a bit the cam2mqtt status to:
ReolinkCameraModuleConfig(Some(443),Some(true),None,None,false)))
However, I am not getting messages related to the Reolink Module with these chages.
Anything missing?
Hi @berfenger,
Exactly the same symptoms as @sracing for me.
Regards,
Patrice
I have updated with the latest docker image. Here are the logs. It seems that the enumeration of the reolink capabilities is not working :
[INFO ] 2022-06-13 19:51:10,525 - Slf4jLogger started SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system. SLF4J: See also http://www.slf4j.org/codes.html#replay [INFO ] 2022-06-13 19:51:10,944 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_cam_1,192.168.1.65,admin,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),None,None,None,false))) [INFO ] 2022-06-13 19:51:10,973 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_cam_2,192.168.1.66,admin,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),None,None,None,false))) [INFO ] 2022-06-13 19:51:10,994 akka://cam2mqtt/user/mqtt - starting MQTT client... [INFO ] 2022-06-13 19:51:12,528 akka://cam2mqtt/user/mqtt - mqtt client successfully connected [INFO ] 2022-06-13 19:51:16,342 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif - ONVIF Capabilities for camera reolink_cam_1: Events: true Pull-Point subscription: true [INFO ] 2022-06-13 19:51:16,350 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif - ONVIF Capabilities for camera reolink_cam_2: Events: true Pull-Point subscription: true [INFO ] 2022-06-13 19:51:17,558 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_reolink - Reolink Capabilities for camera reolink_cam_2: [INFO ] 2022-06-13 19:51:17,558 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_reolink - Reolink Capabilities for camera reolink_cam_1:
I noticed a change in the HTTP API in the latest firmwares. Now it's an encrypted API (wich is not supported on cam2mqtt yet), but the old unencrypted API seems to work on my camera (RLC-520A v2). Maybe on your cameras it's not available?
Please try to run the following command using curl (replace IP and user/password):
curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?username=admin&password=yourpassword&cmd=GetIrLights"
If the unencrypted API is available, the output should be something like this:
* Trying 192.168.XX.XX:80...
* Connected to 192.168.XX.XX (192.168.XX.XX) port 80 (#0)
> GET /cgi-bin/api.cgi?username=admin&password=yourpassword&cmd=GetIrLights HTTP/1.1
> Host: 192.168.XX.XX
> User-Agent: curl/7.83.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Tue, 14 Jun 2022 10:14:40 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
<
[
{
"cmd" : "GetIrLights",
"code" : 0,
"initial" : {
"IrLights" : {
"state" : "Auto"
}
},
"range" : {
"IrLights" : {
"state" : [ "Auto", "Off" ]
}
},
"value" : {
"IrLights" : {
"state" : "Auto"
}
}
}
]
* Connection #0 to host 192.168.XX.XX left intact
Thank you
That brings us closer to the issue, thanks.
Using curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?username=admin&password=yourpassword&cmd=GetIrLights"
gets the following response:
* Trying 192.168.xxx.xx:80...
* Connected to 192.168.xxx.xx (192.168.xxx.xx) port 80 (#0)
> GET /cgi-bin/api.cgi?username=smarthome&password=yyyyyyyyyyyyyy&cmd=GetIrLights HTTP/1.1
> Host: 192.168.xxx.xx
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Tue, 14 Jun 2022 13:11:53 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
<
[
{
"cmd" : "GetIrLights",
"code" : 1,
"error" : {
"detail" : "invalid user",
"rspCode" : -27
}
}
]
From reading the Reolink specification document V5, I don´t think the "invalid user" error is relates to a newly introduced encryption, but the API requires to do get first a Token (by using a seperate login process - Page 11 of the Reolink Spec - 2.6.1 Get token first) which is not fulfilled by the test using curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?username=admin&password=yourpassword&cmd=GetIrLights"
I have zero knowledge in Scala and very limited skills in Python, but my script in Python to get the Token uses the following lines:
url = "https://" + ip + "/cgi-bin/api.cgi?cmd=Login&token=null"
headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}
data = [{"cmd": "Login", "action": 0, "param": {"User": {"userName": user, "password": password}}}]
Note: I did not really find that exactly in the Reolink specification, but it works and I can use the Token to get JSON data (despite my very limited knowlede in software).
In the specification, the GetIrLights
command is specified with http://IPC_IP/api.cgi?cmd=GetIrLights&token=TOKEN
The strange thing is, that the Token -Login Specification has always beenpart of Reolink´s specifcation since V1 in 2016, so I would assume its also part of cam2mqtt? If so, my understanding yould be the issue is somewhere else, not in a encryption issue.
By the way, I am happy to share the V5 Reolink specification (in case you do not have it) and my Python script.
Looking forward to your thoughts as I am still hoping we can get cam2mqtt working.
Does your smarthome
user have administrator rights? I think the API does only work for administrators. If so, can you try to give admin rights to that user or create another admin user?
Yes, I can confirm, the username has administrator rights in the Reolink camera.
How do you see the need to login with a Token instead of User/Password acc. to the Reolink specification? Is that a workflow that cam2mqtt uses for the Reolink HTTP API communication?
ATM no authentication state is kept, so the user and pass are included as query parameters on every API call, but this method seems not to work with every Reolink camera.
I'll try to move to a login workflow and take the opportunity to implement support for the new encrypted API. See #9
Thank you for your reports.
Hello,
I am able to get some results with CURL using POST syntax :
curl -s -k -X POST -H "Content-Type : application/json" -d '[{"cmd":"GetIrLights","action":1,"param":{}}]' "https://192.168.1.65/cgi-bin/api.cgi?user=xxxLOGINxxx&password=xxxPASSWDxxx"
Result :
[
{
"cmd" : "GetIrLights",
"code" : 0,
"initial" : {
"IrLights" : {
"state" : "Auto"
}
},
"range" : {
"IrLights" : {
"state" : [ "Auto", "Off" ]
}
},
"value" : {
"IrLights" : {
"state" : "Auto"
}
}
}
]
@sracing @pletexier can you both try this curl command?
curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?user=admin&password=yourpassword&cmd=GetIrLights"
My cameras accept both user
and username
, but maybe on some firmwares/cameras the API only support user
.
It works !
curl -v "http://192.168.1.65/cgi-bin/api.cgi?user=admin&password=xxxxxxxxxxxx&cmd=GetIrLights"
* Expire in 0 ms for 6 (transfer 0x55959dfd60)
* Trying 192.168.1.65...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x55959dfd60)
* Connected to 192.168.1.65 (192.168.1.65) port 80 (#0)
> GET /cgi-bin/api.cgi?user=admin&password=xxxxxxxxx&cmd=GetIrLights HTTP/1.1
> Host: 192.168.1.65
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 14 Jun 2022 18:00:36 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
<
[
{
"cmd" : "GetIrLights",
"code" : 0,
"initial" : {
"IrLights" : {
"state" : "Auto"
}
},
"range" : {
"IrLights" : {
"state" : [ "Auto", "Off" ]
}
},
"value" : {
"IrLights" : {
"state" : "Auto"
}
}
}
]
* Connection #0 to host 192.168.1.65 left intact
Jep. Confirmed. curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?user=admin&password=yourpassword&cmd=GetIrLights"
...works for me as well. Same response as @pletexier.
Not sure how you found that out, but I guess it makes the solution a bit simpler than changing towards Token handled requests.
Thanks for staying engaged.
Hi, I changed the queryParam username
to user
. It should now be fixed for you on the latest built image.
Thank you for the reports and the help provided once again.
Woooohoooo. It works, thanks. I can see now the Reolink module MQTT messages. Thanks for pushing this.
Just a question. I am getting some info/failure status message in cam2mqtt:
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:22,996 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStates] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:25,809 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:28,099 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [3] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:30,539 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [4] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:32,808 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [5] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:35,048 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [6] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:37,349 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [7] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:39,588 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [8] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:41,779 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [9] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
cam2mqtt_1 | [INFO ] 2022-06-15 18:05:44,110 akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStateFailure] to Actor[akka://cam2mqtt/user/cameraman/cam_einfahrt/mod_reolink/reolinkAITracker#-1052356214] was unhandled. [10] dead letters encountered, no more dead letters will be logged in next [5.000 min]. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
As said, it works, but anything that I need to do due to the message above?
Regards Marcus
Hello @berfenger ,
Thanks for this new release. As @sracing, i can now see the reolink topic in MQTT Explorer.
However, i don't receive motion detection messages. Is there something i need to do ?
Regards,
Patrice
Hi pletexier , I would highly assume you need to check the camera setup around Settings > Detection Alarm > Check the 'Person' / 'Vehicle' Box
Seems like both, the 'Onvif' Detection Alarm as well as the Reolink AI Detection Alarm(s) don´t make it to your MQTT Broker. And since any other message works well for you, I would guess its the Camera setup.....
@pletexier I think you have to play around with the motion detection sensitivity until you get motion events through MQTT. This setting is located at Settings > Camera > Detection Alarm > Sensitivity > Motion Detection.
@sracing I see on your logs multiple "GotAIStateFailure" events, that should not happen on your camera (as long as the API response is the same as mine).
Can you please run this command to check the return format?
curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?user=admin&password=yourpassword&cmd=GetAiState"
It should be something like this:
[
{
"cmd" : "GetAiState",
"code" : 0,
"value" : {
"channel" : 0,
"dog_cat" : {
"alarm_state" : 0,
"support" : 0
},
"face" : {
"alarm_state" : 0,
"support" : 0
},
"people" : {
"alarm_state" : 0,
"support" : 1
},
"vehicle" : {
"alarm_state" : 0,
"support" : 1
}
}
}
]
Thank you
To avoid misunderstandings - I can confirm I am receiving MQTT messages from the reolink/aidetection
function (those come in with quite some delay compared to the onvif/motion
function, but at least they do come in )
Using curl -v "http://192.168.XX.XX/cgi-bin/api.cgi?user=admin&password=yourpassword&cmd=GetAiState"
brings the same respons like your cam:
> Host: 192.168.xxx.xx
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Thu, 16 Jun 2022 10:50:00 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
<
[
{
"cmd" : "GetAiState",
"code" : 0,
"value" : {
"channel" : 0,
"dog_cat" : {
"alarm_state" : 0,
"support" : 0
},
"face" : {
"alarm_state" : 0,
"support" : 0
},
"people" : {
"alarm_state" : 0,
"support" : 1
},
"vehicle" : {
"alarm_state" : 0,
"support" : 1
}
}
}
]
My observation is, the info/failure status message from cam2mqtt only show up along with every positive motion detection.
Let me know in case you need further tests.
Hello @sracing,
Thanks for your replies.
I think the motion detection is correctly configured on the camera, because the recording on the sd card is correctly triggered. Moreover, the GetAiState function is correctly detetecting motions when i query the camera using curl.
However, i still receive no motion detection on the mqtt broker... neither via onvif, nor via reolink.
I suspect the problem comes from the onvif subscription not working or configured properly.
To reply to your request, here is the response to the GetAiState query. (I think it is the same as yours, but with dogcat support enabled)
* Connected to 192.168.1.65 (192.168.1.65) port 80 (#0)
> GET /cgi-bin/api.cgi?user=admin&password=xxxxxxxxxxx&cmd=GetAiState HTTP/1.1
> Host: 192.168.1.65
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 17 Jun 2022 17:27:02 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
<
[
{
"cmd" : "GetAiState",
"code" : 0,
"value" : {
"channel" : 0,
"dog_cat" : {
"alarm_state" : 0,
"support" : 1
},
"face" : {
"alarm_state" : 0,
"support" : 0
},
"people" : {
"alarm_state" : 0,
"support" : 1
},
"vehicle" : {
"alarm_state" : 0,
"support" : 1
}
}
}
]
Thank you again to take the time to support and develop this software.
Regards,
Patrice
Sorry, just back from vacation...
OK, agree. Seems not to be a issue coming from the camera settings. Strange. Are you using the "webhook subscription" mode? Maybe thats a difference because I am not using this mode.
Unless @berfenger has a better idea, let me post my cam2mqtt config file just to make sure your config is fine:
config.yml:
mqtt:
host: 192.168.nnn.nn
port: 1883
username: XXXXXXXXXX
password: YYYYYYYYYYY
#base_name: cam2mqtt
ssl: false
webhook:
# external_url: http://[cam2mqtt-host-IP]:8080
external_url: http://192.168.zzz.zz:8080 # only needed for webhook subscriptions
cameras:
einfahrt:
host: 192.168.xxx.xx
port: 8000
username: XXXXXXX
password: YYYYYYYYYYYY
modules:
onvif:
monitor_events: true
prefer_webhook_subscription: false
reolink:
port: 443
use_ssl: true
# username: user
# password: secret
sync_datetime: false
ATM, AI detection is only done while motion is detected. So, @pletexier you may have to turn the motion sensitivity slider all the way up (Settings > Camera > Detection Alarm > Sensitivity > Motion Detection). After this change, you should receive motion events through MQTT. Ensure that you are using this config for the onvif module:
onvif:
monitor_events: true
prefer_webhook_subscription: false
@sracing can you post your Reolink camera model in order to add it to the compatibility list? Thank you.
I'm having the same issues (new configuration). The camera is connected and capabilities are discovered, however motion is not reported at all.
The camera I'm using is the RLC-822A.
INFO ] 2022-06-23 12:06:45,761 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_front,192.168.10.100,motion,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),None,None,None,false)))
[INFO ] 2022-06-23 12:06:46,496 akka://cam2mqtt/user/mqtt - starting MQTT client...
[INFO ] 2022-06-23 12:06:51,561 akka://cam2mqtt/user/mqtt - mqtt client successfully connected
[INFO ] 2022-06-23 12:06:53,363 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif - ONVIF Capabilities for camera reolink_front:
Events: true
Pull-Point subscription: true
PTZ: true
[INFO ] 2022-06-23 12:06:56,113 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_reolink - Reolink Capabilities for camera reolink_front:
IR lights: true
Night vision: true
Record (V2): true
FTP (V2): true
PTZ Zoom: true
AI Detection: true
@berfenger: My model is a Reolink RLC-523WA (latest firmware version v3.1.0.804_22011510)
Hello all,
Sorry for the long delay. On my installation, webhook subscription is disabled.
I made some tests with motion detection configured at the maximum, but still not better.
Regards,
Patrice
Hello again,
Maybe i found something in the release notes of the firmware of the camera :
1.Upgraded ONVIF protocol to version 21.06
Perhaps there is something to adapt to this new version of the onvif protocol ?
Regards,
Patrice
Hi, cam2mqtt is an awesome project!
I can confirm I am experiencing the same issue after upgrading my 811A to the firmware released in April 2022. ONVIF protocol was upgraded as part of the April firmware release.
I rolled back to the previous firmware and everything works as expected.
There were also some changes to the main stream according to Reolink support. I can use h265 or h264 now when lowering the main stream resolution.
@pletexier @andre-sam Thank you for your reports. That seems to be the source of the problem (1.Upgraded ONVIF protocol to version 21.06
). Don't update the firmware for now or return to a previous firmware if possible.
I'll try to fix it, but I don't have a camera with an april's firmware available for now. I have a RLC-520A but they didn't release the firmware for the hw version 2 yet.
If you have the chance, please try the following on the new april firmware (where ONVIF subscription does not seem to work).
On docker-compose.yml
add this environment parameter:
environment:
# this will be the camera timezone when the camera type is updated by reolink module (reolink.sync_datetime = true)
- TZ=Europe/Paris
- CAM2MQTT_OPTS="-Dlogback.configurationFile=logback-debug.xml"
Then run cam2mqtt and post the logs. You can view the logs by running $ docker-compose logs
Thank you.
Hello @berfenger,
Is this the log you are expecting ?
2022-06-27T19:42:58.171249646Z [INFO ] 2022-06-27 21:42:58,159 - Slf4jLogger started
2022-06-27T19:42:58.172090249Z SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are
2022-06-27T19:42:58.172304080Z SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
2022-06-27T19:42:58.172509504Z SLF4J: See also http://www.slf4j.org/codes.html#replay
2022-06-27T19:42:58.562292894Z [DEBUG] 2022-06-27 21:42:58,560 akka://cam2mqtt/user/cameraman - Starting cameraMan from config
2022-06-27T19:42:58.607746209Z [INFO ] 2022-06-27 21:42:58,607 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_cam_1,192.168.1.65,admin,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(None,None,None,None,false)))
2022-06-27T19:42:58.659101377Z [INFO ] 2022-06-27 21:42:58,658 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_cam_2,192.168.1.66,admin,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(None,None,None,None,false)))
2022-06-27T19:42:58.748295968Z [INFO ] 2022-06-27 21:42:58,747 akka://cam2mqtt/user/mqtt - starting MQTT client...
2022-06-27T19:43:00.617791770Z [INFO ] 2022-06-27 21:43:00,617 akka://cam2mqtt/user/mqtt - mqtt client successfully connected
2022-06-27T19:43:05.170265882Z [INFO ] 2022-06-27 21:43:05,169 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif - ONVIF Capabilities for camera reolink_cam_1:
2022-06-27T19:43:05.170391566Z Events: true
2022-06-27T19:43:05.170411510Z Pull-Point subscription: true
2022-06-27T19:43:05.170428899Z [INFO ] 2022-06-27 21:43:05,169 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif - ONVIF Capabilities for camera reolink_cam_2:
2022-06-27T19:43:05.170445677Z Events: true
2022-06-27T19:43:05.170462862Z Pull-Point subscription: true
2022-06-27T19:43:05.184054883Z [DEBUG] 2022-06-27 21:43:05,183 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - starting pullpoint subscription on device CameraInfo(reolink_cam_1,192.168.1.65,admin,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(None,None,None,None,false)))
2022-06-27T19:43:05.190667228Z [DEBUG] 2022-06-27 21:43:05,190 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - starting pullpoint subscription on device CameraInfo(reolink_cam_2,192.168.1.66,admin,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(None,None,None,None,false)))
2022-06-27T19:43:05.290259759Z [DEBUG] 2022-06-27 21:43:05,289 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49902
2022-06-27T19:43:05.291155695Z [DEBUG] 2022-06-27 21:43:05,290 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49897
2022-06-27T19:43:05.408077897Z [TRACE] 2022-06-27 21:43:05,407 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:05.425984062Z [TRACE] 2022-06-27 21:43:05,425 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:06.721549989Z [INFO ] 2022-06-27 21:43:06,720 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_reolink - Reolink Capabilities for camera reolink_cam_2:
2022-06-27T19:43:06.721762635Z IR lights: true
2022-06-27T19:43:06.721786432Z Night vision: true
2022-06-27T19:43:06.721802413Z Record (V2): true
2022-06-27T19:43:06.721840764Z FTP (V2): true
2022-06-27T19:43:06.721857116Z AI Detection: true
2022-06-27T19:43:06.721873134Z [INFO ] 2022-06-27 21:43:06,720 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_reolink - Reolink Capabilities for camera reolink_cam_1:
2022-06-27T19:43:06.721889653Z IR lights: true
2022-06-27T19:43:06.721929412Z Night vision: true
2022-06-27T19:43:06.721944504Z Record (V2): true
2022-06-27T19:43:06.721959967Z FTP (V2): true
2022-06-27T19:43:06.721975374Z AI Detection: true
2022-06-27T19:43:15.497956768Z [TRACE] 2022-06-27 21:43:15,497 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:15.499995378Z [TRACE] 2022-06-27 21:43:15,499 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:25.585795621Z [TRACE] 2022-06-27 21:43:25,584 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:25.644537052Z [TRACE] 2022-06-27 21:43:25,643 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:35.684621985Z [TRACE] 2022-06-27 21:43:35,681 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:35.744838920Z [TRACE] 2022-06-27 21:43:35,744 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:45.768764915Z [TRACE] 2022-06-27 21:43:45,765 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:45.808352117Z [TRACE] 2022-06-27 21:43:45,807 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:55.210463231Z [DEBUG] 2022-06-27 21:43:55,209 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - Renew subscription
2022-06-27T19:43:55.229664218Z [DEBUG] 2022-06-27 21:43:55,219 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - Renew subscription
2022-06-27T19:43:55.309787447Z [DEBUG] 2022-06-27 21:43:55,309 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49914
2022-06-27T19:43:55.322232201Z [DEBUG] 2022-06-27 21:43:55,321 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49892
2022-06-27T19:43:55.828496781Z [TRACE] 2022-06-27 21:43:55,827 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:43:55.871270361Z [TRACE] 2022-06-27 21:43:55,870 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:05.925746634Z [TRACE] 2022-06-27 21:44:05,925 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:05.957530428Z [TRACE] 2022-06-27 21:44:05,956 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:16.014810236Z [TRACE] 2022-06-27 21:44:16,013 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:16.032418718Z [TRACE] 2022-06-27 21:44:16,031 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:26.099475404Z [TRACE] 2022-06-27 21:44:26,098 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:26.134066709Z [TRACE] 2022-06-27 21:44:26,133 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:36.198081079Z [TRACE] 2022-06-27 21:44:36,195 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:36.226323128Z [TRACE] 2022-06-27 21:44:36,225 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:36.908587469Z [TRACE] 2022-06-27 21:44:36,908 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:45.242037206Z [DEBUG] 2022-06-27 21:44:45,238 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - Renew subscription
2022-06-27T19:44:45.253013918Z [DEBUG] 2022-06-27 21:44:45,249 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - Renew subscription
2022-06-27T19:44:45.309166093Z [DEBUG] 2022-06-27 21:44:45,308 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49934
2022-06-27T19:44:45.319266628Z [DEBUG] 2022-06-27 21:44:45,318 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49934
2022-06-27T19:44:46.009034618Z [TRACE] 2022-06-27 21:44:46,008 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:46.289854327Z [TRACE] 2022-06-27 21:44:46,288 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:56.102593526Z [TRACE] 2022-06-27 21:44:56,101 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:56.361251257Z [TRACE] 2022-06-27 21:44:56,360 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:44:56.581779532Z [TRACE] 2022-06-27 21:44:56,580 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:45:06.453902572Z [TRACE] 2022-06-27 21:45:06,449 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:45:06.454037071Z [TRACE] 2022-06-27 21:45:06,449 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:45:16.514155204Z [TRACE] 2022-06-27 21:45:16,512 akka://cam2mqtt/user/cameraman/cam_reolink_cam_1/mod_onvif/subscription - pulled 0 messages
2022-06-27T19:45:16.544429215Z [TRACE] 2022-06-27 21:45:16,543 akka://cam2mqtt/user/cameraman/cam_reolink_cam_2/mod_onvif/subscription - pulled 0 messages
@pletexier It's kind of useful. The subscription seems to be correctly initialized, but no message is pulled. Did you issue some motion in front of the camera while that log was gathered? When motion starts a message "pulled 1 messages" should be displayed. And the same should happen when motion detection stops. If no motion was issued, can you repeat the test with motion to see if any message is pulled from the subscription? Thank you.
@berfenger I've done the same and got the same log. In the meantime I've seen in the app that first, the motion was detected, then a person was indicated.
SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system. SLF4J: See also http://www.slf4j.org/codes.html#replay [DEBUG] 2022-06-29 10:03:51,776 akka://cam2mqtt/user/cameraman - Starting cameraMan from config [INFO ] 2022-06-29 10:03:51,834 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_front,192.168.10.100,motion,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),Some(true),None,None,false))) [INFO ] 2022-06-29 10:03:52,565 akka://cam2mqtt/user/mqtt - starting MQTT client... [INFO ] 2022-06-29 10:03:57,662 akka://cam2mqtt/user/mqtt - mqtt client successfully connected [INFO ] 2022-06-29 10:03:59,073 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif - ONVIF Capabilities for camera reolink_front: Events: true Pull-Point subscription: true PTZ: true [DEBUG] 2022-06-29 10:03:59,112 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - starting pullpoint subscription on device CameraInfo(reolink_front,192.168.10.100,motion,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),Some(true),None,None,false))) [DEBUG] 2022-06-29 10:03:59,337 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49789 [TRACE] 2022-06-29 10:03:59,548 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:04:00,701 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [INFO ] 2022-06-29 10:04:02,053 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_reolink - Reolink Capabilities for camera reolink_front: IR lights: true Night vision: true Record (V2): true FTP (V2): true PTZ Zoom: true AI Detection: true [TRACE] 2022-06-29 10:04:02,656 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:04:12,875 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:04:23,015 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:04:33,206 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:04:38,805 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:04:43,265 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [DEBUG] 2022-06-29 10:04:49,151 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - Renew subscription [DEBUG] 2022-06-29 10:04:49,348 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49824 [TRACE] 2022-06-29 10:04:51,813 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [TRACE] 2022-06-29 10:05:01,953 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages [
To verify the camera configuration I've used node-onvif-events (node). Works as expected...
pawelurban@MacBook-Pro-3 ~> node camera.js
2022-06-29T10:35:55.229Z >> Motion Detection Listening!!
2022-06-29T10:36:10.139Z >> Motion Detected
2022-06-29T10:36:16.047Z >> Motion Stopped
2022-06-29T10:36:23.568Z >> Motion Detected
2022-06-29T10:36:41.073Z >> Motion Stopped
2022-06-29T10:36:46.139Z >> Motion Detected
2022-06-29T10:36:47.973Z >> Motion Stopped
Maybe the format of the message changed slightly. I have added a trace log to log the message XML. Please pull the image again and run it with debug log to see the full XML message.
$ docker-compose pull && docker-compose up -d
I'm not using compose but here you go
[INFO ] 2022-06-29 11:51:01,825 - Slf4jLogger started
SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are
SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#replay
[DEBUG] 2022-06-29 11:51:03,325 akka://cam2mqtt/user/cameraman - Starting cameraMan from config
[INFO ] 2022-06-29 11:51:03,388 akka://cam2mqtt/user/cameraman - Starting cam CameraInfo(reolink_front,192.168.10.100,motion,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),Some(true),None,None,false)))
[INFO ] 2022-06-29 11:51:04,138 akka://cam2mqtt/user/mqtt - starting MQTT client...
[INFO ] 2022-06-29 11:51:09,283 akka://cam2mqtt/user/mqtt - mqtt client successfully connected
[INFO ] 2022-06-29 11:51:10,883 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif - ONVIF Capabilities for camera reolink_front:
Events: true
Pull-Point subscription: true
PTZ: true
[DEBUG] 2022-06-29 11:51:10,910 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - starting pullpoint subscription on device CameraInfo(reolink_front,192.168.10.100,motion,redacted,List(OnvifCameraModuleConfig(8000,true,false), ReolinkCameraModuleConfig(Some(443),Some(true),None,None,false)))
[DEBUG] 2022-06-29 11:51:11,128 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pullpoint subscription renewed: millis remaining until next renew = 49792
[TRACE] 2022-06-29 11:51:11,290 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - subscription message: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:ns1="http://www.onvif.org/ver20/media/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
xmlns:trp="http://www.onvif.org/ver10/replay/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl">
<SOAP-ENV:Header>
<wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.10.100:8000/onvif/PullSubManager?Idx=909232790</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action>
<wsse:Security>
<wsse:UsernameToken wsu:Id="UsernameToken-1bdb8922-7429-4e4e-99d0-7d7b40d8b2cc">
<wsse:Username>motion</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">REMOVED :)</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">ZTM4OWFjM2ItNTk2Mi00MjE3LWE3ZjYtMzkzY2Q1YmVjNTkw</wsse:Nonce>
<wsu:Created>2022-06-29T11:51:11.000+0000</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>2022-06-29T11:51:11Z</tev:CurrentTime>
<tev:TerminationTime>2022-06-29T11:52:10Z</tev:TerminationTime>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector/Motion</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T11:50:20Z" PropertyOperation="Initialized">
<tt:Source>
<tt:SimpleItem Name="VideoSourceConfigurationToken" Value="000" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="IsMotion" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/MyRuleDetector/FaceDetect</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="1970-01-01T00:00:00Z" PropertyOperation="Initialized">
<tt:Source>
<tt:SimpleItem Name="Source" Value="VideoSourceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/MyRuleDetector/PeopleDetect</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T10:45:41Z" PropertyOperation="Initialized">
<tt:Source>
<tt:SimpleItem Name="Source" Value="VideoSourceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/MyRuleDetector/VehicleDetect</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T09:19:42Z" PropertyOperation="Initialized">
<tt:Source>
<tt:SimpleItem Name="Source" Value="VideoSourceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/MyRuleDetector/DogCatDetect</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-28T20:53:41Z" PropertyOperation="Initialized">
<tt:Source>
<tt:SimpleItem Name="Source" Value="VideoSourceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T11:50:20Z" PropertyOperation="Initialized">
<tt:Source>
<tt:SimpleItem Name="Source" Value="000" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
</tev:PullMessagesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[TRACE] 2022-06-29 11:51:11,376 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages
[INFO ] 2022-06-29 11:51:13,592 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_reolink - Reolink Capabilities for camera reolink_front:
IR lights: true
Night vision: true
Record (V2): true
FTP (V2): true
PTZ Zoom: true
AI Detection: true
[TRACE] 2022-06-29 11:51:21,526 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - subscription message: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:ns1="http://www.onvif.org/ver20/media/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
xmlns:trp="http://www.onvif.org/ver10/replay/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl">
<SOAP-ENV:Header>
<wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.10.100:8000/onvif/PullSubManager?Idx=909232790</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action>
<wsse:Security>
<wsse:UsernameToken wsu:Id="UsernameToken-eec56a83-737e-409b-b19a-f628232ab4c5">
<wsse:Username>motion</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">REMOVED :)</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MGY5MzVmNzQtY2ExNi00ZjA3LWE5Y2ItYTQ3ODliNWJlOGJl</wsse:Nonce>
<wsu:Created>2022-06-29T11:51:11.000+0000</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>2022-06-29T11:51:11Z</tev:CurrentTime>
<tev:TerminationTime>2022-06-29T11:52:10Z</tev:TerminationTime>
</tev:PullMessagesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[TRACE] 2022-06-29 11:51:21,553 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages
[TRACE] 2022-06-29 11:51:31,667 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - subscription message: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:ns1="http://www.onvif.org/ver20/media/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
xmlns:trp="http://www.onvif.org/ver10/replay/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl">
<SOAP-ENV:Header>
<wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.10.100:8000/onvif/PullSubManager?Idx=909232790</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action>
<wsse:Security>
<wsse:UsernameToken wsu:Id="UsernameToken-51f019d2-c4f0-4576-abfc-a5b9623a86f8">
<wsse:Username>motion</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">REMOVED
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MjJiN2U2Y2UtMWExYS00NzRmLThjZGQtMWRmMTVjYTU2YTRm</wsse:Nonce>
<wsu:Created>2022-06-29T11:51:21.000+0000</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>2022-06-29T11:51:21Z</tev:CurrentTime>
<tev:TerminationTime>2022-06-29T11:52:10Z</tev:TerminationTime>
</tev:PullMessagesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[TRACE] 2022-06-29 11:51:31,695 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages
[TRACE] 2022-06-29 11:51:34,411 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - subscription message: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:ns1="http://www.onvif.org/ver20/media/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
xmlns:trp="http://www.onvif.org/ver10/replay/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl">
<SOAP-ENV:Header>
<wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.10.100:8000/onvif/PullSubManager?Idx=909232790</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action>
<wsse:Security>
<wsse:UsernameToken wsu:Id="UsernameToken-467fbcb7-a933-461b-970c-c96592a6ba23">
<wsse:Username>motion</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">REMOVED</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">NjlmZGEyNTQtN2EwMi00YWMyLWI0ZjEtZjJiM2JhMDYwN2I3</wsse:Nonce>
<wsu:Created>2022-06-29T11:51:31.000+0000</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>2022-06-29T11:51:31Z</tev:CurrentTime>
<tev:TerminationTime>2022-06-29T11:52:10Z</tev:TerminationTime>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector/Motion</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T11:51:33Z" PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem Name="VideoSourceConfigurationToken" Value="000" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="IsMotion" Value="true" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:VideoSource/MotionAlarm</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T11:51:33Z" PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem Name="Source" Value="000" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="true" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
</tev:PullMessagesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[TRACE] 2022-06-29 11:51:34,451 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages
That log was very useful. Motion event parsing should be fixed now. Just pull the image and it should work.
I can see on the logs that other topics are being initialized, those corresponding to AI detection capabilities:
RuleEngine/MyRuleDetector/PeopleDetect
RuleEngine/MyRuleDetector/FaceDetect
RuleEngine/MyRuleDetector/VehicleDetect
RuleEngine/MyRuleDetector/DogCatDetect
When people are detected, does it log a message containing RuleEngine/MyRuleDetector/PeopleDetect
state change?
If this is true, I can implement AI detection through ONVIF more efficiently and in real time.
Thank you for your contributions.
@berfenger I've ran locally, building from the master. So far I can tell that motion detection is working well. :) Good job!
Also, AI detection seems to be reporting as well!
SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:ns1="http://www.onvif.org/ver20/media/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
xmlns:trp="http://www.onvif.org/ver10/replay/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl">
<SOAP-ENV:Header>
<wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.10.100:8000/onvif/PullSubManager?Idx=942380090</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action>
<wsse:Security>
<wsse:UsernameToken wsu:Id="UsernameToken-20779e29-e4d9-463d-8012-44b0f3665eb8">
<wsse:Username>motion</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">xxx</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">Mzk5OWExMjItODlmNi00ZDNmLTk0OGEtMmM1ZDEzNzI4ZTc2</wsse:Nonce>
<wsu:Created>2022-06-29T23:05:37.000+0200</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>2022-06-29T21:05:37Z</tev:CurrentTime>
<tev:TerminationTime>2022-06-29T21:06:18Z</tev:TerminationTime>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/MyRuleDetector/PeopleDetect</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T21:05:46Z" PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem Name="Source" Value="VideoSourceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="true" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
</tev:PullMessagesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
[TRACE] 2022-06-29 23:05:47,104 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - pulled 0 messages
[TRACE] 2022-06-29 23:05:55,856 akka://cam2mqtt/user/cameraman/cam_reolink_front/mod_onvif/subscription - subscription message: <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion"
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:ns1="http://www.onvif.org/ver20/media/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trc="http://www.onvif.org/ver10/recording/wsdl"
xmlns:trp="http://www.onvif.org/ver10/replay/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl"
xmlns:tse="http://www.onvif.org/ver10/search/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl">
<SOAP-ENV:Header>
<wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.10.100:8000/onvif/PullSubManager?Idx=942380090</wsa5:To>
<wsa5:Action SOAP-ENV:mustUnderstand="1">http://www.onvif.org/ver10/events/wsdl/PullPointSubscription/PullMessagesResponse</wsa5:Action>
<wsse:Security>
<wsse:UsernameToken wsu:Id="UsernameToken-94745556-1c5d-4e83-9706-a7d79adb9b5b">
<wsse:Username>motion</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">xxx</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">N2JlZTBiOWEtZjIxYS00MzFlLWE4OTYtMmI2Yjg4NmRkYWYw</wsse:Nonce>
<wsu:Created>2022-06-29T23:05:47.000+0200</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:PullMessagesResponse>
<tev:CurrentTime>2022-06-29T21:05:47Z</tev:CurrentTime>
<tev:TerminationTime>2022-06-29T21:06:18Z</tev:TerminationTime>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/MyRuleDetector/PeopleDetect</wsnt:Topic>
<wsnt:Message>
<tt:Message UtcTime="2022-06-29T21:05:55Z" PropertyOperation="Changed">
<tt:Source>
<tt:SimpleItem Name="Source" Value="VideoSourceToken" />
</tt:Source>
<tt:Data>
<tt:SimpleItem Name="State" Value="false" />
</tt:Data>
</tt:Message>
</wsnt:Message>
</wsnt:NotificationMessage>
</tev:PullMessagesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Are you sure you've pushed a docker image with that change? Docker image instance on my server doesn't seem to have that change...
@uKL I'm not sure, honestly. Yesterday Github Actions suffered a global outage and it seemed that the image building was ok, but maybe it wasn't. I just re-run the build actions to build and upload the image again. Now it should be working ok.
BTW, It seems that people at Reolink implemented AI detection reporting through ONVIF subscriptions. Finally!! I will be able to implement this functionality anytime soon. Thank you again.
@berfenger I'm looking forward to that :)
This time the image is OK. I'm not a Scala developer but I'm proficient in Java & Kotlin. Maybe I'll try to implement AI detection some evening :D
@uKL It is now implemented on the latest image version. Please test it and let me know if it works before adding it to docs.
The AI detection events through ONVIF should be received on this topic:
cam2mqtt/camera/${cameraId}/event/onvif/object/people/detected on/off
@berfenger In fact, it does work :) I'll give it more testing. However, it would be helpful to have a generic topic like "any motion". I've noticed that if a person is detected then "onvif/motion" is not reported but the "object/people/detected".
Please ignore values, they are mapped to 0/1 from false/true.
Hello @berfenger ,
Everything is working for me now.
I will use cam2mqtt, reolink ai detection and jeedom to close the shutters if a person is detected in the garden when we are away.
Thank you for your nice work and for your perseverance.
Regards,
Patrice
Hi
Since you mentined some changes on the latest release, I am testing cam2mqtt with a Reolink RLC-523WA with the latest firmware version v3.1.0.804_22011510. While the 'Onvif Module' works flawless, unfortunately I can not see any messages from the 'Reolink Module' in my MQTT broker.
I would assume the following is critical in the config.yml to have the 'Reolink Module' working:
Also on the 'docker-compose.yml', should I also add the port 8000 under services: cam2mqtt: ports: ?
Thanks for a short comment / confirmation on the config.yml and 'docker-compose.yml' settings. Also, any other idea how to get the 'Reolink Module' working is appreciated.
Regards Marcus