cam2mqtt
cam2mqtt copied to clipboard
No MQTT Messages from 'Reolink Module' (Config-Issue?)
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:
- webhook: external_url: http://192.168.xxx.xx:8000 ==> This is expected to represent the camera IP with the 'Onvif-Port' (Reolink Onvif Standard Port = 8000) ?
- cameras: camera-id: modules: onvif: prefer_webhook_subscriptions: ==> Set to 'true' ?
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
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:
- Enable HTTP port on the camera:
- Go to Settings, Network Settings, Advanced, Port Settings and enable HTTP (keep port 80).
- Change config on cam2mqtt to use HTTPS:
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.