Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically check/set the time on cameras, and bump timeout #54

Merged
merged 4 commits into from Aug 2, 2020

Conversation

thirtythreeforty
Copy link
Owner

Collectively, this should close #14.

@thirtythreeforty
Copy link
Owner Author

@hh1209 can you download the prebuilt for this PR and see if this fixes the bootlooping camera problem? Stress test as best you can.

@thirtythreeforty
Copy link
Owner Author

One thing I noticed is if the cams have internet access, they'll auto set their times via NTP very quickly after you try to change it with the set_time API call.

@thirtythreeforty
Copy link
Owner Author

@QuantumEntangledAndy I'd appreciate a code review since you're rapidly getting familiar with the project.

src/bc_protocol/time.rs Show resolved Hide resolved
src/config.rs Show resolved Hide resolved
src/bc_protocol/time.rs Show resolved Hide resolved
@QuantumEntangledAndy
Copy link
Collaborator

p.s. Are you sure I should be code reviewing I don't feel like my rust foo is of any great level

@thirtythreeforty
Copy link
Owner Author

thirtythreeforty commented Jul 31, 2020

This sets the time twice if you have mainStream and subStream enabled. Not really the end of the world but also not tidy. One of the streams needs to be instructed to be the "management" stream that does all this housekeeping.

@hh1209
Copy link
Contributor

hh1209 commented Jul 31, 2020

One of the streams needs to be instructed to be the "management" stream that does all this housekeeping.

Just a thought, what if someone is only using one stream, like on 400 series cams? i.e. not the "management" stream

@thirtythreeforty
Copy link
Owner Author

Just a thought, what if someone is only using one stream, like on 400 series cams? i.e. not the "management" stream

Neolink would ensure one of the connections is always a management connection.

Copy link
Contributor

@hh1209 hh1209 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All seems to be working in my testing. I can reboot, autoreboot, yank cables, etc and it doesn't blink or try to loop reconnect.

This is a great feature for those who don't want their cameras on the internet

@thirtythreeforty thirtythreeforty merged commit 71d1808 into master Aug 2, 2020
@thirtythreeforty thirtythreeforty deleted the set-time branch August 2, 2020 17:49
entropin pushed a commit to entropin/neolink that referenced this pull request Aug 18, 2021
Automatically check/set the time on cameras, and bump timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeout loop after update/reboot/disconnect/crash
3 participants