I posted a new version in this thread, which adds a command to configure the recording mode for a camera: Recording UniFi Cameras When HSM Mode is Away - #5 by tomw
@jsfinn, please feel free to use this thread for reference and any discussion on getting things up and running.