Camscript - a sunrise / sunset camera utility for MacOS

Joined
Nov 25, 2016
Messages
839
Reaction score
2,280
Although many people have used the excellent Windows sunrise / sunset utility written by @bp2008, as a Mac user I wanted to create something that integrated with the SecuritySpy system on my iMac, without the need for virtualizing a Windows machine.

The result is Camscript, a utility written in AppleScript that can be compiled into a standalone application using the free Platypus application.

Camscript version 0.2 beta

To use Camscript, you need only download the AppleScript from the above link, open it in Script Editor, and edit the latitude, longitude, and camera user name(s), password(s), and IP address(es). Once saved, use Platypus 5.3 (link provided in the script) to compile it. Although Script Editor can also be used to export an AppleScript as an application, the result tends to be buggy (uses too much CPU time), so Platypus is strongly recommended. I've attached a screen shot showing the Platypus settings for compiling the script. (Be sure to set the interface to "None" in Platypus.) You can then specify Camscript as a startup item on your Mac.

As with similar utilities, Camscript is meant for use on a dedicated computer that doesn't sleep. I've included sample commands that have successfully placed a Dahua bullet camera and PTZ camera into day and night mode at sunrise and sunset, and commands for setting the zoom and focus on a Dahua -Z12E camera that is used for license plate recognition (LPR). Be sure to disable profile scheduling on the cameras to be controlled, and let Camscript control them instead. The first time you run Camscript, you'll need to grant access to your desktop so that the log file can be written to it.

If you need to read the zoom and focus values on an existing Dahua -Z12E camera in order to incorporate them into Camscript, download and run this script first: Camread

I hope that Mac users on IPCamTalk will find Camscript useful. Be sure to read the comments in the script for additional instructions. I'll continue to support and update the software for the foreseeable future.
 

Attachments

Last edited:

flynreelow

Known around here
Joined
Dec 12, 2016
Messages
1,248
Reaction score
1,137
love it... if i ever get away from Sighthound, this may be the way i will go to still use my Mac.
 
Joined
Nov 25, 2016
Messages
839
Reaction score
2,280
Camscript has just been updated to version 0.2b. This version includes commands for controlling Dahua -Z12E cameras that are typically used for LPR.
 
Top