Minimal battery drainage #145
Replies: 4 comments 1 reply
-
I don't think there is anything else we can do. The battery is being used by the network card. To maintain a connection requires about 20 packets of data per second. Your best bet might be to script the mqtt client to shutdown and reconnect every x mins |
Beta Was this translation helpful? Give feedback.
-
All good, thanks a lot. With your proposal to shutdown the MQTT client and reconnect: for this, it would be nice if the MQTT message would have the "retain" flag set to "True". Without it, the battery sensor will go "unavailable" between updates ... nothing you can do in HA and really needs to be set by the MQTT sender. ;-) |
Beta Was this translation helpful? Give feedback.
-
If all your after is the battery info have you considered running neolink battery --config=tomlfile.toml camname then uploading the infomation into mqtt yourself? |
Beta Was this translation helpful? Give feedback.
-
Ha! I did not spot that "battery" argument. Likely because I'm on 0.5.16 ... :-/ Anyways: Sounds really promising, will upgrade and give it a try. Thanks a lot. Actually -V reports there are a lot more command line arguments available. I understood the docs in a way that "rtsp", "mqtt" and "image" are available. |
Beta Was this translation helpful? Give feedback.
-
Ok, I setup neolink to properly connect to my cam and deliver the RTSP stream to home assistant.
I disable surveillance when at home. When disabled I'd like to shutdown the cam as much as possible and have neolink "just" report the battery status. I need that status to trigger a recharge ...
Trying to figure out the neolink setting that best supports this use model, but I still see the battery gets drained over time (like 10 hours) without delivering any stream.
In that use model, I have "neolink mqtt ... " running as a service continuously. (Otherwise I'd get the battery level just for a few mins ...)
Any idea how I can further reduce battery usage?
[[cameras]]
name = "Terrasse"
username = "xxx"
password = "yyy"
uid = "someuid"
[cameras.pause]
on_motion = true
on_client = true
timeout = 2.1
[cameras.mqtt]
server = "anotherip"
port = 1883
credentials = ["someuser", "somepassowrd"]
[cameras.mqtt.discovery]
topic = "homeassistant"
features = ["battery"]
enable_motion = false
enable_preview = false
Beta Was this translation helpful? Give feedback.
All reactions