QuantumEntangledAndy / neolink

An RTSP bridge to Reolink IP cameras
GNU Affero General Public License v3.0
257 stars 41 forks source link

MQTT make it optional to send a preview on motion (PIR) #133

Closed sonar98 closed 9 months ago

sonar98 commented 11 months ago

First of all thank you very much for all the improvements you already made.

I have two Argus2 camera's with a solarpanel. If I run neolink now in mqtt mode it drains the battery. The solarpanel can't keep up with charging.

Is it possible to create an option to only send a preview image when motion is detected by the PIR sensor?

And would it be possible to create an option to get an image only on request. For example when the doorbell rings in home assistant gets the image from the camera and sends it as a notification to my phone.

QuantumEntangledAndy commented 11 months ago

All possible improvements but they are also low priority for me. If you want though PRs are welcome

QuantumEntangledAndy commented 11 months ago

I think if I were to do this I would add it as just an on demand rather than an on motion. If you want to listen to motion and fire off the event for a new picture that can be handled by your event system

QuantumEntangledAndy commented 9 months ago

I have added a command in the mqtt neolink/camname/query/preview that will make it create a a jpeg on request in neolink/camname/status/preview. You can create the setup you requested with a little scripting to watch for md then push the query/preview command

si458 commented 8 months ago

i just want to tag onto this sorry, i have enable_preview = false set as i wanted to do this feature, on motion take a picture, BUT the /preview in mqtt, keeps updating every 2 seconds? any suggestions?

bind = "0.0.0.0"

[mqtt]
broker_addr = "core-mosquitto" # Address of the mqtt server
port = 1883 # mqtt servers port
credentials = ["simon", "mysupersecretpassword"] # mqtt server login details

[[cameras]]
name = "frontdoor"
username = "admin"
password = "mysupersecretpassword"
uid = "95270001JLIXXXXX"
stream = "subStream"
[cameras.mqtt]
enable_motion = true # motion detection
enable_pings = false   # keep alive pings that keep the camera connected
enable_light = false   # flood lights only avaliable on some camera
enable_battery = true # battery updates in `/status/battery_level`
enable_preview = false # preview image in `/status/preview`
[cameras.mqtt.discovery]
topic = "homeassistant"
features = ["battery","motion"]
zimbo86 commented 6 months ago

I can confirm this bug: [mqtt] broker_addr = "1.2.3.4" # Address of the mqtt server port = 1883 # mqtt servers port credentials = ["xx", "xx"] # mqtt server login details enable_preview = false

Still a preview image every 2s