berfenger / cam2mqtt Goto Github PK
View Code? Open in Web Editor NEWControl IP cameras through MQTT reliably. Supports ONVIF (motion) and HTTP (reolink) control APIs.
License: Apache License 2.0
Control IP cameras through MQTT reliably. Supports ONVIF (motion) and HTTP (reolink) control APIs.
License: Apache License 2.0
Not an issue.
Just wanted to confirm that it works via ONVIF (default port: 8000) with a Reolink RLC-811A. I have not tested the Reolink specific stuff but ONVIF motion events happily appear on MQTT.
Thanks for the good work!
Hello!
I hope someone can help?
I dont know where to copy the config.yml file with docker cp?!
When i start the container it stops with the error "could not parse config file"
Thank you for help :)
Hi,
on my Reolink RLC520A V2 I was running firmware "v3.1.0.989_22081701" which worked as extected.
After updating the firmware with IPC_523128M5MP_V2.2368_23062701.RLC-520A.OV05A10.5MP.REOLINK.pak the status stays on offline, nevertheless which parameter I choose in the settings. After re-installing to v3.1.0.989_22081701 it works again.
This is, what the log says:
2023-10-23 13:13:21 | stdout | [INFO ] 2023-10-23 13:13:21,949 akka://cam2mqtt/user/cameraman/cam_CamKEI/mod_reolink/reolinkAITracker - Message [net.bfgnet.cam2mqtt.camera.modules.reolink.ReolinkAIDetectionTrackingActor$GotAIStates] to Actor[akka://cam2mqtt/user/cameraman/cam_CamKEI/mod_reolink/reolinkAITracker#607064928] 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'. |
---|---|---|
2023-10-23 13:13:19 | stdout | [INFO ] 2023-10-23 13:13:19,016 akka://cam2mqtt/user/cameraman/cam_CamFLI/mod_reolink - Message [scala.util.Success] wrapped in [akka.actor.typed.internal.AdaptMessage] to Actor[akka://cam2mqtt/user/cameraman/cam_CamFLI/mod_reolink#-1911425607] was not delivered. [5] dead letters encountered. If this is not an expected behavior then Actor[akka://cam2mqtt/user/cameraman/cam_CamFLI/mod_reolink#-1911425607] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'. |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) |
2023-10-23 13:13:18 | stdout | at akka.dispatch.Mailbox.exec(Mailbox.scala:243) |
2023-10-23 13:13:18 | stdout | at akka.dispatch.Mailbox.run(Mailbox.scala:231) |
2023-10-23 13:13:18 | stdout | at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) |
2023-10-23 13:13:18 | stdout | at akka.actor.ActorCell.invoke(ActorCell.scala:545) |
2023-10-23 13:13:18 | stdout | at akka.actor.ActorCell.autoReceiveMessage(ActorCell.scala:562) |
2023-10-23 13:13:18 | stdout | at akka.actor.ActorCell.receivedTerminated(ActorCell.scala:410) |
2023-10-23 13:13:18 | stdout | at akka.actor.dungeon.DeathWatch.receivedTerminated$(DeathWatch.scala:69) |
2023-10-23 13:13:18 | stdout | at akka.actor.dungeon.DeathWatch.receivedTerminated(DeathWatch.scala:70) |
2023-10-23 13:13:18 | stdout | at scala.Option.foreach(Option.scala:437) |
2023-10-23 13:13:18 | stdout | at akka.actor.dungeon.DeathWatch.$anonfun$receivedTerminated$1$adapted(DeathWatch.scala:70) |
2023-10-23 13:13:18 | stdout | at akka.actor.dungeon.DeathWatch.$anonfun$receivedTerminated$1(DeathWatch.scala:79) |
2023-10-23 13:13:18 | stdout | at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:91) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.adapter.ActorAdapter.handleSignal(ActorAdapter.scala:138) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.Behavior$.interpretSignal(Behavior.scala:236) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.Behavior$.interpret(Behavior.scala:273) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.InterceptorImpl.receiveSignal(InterceptorImpl.scala:92) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.RestartSupervisor.aroundSignal(Supervision.scala:263) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.AbstractSupervisor.aroundSignal(Supervision.scala:83) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.InterceptorImpl$anon$3.apply(InterceptorImpl.scala:67) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.Behavior$.interpretSignal(Behavior.scala:236) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.Behavior$.interpret(Behavior.scala:273) |
2023-10-23 13:13:18 | stdout | at akka.actor.typed.internal.BehaviorImpl$ReceiveBehavior.receiveSignal(BehaviorImpl.scala:133) |
2023-10-23 13:13:18 | stdout | at net.bfgnet.cam2mqtt.camera.Camera$anonfun$net$bfgnet$cam2mqtt$camera$Camera$routing$2.applyOrElse(Camera.scala:70) |
2023-10-23 13:13:18 | stdout | at net.bfgnet.cam2mqtt.camera.Camera$anonfun$net$bfgnet$cam2mqtt$camera$Camera$routing$2.applyOrElse(Camera.scala:72) |
2023-10-23 13:13:18 | stdout | java.lang.Exception: escalate failure |
2023-10-23 13:13:18 | stdout | [ERROR] 2023-10-23 13:13:18,759 akka://cam2mqtt/user/cameraman/cam_CamFLI - Supervisor RestartSupervisor saw failure [5]: escalate failure |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) |
2023-10-23 13:13:18 | stdout | at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) |
2023-10-23 13:13:18 | stdout | at akka.dispatch.Mailbox.exec(Mailbox.scala:243) |
2023-10-23 13:13:18 | stdout | at akka.dispatch.Mailbox.run(Mailbox.scala:231) |
2023-10-23 13:13:18 | stdout | at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) |
2023-10-23 13:13:18 | stdout | at akka.actor.ActorCell.invoke(ActorCell.scala:547) |
2023-10-23 13:13:18 | stdout | at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579) |
2023-10-23 13:13:18 | stdout | at akka.io.TcpConnection.aroundReceive(TcpConnection.scala:33) |
2023-10-23 13:13:18 | stdout | at akka.actor.Actor.aroundReceive$(Actor.scala:535) |
2023-10-23 13:13:18 | stdout | at akka.actor.Actor.aroundReceive(Actor.scala:537) |
2023-10-23 13:13:18 | stdout | at akka.io.TcpOutgoingConnection$anonfun$connecting$1.applyOrElse(TcpOutgoingConnection.scala:111) |
2023-10-23 13:13:18 | stdout | at akka.io.TcpOutgoingConnection.akka$io$TcpOutgoingConnection$reportConnectFailure(TcpOutgoingConnection.scala:53) |
2023-10-23 13:13:18 | stdout | at akka.io.TcpOutgoingConnection$anonfun$connecting$1.$anonfun$applyOrElse$4(TcpOutgoingConnection.scala:111) |
2023-10-23 13:13:18 | stdout | at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946) |
2023-10-23 13:13:18 | stdout | at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) |
2023-10-23 13:13:18 | stdout | at java.base/sun.nio.ch.Net.pollConnect(Native Method) |
2023-10-23 13:13:18 | stdout | Caused by: java.net.ConnectException: Connection refused |
2023-10-23 13:13:18 | stdout | akka.stream.StreamTcpException: Tcp command [Connect(192.168.30.248/:8000,None,List(),Some(10 seconds),true)] failed because of java.net.ConnectException: Connection refused |
Can you please take a look?
Thanks
An update can be made to the documentation.
I've connected an CX410 and this works as expected.
motion and person detection successfully triggered and received in MQTT.
Use a token based authentication instead of the current implementation that does not work on every camera.
Take the opportunity to implement support for the new encrypted API.
Hi Arturo,
I would like to implement new commands to Reolink Cameras.
(for example, ability to enable/disable notifications).
I'm not familiar with Scala, so can you explain me how the program is structured ?
My goal is to include this onvif/mqtt gateway in a Jeedom Plugin (domotic controller).
Regards,
Patrice
Hello,
I was fighting to understand why no Reolink capabilities was found during this evening up to i try to remove a special character in the password of my cameras.
I have a "!" in my password, and it doesn't work, without this special character it is working.
Can you handle special character ?
thx
would it be possible to evaluate the following event?
tns1:RuleEngine/MyRuleDetector/Visitor
thanks
Is possible have information about how install and configure it to works with more that one camera?
I have installed the docker image and create a config.yml file but when I try to run
docker run -v /home/array81/cam2mqtt:/config acasal/cam2mqtt
I get error about config file not found but the config.yml is inside /home/array81/cam2mqtt folder
Hi,
I get alerts for objects which are outside of the detection zone of my camera.
Is this an issue of cam2mqtt (maybe a known limitation) or maybe an issue with the Reolink-API being used?
Thanks.
Hello,
I just discover your project and would run it on my Docker but i'm facing an issue :
Error response from daemon: Could not check if docker-default AppArmor profile was loaded: open /sys/kernel/security/apparmor/profiles: no such file or directory
Can you help me ? Docker is the latest version, installed on Debian10 up to date (SMP Debian 5.10.205-2 (2023-12-31))
thx
Check cam AI detection state through GetAiState API calls doing periodic polling to send events to MQTT when AI detection state changes.
Now this is done only while movement is detected using ONVIF motion events.
Implement command to go to PTZ preset through Reolink HTTP API.
Requested on #2
I have an issue with my Reolink E1 Zoom, where it only reports the first motion once the docker container starts, any subsequent movement is not reported. MQTT shows all of the Reolink features and I can change via MQTT infra red setting etc.
I have 4 other cameras which all report motion ok but they all have AI motion detection, they are a mixture of RLC-820A, RLC-510A, RLC-810A.
I have tried reverting the firmware from the July version to the February version.
Also motion from the E1 Zoom is reported ok into Home Assistant using its integration.
Any help would be appreciated.
Thanks
Done some further checking and my RLC-410W also exhibits the same issue.
Hi,
I set up one RLC-810A and would like to receive not just motion but the AI detection events.
cameras:
reolink_carport:
host: <ip>
username: <username>
password: <password>
modules:
onvif:
port: 8000
monitor_events: true
prefer_webhook_subscription: false
reolink:
# port: 443 # optional. 443/HTTPS by default
# username: bob # optional. Alternative username for Reolink API
# password: bobpass # optional. Alternative password for Reolink API
# ssl: false # optional. Use ssl/HTTPS
ai_detection_mode: continous # one of [off, on_motion, continuous]. on_motion requires onvif module to detect motion
sync_datetime: false
# audio: false # allow to control audio alarm volume (can't be autodetected)
# alarm: false # allow to control alarm siren (can't be autodetected)
# spotlight: false # allow to control spotlight (can't be autodetected)
Is this config correct?
In the log it says
[INFO ] 2023-01-14 13:04:32,359 akka://cam2mqtt/user/cameraman/cam_reolink_carport/mod_onvif - ONVIF Capabilities for camera reolink_carport:
Events: true
Pull-Point subscription: true
[INFO ] 2023-01-14 13:04:36,196 akka://cam2mqtt/user/cameraman/cam_reolink_carport/mod_reolink - Reolink Capabilities for camera reolink_carport:
From the README I am not sure if this configuration is the best for RLC-XXXA cameras. My firmware is v3.1.0.956_22041503, hardware IPC_523128M8MP.
Thanks for some feedback on this.
[Reolink] Implement Siren and White Led for supported Cameras
Related API commands are GetWhiteLed, SetWhiteLed, AudioAlarmPlay.
Hi,
I set up the software for two Reolink RLC-810A und everything is working absolutly fine.
Today I added an Reolink RLC-520A ( v3.1.0.801_22010701) with the same setting like on my 810A.
But I didn´t receive any AI events via MQTT.
Here is my config:
`mqtt:
host: 192.168.XXX.XXX
port: 1888
username: username
password: password
#base_name: cam2mqtt
ssl: false
#required: true # leave it on true (default) to avoid losing messages on startup
webhook:
external_url: http://192.168.XXX.XXX:8081 # only needed for webhook subscriptions
cameras:
Hof:
host: 192.168.XXX.XXX
username: username
password: password
modules:
onvif:
port: 8000
monitor_events: true
prefer_webhook_subscription: false
reolink:
port: 443 # optional. 443/HTTPS by default
# username: username # optional. Alternative username for Reolink API
# password: password # optional. Alternative password for Reolink API
ssl: true # optional. Use ssl/HTTPS
sync_datetime: false
Terrasse:
host: 192.168.XXX.XXX
username: username
password: password
modules:
onvif:
port: 8000
monitor_events: true
prefer_webhook_subscription: false
reolink:
port: 443 # optional. 443/HTTPS by default
# username: username # optional. Alternative username for Reolink API
# password: password # optional. Alternative password for Reolink API
ssl: true # optional. Use ssl/HTTPS
sync_datetime: false
Haustur:
host: 192.168.XXX.XXX
username: username
password: password
modules:
onvif:
port: 8000
monitor_events: true
prefer_webhook_subscription: false
reolink:
port: 443 # optional. 443/HTTPS by default
# username: username # optional. Alternative username for Reolink API
# password: password # optional. Alternative password for Reolink API
ssl: true # optional. Use ssl/HTTPS
sync_datetime: false
`
I already compared all settings on the cameras, but they are all the same.
Does anyone else have Problem wit the RLC-520A ?
Implement command to poll AI Detection state by calling Reolink HTTP API.
Requested by #2
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
Hi,
First of all - thank you for your great work here! I would like to use cam2mqtt as a module in a Home Automation application (SmarthomeNG, see [https://www.smarthomeng.de/]. What I am missing are the following functions:
Is that something you could consider to add to your code?
Regards - Marcus
Hi,
I honor your work - it's really easy to use your docker image.
One feature I am missing is the "visitor" event (button press @ doorbell cam).
Is it easy for you to implement it? I'm not used to scala / java ...
Thanks in advance,
Johannes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.