{"id":19152553,"url":"https://github.com/brentahughes/gozone","last_synced_at":"2025-07-28T07:03:35.082Z","repository":{"id":57562545,"uuid":"104688557","full_name":"brentahughes/GoZone","owner":"brentahughes","description":"Zoneminder api client written in golang","archived":false,"fork":false,"pushed_at":"2017-09-28T01:53:02.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T21:15:14.652Z","etag":null,"topics":["go","golang","ipcam","ipcamera","zm","zoneminder"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brentahughes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-25T01:10:11.000Z","updated_at":"2021-02-21T21:27:25.000Z","dependencies_parsed_at":"2022-09-07T14:12:05.695Z","dependency_job_id":null,"html_url":"https://github.com/brentahughes/GoZone","commit_stats":null,"previous_names":["bah2830/gozone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brentahughes/GoZone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentahughes%2FGoZone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentahughes%2FGoZone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentahughes%2FGoZone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentahughes%2FGoZone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brentahughes","download_url":"https://codeload.github.com/brentahughes/GoZone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentahughes%2FGoZone/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267475779,"owners_count":24093356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","ipcam","ipcamera","zm","zoneminder"],"created_at":"2024-11-09T08:18:20.386Z","updated_at":"2025-07-28T07:03:35.010Z","avatar_url":"https://github.com/brentahughes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoZone\nZoneminder is a great surveilance system for DIY setups and Golang is great for small services within DIY setups. So it just makes sense to bring them together.\n\n## Install\n```\ngo get github.com/bah2830/GoZone\n```\n\n## Monitors\n\n### Get All Monitors\n```\nimport zm \"github.com/bah2830/GoZone\"\n\nclient, err := zm.NewClient(\"http://192.168.1.10/zm\", \"username\", \"password\")\nif err != nil {\n    log.Fatal(err)\n}\n\nmonitors, err := client.GetMonitors()\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Printf(\"%+v\", monitors)\n```\n\n### Getting Events For A Monitor\n```\nimport zm \"github.com/bah2830/GoZone\"\n\nclient, err := zm.NewClient(\"http://192.168.1.10/zm\", \"username\", \"password\")\nif err != nil {\n    log.Fatal(err)\n}\n\nmonitor, err := client.GetMonitorById(1)\nif err != nil {\n    log.Fatal(err)\n}\n\nevents, err := monitor.GetEvents(nil)\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Printf(\"%+v\", events)\n```\n\n### Monitoring For Events\n```\nimport zm \"github.com/bah2830/GoZone\"\n\nclient, err := zm.NewClient(\"http://192.168.1.10/zm\", \"username\", \"password\")\nif err != nil {\n    log.Fatal(err)\n}\n\nmonitor, err := client.GetMonitorById(1)\nif err != nil {\n    log.Fatal(err)\n}\n\neventChan := make(chan zoneminder.Events)\nm.MonitorForEvents(\"Motion\", 5, eventChan)\n\nfor {\n    select {\n    case e := \u003c-eventChan:\n        log.Printf(\"\\n%+v\", e)\n    default:\n        time.Sleep(30 * time.Second)\n        m.StopEventMonitoring()\n        return\n    }\n}\n```\n\n## Events\n### Get All Events\nThis can return well over the default 100 pagination limit. Use filters to narrow that down.\n```\nimport zm \"github.com/bah2830/GoZone\"\n\nclient, err := zm.NewClient(\"http://192.168.1.10/zm\", \"username\", \"password\")\nif err != nil {\n    log.Fatal(err)\n}\n\nevents, err := client.GetEvents(\u0026zm.EventOpts{\n    Cause: \"Motion\",\n})\n\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Printf(\"%+v\", events)\n```\n\n### Monitor For Events\n```\nimport zm \"github.com/bah2830/GoZone\"\n\nclient, err := zm.NewClient(\"http://192.168.1.10/zm\", \"username\", \"password\")\nif err != nil {\n    log.Fatal(err)\n}\n\neventChan := make(chan zoneminder.Events)\nc.MonitorForEvents(\u0026zm.EventOpts{Cause: \"Motion\"}, 5, eventChan)\n\nfor {\n    select {\n    case e := \u003c-eventChan:\n        log.Printf(\"\\n%+v\", e)\n    default:\n        time.Sleep(30 * time.Second)\n        c.StopEventMonitoring()\n        return\n    }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrentahughes%2Fgozone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrentahughes%2Fgozone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrentahughes%2Fgozone/lists"}