{"id":27192232,"url":"https://github.com/imactool/cloud-dahua","last_synced_at":"2025-04-09T18:44:13.621Z","repository":{"id":54525920,"uuid":"520076460","full_name":"iMactool/cloud-dahua","owner":"iMactool","description":"cloud-dahua https://www.cloud-dahua.com/wiki ","archived":false,"fork":false,"pushed_at":"2023-11-27T08:14:20.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T17:16:28.538Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iMactool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-01T11:09:35.000Z","updated_at":"2022-08-09T05:21:57.000Z","dependencies_parsed_at":"2023-01-24T19:33:37.380Z","dependency_job_id":null,"html_url":"https://github.com/iMactool/cloud-dahua","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fcloud-dahua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fcloud-dahua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fcloud-dahua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iMactool%2Fcloud-dahua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iMactool","download_url":"https://codeload.github.com/iMactool/cloud-dahua/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248090733,"owners_count":21046141,"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","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":[],"created_at":"2025-04-09T18:44:12.893Z","updated_at":"2025-04-09T18:44:13.608Z","avatar_url":"https://github.com/iMactool.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e dahuacloud \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e \u003ca href=\"https://www.cloud-dahua.com/wiki\" target=\"_blank\"\u003e大华云睿开放平台\u003c/a\u003e 、\u003ca href=\"https://open.imou.com/book/start.html\" target=\"_blank\"\u003e 乐橙开放平台开发\u003c/a\u003e \u003c/p\u003e\n\n\u003e 需要先熟悉大华云睿开放平台的文档 https://www.cloud-dahua.com/wiki \n\n或\n\u003e 乐橙开放平台开发文档 https://open.imou.com/book/start.html\n\n\u003e 没有特别说明的接口，则需按照文档传递\n\n## Installing\n\n```shell\n$ composer require imactool/dahua-cloud -vvv\n```\n\n\n## Usage\n\n### 大华云睿使用方式\n```php\n\n    require __DIR__ .'/vendor/autoload.php';\n    \n    use Imactool\\DahuaCloud\\Cloud;\n    \n    $config = [\n        'client_id'     =\u003e '平台的client_id',\n        'client_secret' =\u003e '平台的client_secret'\n    ];\n    \n    $cloud = new Cloud($config);\n    \n    //获取场所管理 的场所列表\n    $params = [\n        'pageSize' =\u003e 10,\n        'pageNum'  =\u003e 1\n    ];\n    $res = $cloud-\u003eOrg-\u003egetPlaceList($params);\n    var_dump($res);\n\n    //获取业主二维码\n    $personFileId = '550970137048096768';\n    $res = $dh-\u003eAsc-\u003egetQrcode($personFileId);\n    var_dump($res);\n\n\n    //社区-混合云三方接口\n    $communityCode = '60bd440488654354bc78f46d657ab91b';\n    $mixSer = $dh-\u003eMix-\u003emixHeader($communityCode);\n    $params = [\n        'pageNum' =\u003e 1,\n        'pageSize' =\u003e 20\n    ];\n    //查询开门记录\n    $res = $mixSer-\u003edoorOpenRecord($params);\n    var_dump($res);\n\n\n    //云存储 -\u003e 查询通道是否开通云存储\n    $params = ['0','1','2']; //设备序列号$通道id 列表\n    $res = $dh-\u003eMixed-\u003egetStorageStrategy($params);\n    var_dump($res);\n    \n    \n    //同步人员授权\n    $params =[\n        'channelId' =\u003e 0,\n        'deviceId' =\u003e '11dsdsse23432',\n        'operateType'=\u003e1,\n        'personFileId' =\u003e '7634076932312329168'\n    ];\n    $res = $dh-\u003eAsc-\u003esyncAuthPersonToDevice($params);\n    var_dump($res);\n    \n    //远程开门\n    $params =[\n        'accessSource' =\u003e 0,\n        'type' =\u003e 'remote',\n        'deviceId' =\u003e '11dsdsse23432',\n    ];\n    $res = $dh-\u003eAsc-\u003eremoteOpenDoor($params);\n    var_dump($res);\n    \n    \n    \n    //查询单个设备详情\n    $params = [\n        'deviceId' =\u003e'11dsdsse23432'\n    ];\n    $res = $dh-\u003eDevice-\u003egetDeviceInfo($params);\n    var_dump($res);\n    \n    //获取开门计划\n    $res = $dh-\u003eAsc-\u003egetDoorTimePlan();\n    var_dump($res);\n    \n    \n    //添加设备\n    $params = [\n        'storeId' =\u003e '2323232323232', //要添加的组织场所id\n        'name'   =\u003e '监控摄像测试',\n        'deviceId' =\u003e '11dsdsse23432',\n        'devUsername'=\u003e'admin', //设备用户名(使用Base64编码传入,默认为admin) --\u003e 不需要额外处理\n        'devPassword'  =\u003e'lc888888' //设备密码(使用Base64编码传入，默认为admin123)--\u003e 不需要额外处理\n    ];\n    $res = $dh-\u003eDevice-\u003eaddDevice($params);\n    var_dump($res);\n    \n    //删除设备\n    $deviceId = '11dsdsse23432';\n    $res = $dh-\u003eDevice-\u003edeleteDevice($deviceId);\n    var_dump($res);\n    \n\n\n```\n\n### 乐橙开放平台使用方式\n```php\n\trequire __DIR__ .'/vendor/autoload.php';\n\tuse Imactool\\DahuaCloud\\Imou;\n\n\t$config =[\n\t\t'appId' =\u003e '', // 乐橙 appId，控制台-我的应用-应用信息中获取\n\t\t'appSecret' =\u003e '', // 乐橙 appSecret\n\t];\n\n\t$imou = new Imou($config);\n\n \n\n\t$params = [\n\t\t'deviceId' =\u003e '11111'\n\t];\n \t$res = $imou-\u003eLcDevice-\u003eunBindDeviceInfo($params);\n \tvar_dump($res);\n\n\t//绑定\n\t$params = [\n\t\t'deviceId' =\u003e '11111',\n\t\t'code'     =\u003e ''\n\t];\n\t$res = $imou-\u003eLcDevice-\u003ebindDevice($params);\n \tvar_dump($res);\n```\n\n更多方法，请看源文件（可以使用 请求地址进行搜索匹配接口）\n\n\n \n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Fcloud-dahua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimactool%2Fcloud-dahua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimactool%2Fcloud-dahua/lists"}