QuantumEntangledAndy / neolink

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

Add PTZ presets and PTZ command line #92

Closed danielkaiser closed 1 year ago

danielkaiser commented 1 year ago

As mentioned by @QuantumEntangledAndy in https://github.com/thirtythreeforty/neolink/pull/356 the main neolink development moved to this repo where part of the PTZ functionality is already available.

I rebased my changes to this repo to add the ptz preset functionality and commandline here. If these changes are okay I will try to add the preset functionality to mqtt as well.

QuantumEntangledAndy commented 1 year ago

Thanks, looks good Do you think you can add the Preset stuff into the mqtt interface or should we just merge and do that seperatly

QuantumEntangledAndy commented 1 year ago

Also please run though

cargo fmt

To pass the style checks

danielkaiser commented 1 year ago

What would you like better? Should I add PTZ preset to mqtt in a new PR or in this one?

Ok, I will run cargo fmt.

QuantumEntangledAndy commented 1 year ago

Ah thanks. I'm on holiday atm but I'll try and check this when I can.

QuantumEntangledAndy commented 1 year ago

Ok so I had a bit of time and made the changes I suggested and added an optional speed param. I am not anywhere near my camera atm though so if you have the time I'd appreciate a test

QuantumEntangledAndy commented 1 year ago

So a couple more changes.

danielkaiser commented 1 year ago

Hi @QuantumEntangledAndy

thanks for the great review!

I've just tested it and everything work with my camera.

QuantumEntangledAndy commented 1 year ago

Ok then I'll go ahead and merge. Thanks for contribution. If you've got anything else you want to add please make a PR or just discuss ideas is fine too.

QuantumEntangledAndy commented 1 year ago

I just realised I fogot to push my last set of changes to this, that adds query messages etc... It will slightly change the structure of the messages, so thought I'd give you the heads up in case you have integrated something with it

QuantumEntangledAndy commented 1 year ago

Major changes:

Assign is now

neolink ptz --config=config.toml CameraName assign 0 PresetName

Also mqtt can assign and query the ptz presets