Giter Site home page Giter Site logo

Comments (12)

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Since your trying to achieve a jpeg every x seconds it might be more intuitive to make an option that says writes a jpeg every x seconds rather than these complicated options.

from neolink.

dkerr64 avatar dkerr64 commented on August 16, 2024

It's not that I'm trying to save a jpeg every X seconds. I'm content to save one on every Iframe as what I want is extremely fast access (via a web page that I have built) to whatever the most recent jpeg is.

But, what I am trying to achieve is power optimization. The camera I need this for is Argus 3 pro that is Wifi and battery powered. It is located such that it can only be charged for a few hours a day... so it needs to be able to run up to, say, 20 hours between charges. While I have not tried it, I'm pretty sure that if I stream continuously then it will not last 20 hours.

My objective is therefore to start a stream, capture a jpeg, then sleep for X seconds (e.g. 10 minutes), then start the process again. As pausing the video steam achieves my power objectives (I hope?), I thought that the simplest way to achieve a periodic wake/sleep cycle would be to camp-on to the existing pause capability in neolink. It is not unique to jpeg, it could apply just as usefully to the rtsp pause feature.

How it is exposed in config file could be "save jpeg every X seconds" but that feels too specific and not in fact what I want nor what I think is the simplest to implement.

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

I see. This should be ok to do but I’d like to keep the config simple if possible. There’s already a lot of options in there. If we have anything complex it might be worth adding controls to the mqtt interface (or make a rest interface) so we can let the user script it.

I should note that this sort of power optimisation might not be enough. User report a fast drain on power just by being logged even without the stream. I was planning to make pause do a full logout and then await an email from the camera when motion is detected instead of staying logged in but it’s not implemeted yet.

from neolink.

dkerr64 avatar dkerr64 commented on August 16, 2024

I'd be interested to know how you will implement receiving an email. I have setup my own mail server to receive emails (not general purpose, but like this use case very specific to an action I want to trigger). But my ISP blocks port 25. The only workaround I came up with is to use a virtual server at a hosting provider so my MX record points there. That VM uses iptables to NAT forward (over a VPN) to my actual mail server which monitors and can act on incoming email.

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Yeah it may be difficult to do. I am not expecting it to work outside of the local network. Also we can set ports other than 25 on the camera, but this will still fail without the appropriate NAT forwards which won't work at all if your behind a CGNAT like I am. It will just be another option that may sometimes work for certain users. Might also want to see how hard it would be to emulate the push notification method too.

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

I suppose we could also do a setup with sendgrid or similar and the ask for an api key for the app. That would get around a lot of the NAT issues.

from neolink.

dkerr64 avatar dkerr64 commented on August 16, 2024

On my Argus 3 pro, I can set a from address and a to address but cannot configure a custom SMTP server, so I assume it is hardwired to connect to a Reolink mail server. That means that any email will originate externally and attempt to send via MX record for the domain.

Can sendgrid API notify a listener on receipt of an email? That may work.

For me however, it adds no value. On the battery cameras the email cannot be set to a schedule (like send me a JPEG every 10 minutes) instead it is only triggered on motion detection, which I have found not very reliable. And in many cases the camera is too slow to respond... if a person walks by, or car drives by, then the picture is takes is too late... person or car has already moved out of frame !!! Duh!

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Can sendgrid API notify a listener on receipt of an email? That may work.

I think you can setup webhooks to send a post-request to a server of your choice but I haven't used that feature yet

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

but cannot configure a custom SMTP server

Thats a little odd I can definitely setup the smtp in both my E1 and Argus2E. Might still be able to set it via sending the right commands even if the UI on your app lacks it

from neolink.

dkerr64 avatar dkerr64 commented on August 16, 2024

but cannot configure a custom SMTP server

Thats a little odd I can definitely setup the smtp in both my E1 and Argus2E. Might still be able to set it via sending the right commands even if the UI on your app lacks it

You are right. I found it down under the "from email address" section. I forgot that I had set SMTP server in there.

However, if you want, you can close this as will not implement. I was suggesting it as a method for me to capture the still images at regular intervals. But I think we have that accomplished with the image feature now added. What we are left with on that is to make sure that we are power optimized (ie, should we explicitly log out after capturing the image). I have not yet started a periodic capture so don't yet know how the battery is going to last.

THanks
David

from neolink.

QuantumEntangledAndy avatar QuantumEntangledAndy commented on August 16, 2024

Sure shall close then, hope we can optimise the battery usage. I suspect you will need an explicit logout and disconnect to save power. Just staying connected to requires an acknowledgment packet every 0.1s and a keepalive every 0.5s or so which will add up I think

from neolink.

dkerr64 avatar dkerr64 commented on August 16, 2024

Battery messages are sent regularly from the camera. I think we should capture them and "do something" what exactly I don't know yet, but progress would be at least recording the status. I'll open another issue for that.

Thanks
David

from neolink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.