{"id":22322974,"url":"https://github.com/asheroto/ezlodevicenamecontrol","last_synced_at":"2025-03-26T05:12:26.733Z","repository":{"id":173433266,"uuid":"650758087","full_name":"asheroto/EzloDeviceNameControl","owner":"asheroto","description":"Control an Ezlo device by the device's name, without having to know the device ID.","archived":false,"fork":false,"pushed_at":"2023-06-07T19:27:39.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T06:48:07.919Z","etag":null,"topics":["api","change","control","device","device-name","deviceid","ezlo","ezlo-hub-kit","item-name","poweshell","value","vera","zigbee","zigbee-gateway","zwave-controller","zwave-gateway"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/asheroto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["asheroto"],"ko_fi":"asheroto"}},"created_at":"2023-06-07T18:39:14.000Z","updated_at":"2023-07-18T09:30:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"70c5d713-a400-48a3-b9a8-6c6f3cb6aa4e","html_url":"https://github.com/asheroto/EzloDeviceNameControl","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"a5ae2693068939000e3925b2d150600f9aa7d838"},"previous_names":["asheroto/ezlodevicenamecontrol"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheroto%2FEzloDeviceNameControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheroto%2FEzloDeviceNameControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheroto%2FEzloDeviceNameControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asheroto%2FEzloDeviceNameControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asheroto","download_url":"https://codeload.github.com/asheroto/EzloDeviceNameControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245591587,"owners_count":20640692,"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":["api","change","control","device","device-name","deviceid","ezlo","ezlo-hub-kit","item-name","poweshell","value","vera","zigbee","zigbee-gateway","zwave-controller","zwave-gateway"],"created_at":"2024-12-04T01:08:56.784Z","updated_at":"2025-03-26T05:12:26.705Z","avatar_url":"https://github.com/asheroto.png","language":"PowerShell","funding_links":["https://github.com/sponsors/asheroto","https://ko-fi.com/asheroto"],"categories":[],"sub_categories":[],"readme":"\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/asheroto)\n# Control Ezlo Device by Device Name\n[Ezlo](https://www.ezlo.com/) is a home automation platform that uses Z-Wave and Zigbee.\n\nThis script provides a way to control your Ezlo device by using the **device name**, eliminating the need to remember or find the **device ID**. In addition, it offers the ability to **display all connected devices** along with their **corresponding IDs and item/function names**. This feature facilitates more intuitive and efficient control over your Ezlo device, particularly when integrating with PowerShell or other scripting languages.\n\n**Turn Office AC on:**\n```powershell\n.\\Ezlo.ps1 -DeviceName \"Office AC\" -ItemName \"Switch\" -Value 1\n```\n**Turn Office AC off:**\n```powershell\n.\\Ezlo.ps1 -DeviceName \"Office AC\" -ItemName \"Switch\" -Value 0\n```\nAnd the office AC turns off.\n\n**Output:**\n![Controlling the device](https://github.com/asheroto/EzloDeviceNameControl/assets/49938263/98c942b4-f92d-4875-b213-1fec5fa08002)\n\nIn this example, the \"Office AC\" device is a window unit that is plugged into a Z-Wave outlet.\n\n## How it Works\n- The device names and IDs are gathered from `hub.devices.list`\n- The device IDs and item/function names and IDs are gathered from `hub.items.list`\n- An array is created containing the `device name` as the key, and the `ID` and `item/function name` as object values \n- When `-ShowDevices` is specified as a parameter, the data is converted to JSON for readability\n\n**Note**: The device ID (`deviceId`) is different than ID (`_id`). The device ID is the device itself, whereas the ID is an item/function of the device.\n\n## Prerequisites\n\n- PowerShell\n- [Ezlo device](https://www.ezlo.com/)\n- Your device needs to have **offllineAnonymousAccess** and **offlineInsecureAccess** set to **true** as defined in Part 2 [on this page](https://support.getvera.com/hc/en-us/articles/360016339799-Ezlo-platform-How-to-use-HTTP-API-commands-aka-Luup-Requests).\n\t- If you want to keep these set to false, you'll just need to modify the script. I might add this as an option later.\n\n## Setup\nChange the Ezlo IP address at the top of the script.\n\n## Usage\n**Run the script from PowerShell like so:**\n```powershell\n.\\Ezlo.ps1 -DeviceName \"Device Name Goes Here\" -ItemName \"Item Name Goes Here\" -Value Value_Integer_Goes_Here\n```\n**To see all the devices and device names:**\n\nRun this special command which will output the devices, the item/function names, and its associated ID in JSON format.\n```powershell\n.\\Ezlo.ps1 -ShowDevices\n```\n## Example\n**Turn on the device:**\n```powershell\n.\\Ezlo.ps1 -DeviceName \"Room Light\" -ItemName \"Switch\" -Value 1\n```\n**Turn off the device:**\n```powershell\n.\\Ezlo.ps1 -DeviceName \"Room Light\" -ItemName \"Switch\" -Value 0\n```\n\n## Screenshots\n**Controlling the device:**\n\n![Controlling the device](https://github.com/asheroto/EzloDeviceNameControl/assets/49938263/98c942b4-f92d-4875-b213-1fec5fa08002)\n\n**ShowDevices:**\n\n![ShowDevices](https://github.com/asheroto/EzloDeviceNameControl/assets/49938263/b9f6ec2d-81cd-41e8-b92c-310ea7a283c7)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasheroto%2Fezlodevicenamecontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasheroto%2Fezlodevicenamecontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasheroto%2Fezlodevicenamecontrol/lists"}